2018-11-01 18:21:10 +01:00
|
|
|
<!-- <div id="tm-main" class=" uk-section uk-margin-small-top tm-middle">
|
2018-09-24 12:08:33 +02:00
|
|
|
<div uk-grid uk-grid>
|
2018-11-01 18:21:10 +01:00
|
|
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first"> -->
|
2018-09-24 12:08:33 +02:00
|
|
|
<div class="uk-container uk-margin-top">
|
|
|
|
<div class="uk-article-title custom-article-title">
|
2018-10-15 11:51:01 +02:00
|
|
|
User Email Preferences for Claims Notifications
|
2018-09-24 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
|
2018-11-01 18:21:10 +01:00
|
|
|
<div *ngIf="userValidMessage.length > 0" class = "uk-alert uk-alert-danger uk-animation-fade" role="alert">
|
|
|
|
{{userValidMessage}}
|
|
|
|
</div>
|
|
|
|
<div *ngIf="savedMessage.length > 0" class="uk-alert uk-alert-success uk-animation-fade" role="alert">
|
|
|
|
{{savedMessage}}
|
2018-09-24 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
<errorMessages [status]="[status]" [type]="'notification preferences'"></errorMessages>
|
|
|
|
|
|
|
|
<ul class="custom-accordion" uk-accordion>
|
|
|
|
<!-- class="uk-open" -->
|
|
|
|
<!-- uk-card uk-card-default uk-card-body -->
|
|
|
|
<li *ngFor="let notification of notifications; let i=index" [class]="i==0 ? 'uk-open' : ''">
|
|
|
|
<div class="uk-accordion-title">Email preferences for {{preferencesFor}}: <strong>{{notification.openaireName}}</strong></div>
|
|
|
|
<div class="uk-accordion-content">
|
|
|
|
<form class="uk-form-horizontal"><!-- [formGroup]="myForm"-->
|
|
|
|
<!--[ngClass]="{'has-error':!myForm.controls.notify.valid && myForm.controls.notify.dirty}"-->
|
|
|
|
<div class="uk-margin">
|
2018-11-01 18:21:10 +01:00
|
|
|
<div class="uk-form-label inherit-color">Notify for claims:</div>
|
2018-10-15 11:51:01 +02:00
|
|
|
<!-- <div class="uk-form-controls uk-form-controls-text">
|
2018-09-24 12:08:33 +02:00
|
|
|
<label>Yes <input class="uk-radio" type="radio" name="radio2" [checked]="notification.notify" (click)="changeNotify(notification, true)"></label>
|
|
|
|
<label>No <input class="uk-radio" type="radio" name="radio2" [checked]="!notification.notify" (click)="changeNotify(notification, false)"></label>
|
2018-10-15 11:51:01 +02:00
|
|
|
</div> -->
|
|
|
|
<div class="uk-form-controls uk-form-controls-text" data-uk-button-group>
|
|
|
|
<button *ngIf="notification.notify" class="uk-button uk-button-primary uk-button-small"
|
|
|
|
data-uk-button>ON</button>
|
2018-11-01 18:21:10 +01:00
|
|
|
<button *ngIf="!notification.notify" class="uk-button uk-button-default uk-button-small"
|
|
|
|
(click)="changeNotify(notification, true, i)" data-uk-button>ON</button>
|
2018-10-15 11:51:01 +02:00
|
|
|
<button *ngIf="!notification.notify" class="uk-button uk-button-danger uk-button-small"
|
|
|
|
data-uk-button>OFF</button>
|
2018-11-01 18:21:10 +01:00
|
|
|
<button *ngIf="notification.notify" class="uk-button uk-button-default uk-button-small"
|
|
|
|
(click)="changeNotify(notification, false, i)" data-uk-button>OFF</button>
|
2018-09-24 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- [ngClass]="{'has-error':!myForm.controls.frequency.valid && myForm.controls.frequency.dirty}" -->
|
2018-10-15 11:51:01 +02:00
|
|
|
<div [class]="notification.notify ? 'uk-margin' : 'uk-margin cursor-not-allowed'">
|
2018-11-01 18:21:10 +01:00
|
|
|
<div class="uk-form-label inherit-color">Frequency:</div>
|
2018-09-24 12:08:33 +02:00
|
|
|
<div class="uk-form-controls">
|
2018-11-01 18:21:10 +01:00
|
|
|
<select [class]="notification.notify ? 'uk-select' : 'uk-select uk-disabled'" id="form-horizontal-select"
|
2019-01-22 12:16:02 +01:00
|
|
|
[(ngModel)]="notification.frequency" (ngModelChange)="changeFrequency(i)" name="select_frequency">
|
|
|
|
<option [ngValue]="24" >Daily</option>
|
|
|
|
<option [ngValue]="48" >Every two days</option>
|
|
|
|
<option [ngValue]="168">Weekly</option>
|
2018-09-24 12:08:33 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-10-20 17:26:54 +02:00
|
|
|
<div *ngIf="showSaveResetButtons" class="uk-float-right">
|
|
|
|
<button type="submit" class="uk-button uk-button-primary" (click)="saveNotification(i)">Save Changes</button>
|
|
|
|
<button type="submit" class="uk-button" (click)="restoreNotification(i)">Reset</button>
|
2018-09-24 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
<!-- <span class="uk-margin">
|
|
|
|
<button class="uk-width-1-1 uk-button uk-button-primary uk-button-small" type="submit" (click)="saveNotification(notifications, i)">Save</button>
|
|
|
|
<button class="uk-width-1-1 uk-button uk-button-small" (click)="restoreNotification(notifications, i)">Restore</button>
|
|
|
|
</span> -->
|
|
|
|
|
|
|
|
<!-- {{notification.notify}} -- {{notification.frequency}} -->
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- {{notifications | json}} -->
|
|
|
|
</div>
|
2018-11-01 18:21:10 +01:00
|
|
|
<!-- </div>
|
2018-09-24 12:08:33 +02:00
|
|
|
</div>
|
2018-11-01 18:21:10 +01:00
|
|
|
</div> -->
|