aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-add/following-add.component.html
blob: 65c1eda0c38d41835b4a9ab3070b65ad6073e83f (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
<h3>Add following</h3>

<div *ngIf="error" class="alert alert-danger">{{ error }}</div>

<form (ngSubmit)="addFollowing()" [formGroup]="form">
  <div class="form-group"  *ngFor="let host of hosts; let id = index; trackBy:customTrackBy">
    <label [for]="'host-' + id">Host (so without "http://")</label>

    <div class="input-group">
      <input
        type="text" class="form-control" placeholder="example.com"
        [id]="'host-' + id" [formControlName]="'host-' + id"
      />
      <span class="input-group-btn">
        <button *ngIf="displayAddField(id)" (click)="addField()" class="btn btn-default" type="button">+</button>
        <button *ngIf="displayRemoveField(id)" (click)="removeField(id)" class="btn btn-default" type="button">-</button>
      </span>
    </div>

    <div [hidden]="form.controls['host-' + id].valid || form.controls['host-' + id].pristine" class="alert alert-warning">
      It should be a valid host.
    </div>
  </div>

  <div *ngIf="canMakeFriends() === false"  class="alert alert-warning">
    It seems that you are not on a HTTPS server. Your webserver need to have TLS activated in order to follow servers.
  </div>

  <input type="submit" value="Add following" class="btn btn-default" [disabled]="!isFormValid()">
</form>