summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html
blob: 95da7812910de51d26b32e6eeb29ccb717e42ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!--
  ================================================================================
  ECOMP Portal
  ================================================================================
  Copyright (C) 2017 AT&T Intellectual Property
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at 
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  ================================================================================
  -->
<div class="user-notification-details-modal">

		<div class="b2b-modal-header">
			<h2 class="account-details-title" id="account-add-details-title">{{modalPgTitle}}</h2>

			<div class="corner-button in">
				<button type="button" class="close" aria-label="Close" id="user-notification-button-close"
					ng-click="$dismiss('cancel')"></button>
			</div>
		</div>

		<div class="b2b-modal-body">
					<div class="user-notification-details-contents">
		<div class="left-container">
			<div class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
				<div class="user-notif-label">Broadcast to All Categories</div>
				<div class="user-notif-label">
					<label for="radio-button-yes" class="radio"> 
		                <input type="radio" ng-model="newNotifModel.isForAllRoles" id="radio-button-yes" name="YES" value="Y" > 
		                <i class="skin"></i> 
		                <span>Yes</span> 
		            </label>
				</div>
				<div class="user-notif-label">
		            <label for="radio-button-no" class="radio"> 
		                <input type="radio" ng-model="newNotifModel.isForAllRoles" id="radio-button-no" name="NO" value="N" > 
		                <i class="skin"></i> 
		                <span>No</span> 
		            </label>
		        </div> 
			</div>
			<div 
				style="padding-left: 10px; {{(! newNotifModel.isForAllRoles ||newNotifModel.isForAllRoles=='Y')? 'opacity : 0.6; pointer-events: none;':' '}} {{isEditMode? 'opacity : 0.6;':' '}} "
				class="user-notif-label">
				<div id="notifcation-label-user" class="user-notif-label">
					<span ng-show="newNotifModel.isForAllRoles=='N'" runat="server" ID="required" class="notifcation-label-user-requiredId">*</span>
					Categories
				</div>
				<div>

				<div id="notifcation-label-user-div" class="user-notif-label"></div>
				<div class="user-notif-label">
		            <label for="funcMenu-label-yes" class="radio"> 
		                <input type="radio" ng-model="newNotifModel.isFunctionalMenu" ng-click="getFunctionalMenu()" id="funcMenu-label-yes" name="FUNCTIONAL MENU" value="Y" > 
		                <i class="skin"></i> 
		                <span>Functional Menu</span> 
		            </label>
		        </div>
				<div class="user-notif-label">
		            <label for="approles-label-no" class="radio"> 
		                <input type="radio"ng-model="newNotifModel.isFunctionalMenu" ng-click="getAppRoleIds()" id="approles-label-no" name="APPLICATION ROLES" value="N" > 
		                <i class="skin"></i> 
		                <span>Application Roles</span> 
		            </label>
		        </div>

				<div id="approles-checkbox" ng-show="!newNotifModel.anyTreeItemSelected&&(newNotifModel.isForAllRoles=='N')&&(!newNotifModel.isEditMode)">
					
					<div id="approles-checkbox-required" ng-show="!newNotifModel.anyTreeItemSelected" >
						

						<small class="checkbox-categories">At least
							one category is required</small>

					</div>
				</div>
				
				</div>
				
				
        	
        	<br>
        		 <div id="user-notif-tree-div" class="tree-div" >
	        		 <div id="user-notif-tree" class="b2b-tree-checkbox" style="{{isEditMode? 'pointer-events: none;':' '}}">
	                    <b2b-tree-node-checkbox  id="jqTreeUserNotif" collection="treedata" set-role="tree" group-it="false" ></b2b-tree-node-checkbox>
	                </div>
        		 </div>  
			</div>
			<div>

				
			</div>
		</div>
		<div id="app-conatiner-right" class="right-container">
		<div id="add-user-notif-priority" class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
					<div id="user-notification-priority-label" class="user-notif-label">Priority</div>
					<div class="user-notification-priority-label">
		            <label for="label-important" class="radio"> 
		                <input type="radio" ng-model="newNotifModel.selectedPriority" id="label-important" name="NORMAL" value="1" > 
		                <i class="skin"></i> 
		                <span>Normal</span> 
		            </label>
		            </div>
					<div class="user-notification-priority-label">
		            <label for="label-normal" class="radio"> 
		                <input type="radio" ng-model="newNotifModel.selectedPriority" id="label-normal" name="IMPORTANT" value="2" > 
		                <i class="skin"></i> 
		                <span>Important</span> 
		            </label>
		            </div>
				</div>

			<div id="add-user-notif-startdate" class="add-widget-field"
				style="padding-bottom: 12px; width: 301px !important;{{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
				<div id="user-notification-startdate-label" class="user-notif-label">
					<div class="user-notif-label">
						<span runat="server" ID="required" class="notifcation-label-user-requiredId">*</span>
						Start Date (Local Time)
					</div>
					<div class="datepicker-container">
						<input class="notif-input-calendar" id="datepicker-start" type="text" 
							ng-model="newNotifModel.startTime" b2b-datepicker min="minDate" max="maxDate" 
							required />
					</div>
					<div style="{{( isEditMode )? 'opacity : 0; pointer-events: none;':' '}}">
						<div id="user-startdate-required" ng-show="!isDateValid(newNotifModel.startTime)">
							<small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
						</div>
						<div id="user-startdate-required" ng-show="!isStartDateValidFromToday(newNotifModel.startTime)">
							<small class="date-validation">Date should not be greater than 4 months from current date!</small>
						</div>
					</div>
				</div>
				<div ng-show="!isEditMode" ng-init="formatStartDate()"></div> 
			</div>			

			<div id="add-user-notif-enddate" class="add-widget-field"
				style="padding-bottom: 12px; width: 301px !important; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
				<div id="user-notification-enddate-label" class="user-notif-label">
					<span runat="server" ID="required" class="notifcation-label-user-requiredId">*</span> EndDate (Local Time)
				</div>
				<div class="datepicker-container">
					<input class="notif-input-calendar" type="text" id="datepicker-end" 
						ng-model="newNotifModel.endTime" b2b-datepicker min="minDate" max="maxDate" 
						required />
				</div>
				<div style="{{( isEditMode )? 'opacity : 0; pointer-events: none;':' '}}">
					<div id="user-endDate-required" ng-show="!isDateValid(newNotifModel.endTime)">
						<small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
					</div>
					<div id="user-startdate-required"  ng-show="!isStartDateValidFromToday(newNotifModel.endTime)">
						<small class="endDate-validation">Date should not be greater than 4 months from current date!</small>
					</div>
					<div id="user-enddate-error" ng-show="newNotifModel.endTime&&newNotifModel.startTime&&newNotifModel.startTime.getTime()>=newNotifModel.endTime.getTime()" class="user-enddate-error-txt">
						<small class="mandatory-categories">End Date must be greater than start Date</small>
					</div>
				</div>
				<div ng-show="!isEditMode" ng-init="formatEndDate()" ></div> 
			</div>

			<div id="add-user-notif-title" class="add-widget-field"
				style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
				<div id="user-notification-title-label" class="user-notif-label">
					<span runat="server" ID="required" class="notifcation-label-user-requiredId"
						visible="false"> *</span> Title
				</div>
				<textarea id="add-notification-input-title" class="notif-input" ng-model="newNotifModel.msgHeader" name="content" class="add-notification-input-title-ht">
                </textarea>
				<div id="user-title-required" ng-show="newNotifModel.msgHeader.length == 0">
					<small class="mandatory-categories">Title is Required</small>
				</div>
			</div>
			
			<div id="add-user-notif-message" class="add-widget-field"
				style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
				<div id="user-notif-message-label" class="user-notif-label">
					<span runat="server" ID="required" class="notifcation-label-user-requiredId"
						visible="false"> *</span> Message
				</div>
				<textarea id="user-notif-input-message" class="notif-input" class="add-notification-input-title-ht"
					ng-model="newNotifModel.msgDescription" name="content">
				</textarea>
				<div id="user-notif-message-required" ng-show="newNotifModel.msgDescription.length ==0 ">
					<small class="mandatory-categories">Message is Required</small>
				</div>
			</div>

		
			
		</div>
	</div>
			</div>
			<br>
			<div class="b2b-modal-footer">
				<div class="dialog-control">
				<a ng-show="!isEditMode">
				<button id="button-notification-save" class="btn btn-alt btn-small" size="small" ng-disabled="addUserNotificationValidation()" ng-click="addUserNotification()">Save</button></a> 	
						<button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')"role="button" tabindex="0">Cancel</button>
						
					</div>
			</div>
			
			
			

</div>

<script>
$(document).ready(function(){
    $(".ngdialog-close").attr('id','dialog-close');
});
</script>