Project

General

Profile

1
  <div id="manage-user-notifications" class=" uk-card uk-card-default uk-padding">
2
      <div class="uk-text-large uk-text-center uk-width-5-6@l uk-width">Manage User Notifications</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
      <form class="uk-form-horizontal">
12
        <div class="uk-margin">
13
          <div class="uk-form-label inherit-color">Notify for new managers:</div>
14
          <div class="uk-form-controls uk-form-controls-text" data-uk-button-group>
15
            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-primary uk-button-small"
16
                     data-uk-button>ON</button>
17
            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-default uk-button-small"
18
                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>ON</button>
19
            <button *ngIf="!userNotifications.notifyForNewManagers" class="uk-button uk-button-danger uk-button-small"
20
                     data-uk-button>OFF</button>
21
            <button *ngIf="userNotifications.notifyForNewManagers" class="uk-button uk-button-default uk-button-small"
22
                    (click)="changeValueForNewManagers(userNotifications.notifyForNewManagers)" data-uk-button>OFF</button>
23
          </div>
24
        </div>
25
        <div class="uk-margin">
26
          <div class="uk-form-label inherit-color">Notify for new subscribers:</div>
27
          <div class="uk-form-controls uk-form-controls-text" data-uk-button-group>
28
            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-primary uk-button-small"
29
                     data-uk-button>ON</button>
30
            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-default uk-button-small"
31
                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>ON</button>
32
            <button *ngIf="!userNotifications.notifyForNewSubscribers" class="uk-button uk-button-danger uk-button-small"
33
                     data-uk-button>OFF</button>
34
            <button *ngIf="userNotifications.notifyForNewSubscribers" class="uk-button uk-button-default uk-button-small"
35
                    (click)="changeValueForNewSubscribers(userNotifications.notifyForNewSubscribers)" data-uk-button>OFF</button>
36
          </div>
37
        </div>
38
      </form>
39
    </div>
40
  </div>
41

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

    
88

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