95da7812910de51d26b32e6eeb29ccb717e42ffa
[portal.git] / ecomp-portal-FE-common / client / app / views / user-notifications-admin / user.notifications.modal.page.html
1 <!--
2   ================================================================================
3   ECOMP Portal
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at 
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ================================================================================
19   -->
20 <div class="user-notification-details-modal">
21
22                 <div class="b2b-modal-header">
23                         <h2 class="account-details-title" id="account-add-details-title">{{modalPgTitle}}</h2>
24
25                         <div class="corner-button in">
26                                 <button type="button" class="close" aria-label="Close" id="user-notification-button-close"
27                                         ng-click="$dismiss('cancel')"></button>
28                         </div>
29                 </div>
30
31                 <div class="b2b-modal-body">
32                                         <div class="user-notification-details-contents">
33                 <div class="left-container">
34                         <div class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
35                                 <div class="user-notif-label">Broadcast to All Categories</div>
36                                 <div class="user-notif-label">
37                                         <label for="radio-button-yes" class="radio"> 
38                                 <input type="radio" ng-model="newNotifModel.isForAllRoles" id="radio-button-yes" name="YES" value="Y" > 
39                                 <i class="skin"></i> 
40                                 <span>Yes</span> 
41                             </label>
42                                 </div>
43                                 <div class="user-notif-label">
44                             <label for="radio-button-no" class="radio"> 
45                                 <input type="radio" ng-model="newNotifModel.isForAllRoles" id="radio-button-no" name="NO" value="N" > 
46                                 <i class="skin"></i> 
47                                 <span>No</span> 
48                             </label>
49                         </div> 
50                         </div>
51                         <div 
52                                 style="padding-left: 10px; {{(! newNotifModel.isForAllRoles ||newNotifModel.isForAllRoles=='Y')? 'opacity : 0.6; pointer-events: none;':' '}} {{isEditMode? 'opacity : 0.6;':' '}} "
53                                 class="user-notif-label">
54                                 <div id="notifcation-label-user" class="user-notif-label">
55                                         <span ng-show="newNotifModel.isForAllRoles=='N'" runat="server" ID="required" class="notifcation-label-user-requiredId">*</span>
56                                         Categories
57                                 </div>
58                                 <div>
59
60                                 <div id="notifcation-label-user-div" class="user-notif-label"></div>
61                                 <div class="user-notif-label">
62                             <label for="funcMenu-label-yes" class="radio"> 
63                                 <input type="radio" ng-model="newNotifModel.isFunctionalMenu" ng-click="getFunctionalMenu()" id="funcMenu-label-yes" name="FUNCTIONAL MENU" value="Y" > 
64                                 <i class="skin"></i> 
65                                 <span>Functional Menu</span> 
66                             </label>
67                         </div>
68                                 <div class="user-notif-label">
69                             <label for="approles-label-no" class="radio"> 
70                                 <input type="radio"ng-model="newNotifModel.isFunctionalMenu" ng-click="getAppRoleIds()" id="approles-label-no" name="APPLICATION ROLES" value="N" > 
71                                 <i class="skin"></i> 
72                                 <span>Application Roles</span> 
73                             </label>
74                         </div>
75
76                                 <div id="approles-checkbox" ng-show="!newNotifModel.anyTreeItemSelected&&(newNotifModel.isForAllRoles=='N')&&(!newNotifModel.isEditMode)">
77                                         
78                                         <div id="approles-checkbox-required" ng-show="!newNotifModel.anyTreeItemSelected" >
79                                                 
80
81                                                 <small class="checkbox-categories">At least
82                                                         one category is required</small>
83
84                                         </div>
85                                 </div>
86                                 
87                                 </div>
88                                 
89                                 
90                 
91                 <br>
92                          <div id="user-notif-tree-div" class="tree-div" >
93                                  <div id="user-notif-tree" class="b2b-tree-checkbox" style="{{isEditMode? 'pointer-events: none;':' '}}">
94                             <b2b-tree-node-checkbox  id="jqTreeUserNotif" collection="treedata" set-role="tree" group-it="false" ></b2b-tree-node-checkbox>
95                         </div>
96                          </div>  
97                         </div>
98                         <div>
99
100                                 
101                         </div>
102                 </div>
103                 <div id="app-conatiner-right" class="right-container">
104                 <div id="add-user-notif-priority" class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
105                                         <div id="user-notification-priority-label" class="user-notif-label">Priority</div>
106                                         <div class="user-notification-priority-label">
107                             <label for="label-important" class="radio"> 
108                                 <input type="radio" ng-model="newNotifModel.selectedPriority" id="label-important" name="NORMAL" value="1" > 
109                                 <i class="skin"></i> 
110                                 <span>Normal</span> 
111                             </label>
112                             </div>
113                                         <div class="user-notification-priority-label">
114                             <label for="label-normal" class="radio"> 
115                                 <input type="radio" ng-model="newNotifModel.selectedPriority" id="label-normal" name="IMPORTANT" value="2" > 
116                                 <i class="skin"></i> 
117                                 <span>Important</span> 
118                             </label>
119                             </div>
120                                 </div>
121
122                         <div id="add-user-notif-startdate" class="add-widget-field"
123                                 style="padding-bottom: 12px; width: 301px !important;{{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
124                                 <div id="user-notification-startdate-label" class="user-notif-label">
125                                         <div class="user-notif-label">
126                                                 <span runat="server" ID="required" class="notifcation-label-user-requiredId">*</span>
127                                                 Start Date (Local Time)
128                                         </div>
129                                         <div class="datepicker-container">
130                                                 <input class="notif-input-calendar" id="datepicker-start" type="text" 
131                                                         ng-model="newNotifModel.startTime" b2b-datepicker min="minDate" max="maxDate" 
132                                                         required />
133                                         </div>
134                                         <div style="{{( isEditMode )? 'opacity : 0; pointer-events: none;':' '}}">
135                                                 <div id="user-startdate-required" ng-show="!isDateValid(newNotifModel.startTime)">
136                                                         <small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
137                                                 </div>
138                                                 <div id="user-startdate-required" ng-show="!isStartDateValidFromToday(newNotifModel.startTime)">
139                                                         <small class="date-validation">Date should not be greater than 4 months from current date!</small>
140                                                 </div>
141                                         </div>
142                                 </div>
143                                 <div ng-show="!isEditMode" ng-init="formatStartDate()"></div> 
144                         </div>                  
145
146                         <div id="add-user-notif-enddate" class="add-widget-field"
147                                 style="padding-bottom: 12px; width: 301px !important; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
148                                 <div id="user-notification-enddate-label" class="user-notif-label">
149                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId">*</span> EndDate (Local Time)
150                                 </div>
151                                 <div class="datepicker-container">
152                                         <input class="notif-input-calendar" type="text" id="datepicker-end" 
153                                                 ng-model="newNotifModel.endTime" b2b-datepicker min="minDate" max="maxDate" 
154                                                 required />
155                                 </div>
156                                 <div style="{{( isEditMode )? 'opacity : 0; pointer-events: none;':' '}}">
157                                         <div id="user-endDate-required" ng-show="!isDateValid(newNotifModel.endTime)">
158                                                 <small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
159                                         </div>
160                                         <div id="user-startdate-required"  ng-show="!isStartDateValidFromToday(newNotifModel.endTime)">
161                                                 <small class="endDate-validation">Date should not be greater than 4 months from current date!</small>
162                                         </div>
163                                         <div id="user-enddate-error" ng-show="newNotifModel.endTime&&newNotifModel.startTime&&newNotifModel.startTime.getTime()>=newNotifModel.endTime.getTime()" class="user-enddate-error-txt">
164                                                 <small class="mandatory-categories">End Date must be greater than start Date</small>
165                                         </div>
166                                 </div>
167                                 <div ng-show="!isEditMode" ng-init="formatEndDate()" ></div> 
168                         </div>
169
170                         <div id="add-user-notif-title" class="add-widget-field"
171                                 style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
172                                 <div id="user-notification-title-label" class="user-notif-label">
173                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId"
174                                                 visible="false"> *</span> Title
175                                 </div>
176                                 <textarea id="add-notification-input-title" class="notif-input" ng-model="newNotifModel.msgHeader" name="content" class="add-notification-input-title-ht">
177                 </textarea>
178                                 <div id="user-title-required" ng-show="newNotifModel.msgHeader.length == 0">
179                                         <small class="mandatory-categories">Title is Required</small>
180                                 </div>
181                         </div>
182                         
183                         <div id="add-user-notif-message" class="add-widget-field"
184                                 style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
185                                 <div id="user-notif-message-label" class="user-notif-label">
186                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId"
187                                                 visible="false"> *</span> Message
188                                 </div>
189                                 <textarea id="user-notif-input-message" class="notif-input" class="add-notification-input-title-ht"
190                                         ng-model="newNotifModel.msgDescription" name="content">
191                                 </textarea>
192                                 <div id="user-notif-message-required" ng-show="newNotifModel.msgDescription.length ==0 ">
193                                         <small class="mandatory-categories">Message is Required</small>
194                                 </div>
195                         </div>
196
197                 
198                         
199                 </div>
200         </div>
201                         </div>
202                         <br>
203                         <div class="b2b-modal-footer">
204                                 <div class="dialog-control">
205                                 <a ng-show="!isEditMode">
206                                 <button id="button-notification-save" class="btn btn-alt btn-small" size="small" ng-disabled="addUserNotificationValidation()" ng-click="addUserNotification()">Save</button></a>       
207                                                 <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')"role="button" tabindex="0">Cancel</button>
208                                                 
209                                         </div>
210                         </div>
211                         
212                         
213                         
214
215 </div>
216
217 <script>
218 $(document).ready(function(){
219     $(".ngdialog-close").attr('id','dialog-close');
220 });
221 </script>