Project

General

Profile

1
  <div id="manage-user-notifications" class="  uk-padding">
2
      <div class="uk-text-large uk-text-center uk-width-5-6@l uk-width">Manage notification settings</div>
3
  </div>
4
  <div class="uk-container uk-margin-top">
5
    <div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
6
    <div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
7
    <div *ngIf="successfulSaveMessage" class="uk-alert uk-alert-success" role="alert">{{successfulSaveMessage}}</div>
8
    <div *ngIf="successfulResetMessage" class="uk-alert uk-alert-warning" role="alert">{{successfulResetMessage}}</div>
9
    <div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
10
    <div *ngIf="communityId != null && userNotifications && !showLoading && !errorMessage" class="uk-first-column uk-align-center uk-width-2-3">
11
      <div  class="uk-alert uk-alert-primary" role="alert">Notification settings are related to your personal account. </div>
12
      <form class="uk-form-horizontal">
13
        <div class="uk-margin">
14

    
15
          <div class="uk-form-label inherit-color" title="Get e-mail notification when there are changes in the managers list of your community">Notify for manager changes:</div>
16
          <div class="uk-form-controls uk-form-controls-text" data-uk-button-group>
17
            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-primary uk-button-small"
18
                     data-uk-button>ON</button>
19
            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-default uk-button-small"
20
                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>ON</button>
21
            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-danger uk-button-small"
22
                     data-uk-button>OFF</button>
23
            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-default uk-button-small"
24
                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>OFF</button>
25
          </div>
26
        </div>
27
        <div class="uk-margin">
28
          <div class="uk-form-label inherit-color" title="Get e-mail notification when a user subscribes in your community">Notify for new subscribers:</div>
29
          <div class="uk-form-controls uk-form-controls-text" data-uk-button-group>
30
            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-primary uk-button-small"
31
                     data-uk-button>ON</button>
32
            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-default uk-button-small"
33
                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>ON</button>
34
            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-danger uk-button-small"
35
                     data-uk-button>OFF</button>
36
            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-default uk-button-small"
37
                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>OFF</button>
38
          </div>
39
        </div>
40
      </form>
41
    </div>
42
  </div>
43

    
44
        <!-- <table class="uk-table uk-width-1-2 uk-align-center">
45
            <tbody>
46
                <div>
47
                    <tr>
48
                        <td>
49
                            <p>Notify for new managers:</p>
50
                        </td>
51
                        <td>
52
                            <div data-uk-button-group>
53
                                <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-primary uk-button-small"
54
                                         data-uk-button>ON</button>
55
                                <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button-default uk-button-small"
56
                                        (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>ON</button>
57
                                <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-danger uk-button-small"
58
                                         data-uk-button>OFF</button>
59
                                <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button-default uk-button-small"
60
                                        (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>OFF</button>
61
                            </div>
62
                        </td>
63
                    </tr>
64
                    <tr>
65
                        <td>
66
                            <p>Notify for new subscribers:</p>
67
                        </td>
68
                        <td>
69
                            <div data-uk-button-group>
70
                                <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-primary uk-button-small"
71
                                         data-uk-button>ON</button>
72
                                <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button-default uk-button-small"
73
                                        (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>ON</button>
74
                                <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-danger uk-button-small"
75
                                         data-uk-button>OFF</button>
76
                                <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button-default uk-button-small"
77
                                        (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>OFF</button>
78
                            </div>
79
                        </td>
80
                    </tr>
81
                </div>
82
            </tbody>
83
        </table> -->
84
        <!-- <div class = "uk-grid-margin uk-first-column uk-align-center uk-width-1-3">
85
            <button *ngIf="hasChanged" class="uk-button uk-button-primary" (click)="updateUserNotifications()">Save</button>
86
            <button *ngIf="!hasChanged" class="uk-button uk-button-default" disabled>Save</button>
87
            <button class="uk-button" (click)="resetForm(communityId)">Reset</button>
88
        </div> -->
89

    
90

    
91
  <mailPrefs id="mailPrefs" [showSaveResetButtons]="false"></mailPrefs>
92
  <div class = "uk-first-column uk-align-center uk-width-1-3">
93
    <button *ngIf="hasChanged || mailPrefsChanged()" class="uk-button uk-button-primary" (click)="updateUserNotifications()">Save</button>
94
    <button *ngIf="!hasChanged && !mailPrefsChanged()" class="uk-button uk-button-default" disabled>Save</button>
95
    <button class="uk-button" (click)="resetForm(communityId)">Reset</button>
96
  </div>
(1-1/5)