mailPrefs.component: Bug fix: call changeFrequency() on ngModelChange to enable 'save' button.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54613 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
4bbfebfd28
commit
5776b9b0ea
|
@ -45,10 +45,10 @@
|
|||
<div class="uk-form-label inherit-color">Frequency:</div>
|
||||
<div class="uk-form-controls">
|
||||
<select [class]="notification.notify ? 'uk-select' : 'uk-select uk-disabled'" id="form-horizontal-select"
|
||||
[(ngModel)]="notification.frequency" name="select_frequency">
|
||||
<option (click)="changeFrequency(24, i)" [ngValue]="24" >Daily</option>
|
||||
<option (click)="changeFrequency(48, i)" [ngValue]="48" >Every two days</option>
|
||||
<option (click)="changeFrequency(168, i)" [ngValue]="168">Weekly</option>
|
||||
[(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>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -136,7 +136,7 @@ export class MailPrefsComponent {
|
|||
}
|
||||
}
|
||||
|
||||
changeFrequency(value: number, index: number) {
|
||||
changeFrequency(index: number) {
|
||||
if(!Session.isLoggedIn()){
|
||||
//this.userValidMessage = "User session has expired. Please login again.";
|
||||
if(this.showSaveResetButtons) {
|
||||
|
@ -145,7 +145,7 @@ export class MailPrefsComponent {
|
|||
} else {
|
||||
this.savedMessage = "";
|
||||
this.status = this.errorCodes.DONE;
|
||||
if(this.initialNotifications[index].frequency != value) {
|
||||
if(this.initialNotifications[index].frequency != this.notifications[index].frequency) {
|
||||
this.prefsChanged[index] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue