Revision 59496
Added by Konstantinos Triantafyllou over 3 years ago
manageStakeholders.component.html | ||
---|---|---|
202 | 202 |
</div> |
203 | 203 |
</div> |
204 | 204 |
<modal-alert #editStakeholderModal |
205 |
id="edit_modal" |
|
205 | 206 |
(alertOutput)="save()" |
206 | 207 |
[okDisabled]="stakeholderFb && (stakeholderFb.invalid || (stakeholderFb.pristine && index !==-1 && !file))"> |
207 | 208 |
<div *ngIf="stakeholderFb" class="uk-padding-small" [formGroup]="stakeholderFb"> |
... | ... | |
221 | 222 |
label="Index short name"> |
222 | 223 |
</div> |
223 | 224 |
</div> |
224 |
<div class="uk-grid uk-flex uk-flex-top" uk-grid>
|
|
225 |
<div class="uk-grid uk-flex uk-flex-center uk-flex-middle" uk-grid>
|
|
225 | 226 |
<div class="uk-width-1-5"> |
226 | 227 |
<img [src]="photo"> |
227 | 228 |
</div> |
228 |
<div class="uk-width-expand"> |
|
229 |
<div *ngIf="!stakeholderFb.get('isUpload').value" class="uk-width-expand">
|
|
229 | 230 |
<div dashboard-input [formInput]="stakeholderFb.get('logoUrl')" label="Logo Path/URL"></div> |
230 | 231 |
</div> |
232 |
<ng-template #uploadPhoto> |
|
233 |
<div> |
|
234 |
<div uk-form-custom class="uk-width-auto"> |
|
235 |
<input id="photo" type="file" (change)="fileChangeEvent($event)"/> |
|
236 |
<button class="md-btn md-btn-primary md-btn-small" tabindex="-1">Upload</button> |
|
237 |
</div> |
|
238 |
<button *ngIf="file || (stakeholder.isUpload && !deleteCurrentPhoto)" class="md-btn md-btn-danger md-btn-small uk-margin-small-left" (click)="remove()">Remove</button> |
|
239 |
</div> |
|
240 |
<div *ngIf="uploadError" class="uk-text-danger uk-margin-small-top">{{uploadError}}</div> |
|
241 |
</ng-template> |
|
242 |
<div *ngIf="stakeholderFb.get('isUpload').value" class="uk-width-expand uk-text-center"> |
|
243 |
<ng-container [ngTemplateOutlet]="uploadPhoto"></ng-container> |
|
244 |
</div> |
|
231 | 245 |
</div> |
232 |
<div class="uk-text-center uk-margin-bottom"> |
|
246 |
<div *ngIf="!stakeholderFb.get('isUpload').value" class="uk-text-center uk-margin-bottom">
|
|
233 | 247 |
<div>- OR -</div> |
234 | 248 |
<div class="uk-margin-small-top"> |
235 |
<div uk-form-custom class="uk-width-auto"> |
|
236 |
<input id="photo" type="file" (change)="fileChangeEvent($event)"/> |
|
237 |
<button class="md-btn md-btn-primary md-btn-small" tabindex="-1">Upload</button> |
|
238 |
</div> |
|
239 |
<button *ngIf="file" class="md-btn md-btn-danger md-btn-small uk-margin-small-left" (click)="removePhoto()">Remove</button> |
|
249 |
<ng-container [ngTemplateOutlet]="uploadPhoto"></ng-container> |
|
240 | 250 |
</div> |
241 |
<div *ngIf="uploadError" class="uk-text-danger uk-margin-small-top">{{uploadError}}</div> |
|
242 | 251 |
</div> |
243 | 252 |
<div class="uk-form-row uk-flex uk-flex-middle uk-child-width-1-3" uk-grid> |
244 | 253 |
<div dashboard-input [formInput]="stakeholderFb.get('isPublic')" |
Also available in: Unified diff
[Monitor Dashboard | Trunk]: Add upload image functionality for stakeholder's logo