aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
blob: cc8e699f3437b29ffd7ef59d5040904cb895563e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<h1 class="visually-hidden" i18n>Configuration</h1>

<div class="alert alert-warning" *ngIf="!isUpdateAllowed()" i18n>
  Updating instance configuration from the web interface is disabled by the system administrator.
</div>

<form role="form" [formGroup]="form">

  <div ngbNav #nav="ngbNav" [activeId]="activeNav" (activeIdChange)="onNavChange($event)" class="nav-tabs">

    <ng-container ngbNavItem="instance-homepage">
      <a ngbNavLink i18n>Homepage</a>

      <ng-template ngbNavContent>
        <my-edit-homepage [form]="form" [formErrors]="formErrors"></my-edit-homepage>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem="instance-information">
      <a ngbNavLink i18n>Information</a>

      <ng-template ngbNavContent>
        <my-edit-instance-information [form]="form" [formErrors]="formErrors" [languageItems]="languageItems" [categoryItems]="categoryItems">
        </my-edit-instance-information>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem="basic-configuration">
      <a ngbNavLink i18n>Basic</a>

      <ng-template ngbNavContent>
        <my-edit-basic-configuration [form]="form" [formErrors]="formErrors" [serverConfig]="serverConfig">
        </my-edit-basic-configuration>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem="transcoding">
      <a ngbNavLink i18n>VOD Transcoding</a>

      <ng-template ngbNavContent>
        <my-edit-vod-transcoding [form]="form" [formErrors]="formErrors" [serverConfig]="serverConfig">
        </my-edit-vod-transcoding>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem="live">
      <a ngbNavLink i18n>Live streaming</a>

      <ng-template ngbNavContent>
        <my-edit-live-configuration [form]="form" [formErrors]="formErrors" [serverConfig]="serverConfig">
        </my-edit-live-configuration>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem="advanced-configuration">
      <a ngbNavLink i18n>Advanced</a>

      <ng-template ngbNavContent>
        <my-edit-advanced-configuration [form]="form" [formErrors]="formErrors">
        </my-edit-advanced-configuration>
      </ng-template>
    </ng-container>
  </div>

  <div [ngbNavOutlet]="nav"></div>

  <div class="row mt-4"> <!-- submit placement block -->
    <div class="col-md-7 col-xl-5"></div>
    <div class="col-md-5 col-xl-5">

      <div class="form-error submit-error" i18n *ngIf="!form.valid && isUpdateAllowed()">
        There are errors in the form:

        <ul>
          <li *ngFor="let error of grabAllErrors()">
            {{ error }}
          </li>
        </ul>
      </div>

      <span class="form-error submit-error" i18n *ngIf="!hasLiveAllowReplayConsistentOptions()">
        You cannot allow live replay if you don't enable transcoding.
      </span>

      <span i18n *ngIf="!isUpdateAllowed()">
        You cannot change the server configuration because it's managed externally.
      </span>

      <input
        (click)="formValidated()" type="submit" i18n-value value="Update configuration"
        [disabled]="!form.valid || !hasConsistentOptions() || !isUpdateAllowed()"
      >
    </div>
  </div>
</form>