57433c1cc1710bd339fd6f1f172a0590584b8e38
[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 id="user-startdate-required" ng-show="!isDateValid(newNotifModel.startTime)">
135                                                 <small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
136                                         </div>
137                                         
138                                 </div>
139                                 <div ng-show="!isEditMode" ng-init="formatStartDate()"></div> 
140                         </div>                  
141
142                         <div id="add-user-notif-enddate" class="add-widget-field"
143                                 style="padding-bottom: 12px; width: 301px !important; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
144                                 <div id="user-notification-enddate-label" class="user-notif-label">
145                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId">*</span> End       Date (Local Time)
146                                 </div>
147                                 <div class="datepicker-container">
148                                         <input class="notif-input-calendar" type="text" id="datepicker-end" 
149                                                 ng-model="newNotifModel.endTime" b2b-datepicker min="minDate" max="maxDate" 
150                                                 required />
151                                 </div>
152                                 <div id="user-endDate-required" ng-show="!isDateValid(newNotifModel.endTime)">
153                                                 <small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
154                                         </div>
155                                 <div id="user-enddate-error" ng-show="newNotifModel.endTime&&newNotifModel.startTime&&newNotifModel.startTime.getTime()>=newNotifModel.endTime.getTime()" class="user-enddate-error-txt">
156                                         <small class="mandatory-categories">End Date must be greater than start Date</small>
157                                 </div>
158                                 <div ng-show="!isEditMode" ng-init="formatEndDate()" ></div> 
159                         </div>
160
161                         <div id="add-user-notif-title" class="add-widget-field"
162                                 style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
163                                 <div id="user-notification-title-label" class="user-notif-label">
164                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId"
165                                                 visible="false"> *</span> Title
166                                 </div>
167                                 <textarea id="add-notification-input-title" class="notif-input" ng-model="newNotifModel.msgHeader" name="content" class="add-notification-input-title-ht">
168                 </textarea>
169                                 <div id="user-title-required" ng-show="newNotifModel.msgHeader.length == 0">
170                                         <small class="mandatory-categories">Title is Required</small>
171                                 </div>
172                         </div>
173                         
174                         <div id="add-user-notif-message" class="add-widget-field"
175                                 style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
176                                 <div id="user-notif-message-label" class="user-notif-label">
177                                         <span runat="server" ID="required" class="notifcation-label-user-requiredId"
178                                                 visible="false"> *</span> Message
179                                 </div>
180                                 <textarea id="user-notif-input-message" class="notif-input" class="add-notification-input-title-ht"
181                                         ng-model="newNotifModel.msgDescription" name="content">
182                                 </textarea>
183                                 <div id="user-notif-message-required" ng-show="newNotifModel.msgDescription.length ==0 ">
184                                 <small class="mandatory-categories">Message is Required</small>
185                                 </div>
186                         </div>
187
188                 
189                         
190                 </div>
191         </div>
192                         </div>
193                         <br>
194                         <div class="b2b-modal-footer">
195                                 <div class="dialog-control">
196                                 <a ng-show="!isEditMode">
197                                 <button id="button-notification-save" class="btn btn-alt btn-small" size="small" ng-disabled="addUserNotificationValidation()" ng-click="addUserNotification()">Save</button></a>       
198                                                 <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')"role="button" tabindex="0">Cancel</button>
199                                                 
200                                         </div>
201                         </div>
202                         
203                         
204                         
205
206 </div>
207
208 <script>
209 $(document).ready(function(){
210     $(".ngdialog-close").attr('id','dialog-close');
211 });
212 </script>