1 <div class="modal-header">
2 <h4 class="modal-title pull-left"
5 class="close pull-right"
7 (click)="bsModalRef.hide()">
8 <span aria-hidden="true">×</span>
11 <form class="form-horizontal"
13 [formGroup]="formGroup"
15 <div class="modal-body">
18 <div class="form-group"
19 [ngClass]="{'has-error': formGroup.showError('user', frm)}">
20 <label class="control-label col-sm-3"
22 <ng-container i18n>Username</ng-container>
23 <span class="required"
27 <div class="col-sm-9">
33 formControlName="user">
36 formControlName="user"
40 *ngIf="userCandidates !== null"
41 [ngValue]="null">-- Select a username --</option>
42 <option *ngFor="let userCandidate of userCandidates"
43 [value]="userCandidate">{{ userCandidate }}</option>
45 <span class="help-block"
46 *ngIf="formGroup.showError('user', frm, 'required')"
47 i18n>This field is required.</span>
51 <!-- Auto-generate key -->
52 <div class="form-group"
54 <div class="col-sm-offset-3 col-sm-9">
55 <div class="checkbox checkbox-primary">
56 <input id="generate_key"
58 formControlName="generate_key">
59 <label for="generate_key"
60 i18n>Auto-generate key</label>
66 <div class="form-group"
67 [ngClass]="{'has-error': formGroup.showError('access_key', frm)}"
68 *ngIf="!formGroup.getValue('generate_key')">
69 <label class="control-label col-sm-3"
71 <ng-container i18n>Access key</ng-container>
72 <span class="required"
76 <div class="col-sm-9">
77 <div class="input-group">
78 <input id="access_key"
82 formControlName="access_key">
83 <span class="input-group-btn">
85 class="btn btn-default"
86 cdPasswordButton="access_key">
89 class="btn btn-default"
90 cdCopy2ClipboardButton="access_key">
94 <span class="help-block"
95 *ngIf="formGroup.showError('access_key', frm, 'required')"
96 i18n>This field is required.</span>
101 <div class="form-group"
102 [ngClass]="{'has-error': formGroup.showError('secret_key', frm)}"
103 *ngIf="!formGroup.getValue('generate_key')">
104 <label class="control-label col-sm-3"
106 <ng-container i18n>Secret key</ng-container>
107 <span class="required"
111 <div class="col-sm-9">
112 <div class="input-group">
113 <input id="secret_key"
117 formControlName="secret_key">
118 <span class="input-group-btn">
119 <button type="button"
120 class="btn btn-default"
121 cdPasswordButton="secret_key">
123 <button type="button"
124 class="btn btn-default"
125 cdCopy2ClipboardButton="secret_key">
129 <span class="help-block"
130 *ngIf="formGroup.showError('secret_key', frm, 'required')"
131 i18n>This field is required.</span>
136 <div class="modal-footer">
137 <cd-submit-button *ngIf="!viewing"
138 (submitAction)="onSubmit()"
140 i18n>Add</cd-submit-button>
141 <button class="btn btn-sm btn-default"
143 (click)="bsModalRef.hide()"