-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttorneyView.ascx
More file actions
224 lines (222 loc) · 12.6 KB
/
Copy pathAttorneyView.ascx
File metadata and controls
224 lines (222 loc) · 12.6 KB
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
222
223
224
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AttorneyView.ascx.cs" Inherits="tjc.Modules.jacs.AttorneyView" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<%@ Register Src="Controls/navbar.ascx" TagPrefix="tb" TagName="navbar" %>
<section class="navbar border-0 mb-0 justify-content-start">
<button class="btn btn-default me-3" id="btnToggleMenu" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="true" aria-label="Toggle navigation">
<i class="fa-solid fa-bars" aria-hidden="true"></i>
</button>
<h2 class="mb-0">Attorneys</h2>
</section>
<div class="d-flex">
<tb:navbar runat="server" ID="navbar" />
<main class="main flex-grow-1 p-3 pt-0">
<div class="alert alert-info mt-3" role="alert">
<strong><i class="fas fa-info-circle" aria-hidden="true"></i> Note:</strong>
All Attorneys are imported from the Florida Bar. Attorney User Accounts are enabled automatically upon verification of bar number.
</div>
<a id="lnkAdd" class="btn btn-primary me-3" tabindex="-1" href="#" data-bs-toggle="modal" data-bs-target="#AttorneyEditModal"><i class="fa fa-plus" aria-hidden="true"></i> Add Attorney</a>
<table id="tblAttorney" class="table table-striped w-100">
<thead>
<tr>
<th></th>
<th></th>
<th>Status</th>
<th>Name</th>
<th>Bar Number</th>
<th></th>
</tr>
</thead>
</table>
</main>
</div>
<!-- Detail Modal -->
<div class="modal fade" id="AttorneyDetailModal" tabindex="-1" aria-labelledby="AttorneyDetailModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="progress-attorney" class="modal-progress" style="display: none;">
<div class="center-progress">
<img alt="" src="/images/loading.gif" />
</div>
</div>
<div class="modal-header">
<h4 class="modal-title" id="AttorneyDetailModalLabel">Attorney Details</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table class="table table-striped m-0 p-0 w-100">
<tbody>
<tr>
<td class="border-top-0"><strong>Name:</strong></td>
<td class="border-top-0"><span id="attyName"></span></td>
</tr>
<tr>
<td><strong>User ID:</strong></td>
<td><span id="attyUserId"></span></td>
</tr>
<tr>
<td><strong>Bar Number:</strong></td>
<td><span id="attyBar"></span></td>
</tr>
<tr>
<td><strong>Phone:</strong></td>
<td><span id="attyPhone"></span></td>
</tr>
<tr>
<td><strong>Email:</strong></td>
<td><span id="attyEmails"></span></td>
</tr>
<tr>
<td><strong>Scheduling:</strong></td>
<td><span id="attySchedule"></span></td>
</tr>
<tr>
<td><strong>Enabled:</strong></td>
<td><span id="attyEnabled"></span></td>
</tr>
<tr>
<td><strong>Notes:</strong></td>
<td><span id="attyNotes"></span></td>
</tr>
</tbody>
</table>
<input type="hidden" id="hdAttorneyId" />
</div>
<div class="modal-footer justify-content-around">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#AttorneyEditModal" id="editAttorneyBtn"><i class="fas fa-edit me-2" aria-hidden="true"></i> Edit</button>
<button type="button" id="cmdDelete" class="btn btn-danger" data-bs-dismiss="modal"><i class="fa fa-trash me-2" aria-hidden="true"></i> Delete</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Edit Modal -->
<div class="modal fade" id="AttorneyEditModal" tabindex="-1" aria-labelledby="AttorneyEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="edit_progress-attorney" class="modal-progress" style="display: none;">
<div class="center-progress">
<img alt="" src="/images/loading.gif" />
</div>
</div>
<div class="modal-header">
<h4 class="modal-title" id="AttorneyEditModalLabel">Edit Attorney</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<input type="hidden" id="edit_hdAttorneyId">
<input type="hidden" id="edit_hdScheduling">
<div class="form-group">
<div class="row">
<div class="col-md-12">
<label class="d-block">Account Status<span class="text-danger">*</span></label>
<div class="form-check form-check-inline">
<input type="radio" name="edit_enabled" class="form-check-input" value="1" id="edit_radio_enabled">
<label class="form-check-label" for="edit_radio_enabled">Enabled</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" name="edit_enabled" class="form-check-input" value="0" id="edit_radio_disabled">
<label class="form-check-label" for="edit_radio_disabled">Disabled</label>
</div>
<div class="invalid-feedback" id="edit_radio-error">Please select an account status.</div>
</div>
<div class="col-md-4">
<label>Bar Number<span class="text-danger">*</span></label>
<input type="text" id="edit_attyBar" class="form-control" required>
<div class="invalid-feedback">Florida Bar Number is required.</div>
</div>
<div class="col-md-4">
<label>Jud12.flcourts.org User ID<span class="text-danger">*</span></label>
<div class="input-group mb-0">
<input type="number" id="edit_attyUserId" class="form-control">
<div class="input-group-append mb-0">
<button id="edit_user_lookup" type="button" title="Lookup UserId from Jud12 site" tabindex="-1" class="btn btn-primary">
<i class="fas fa-search" aria-hidden="true"></i> Lookup</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<label>Name<span class="text-danger">*</span></label>
<input type="text" id="edit_attyName" class="form-control" placeholder="Last Name, First Name" required>
<div class="invalid-feedback">Name is required.</div>
</div>
<div class="col-md-4">
<label>Phone Number</label>
<input type="text" id="edit_attyPhone" class="form-control phone">
</div>
<div class="col-md-12">
<label>Notes</label>
<textarea id="edit_attyNotes" class="form-control"></textarea>
</div>
<div class="col-md-12">
<label>Email Addresses<span class="text-danger">*</span></label>
<input type="hidden" id="edit_hdEmails">
<ul id="edit_email-list" class="list-unstyled"></ul>
<button type="button" id="edit_new-email" class="btn btn-outline-primary btn-sm ms-1">
<i class="fas fa-plus" aria-hidden="true"></i> New Email
</button>
<div class="invalid-feedback" id="edit_email-error">At least one email address is required.</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-success" id="edit_cmdSave">
<i class="fas fa-save" aria-hidden="true"></i> Save
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<dnn:DnnJsInclude runat="server" FilePath="~/DesktopModules/tjc.modules/JACS/js/imask.js" ForceProvider="DnnFormBottomProvider" />
<dnn:DnnJsInclude runat="server" FilePath="~/DesktopModules/tjc.modules/JACS/js/jacs.js" ForceProvider="DnnFormBottomProvider" Priority="100" />
<dnn:DnnJsInclude runat="server" FilePath="~/DesktopModules/tjc.modules/JACS/js/attorney.js" ForceProvider="DnnFormBottomProvider" Priority="101" />
<dnn:DnnCssInclude runat="server" FilePath="~/Resources/Shared/components/TimePicker/Themes/jquery-ui.min.css" />
<dnn:DnnCssInclude runat="server" FilePath="~/Resources/Libraries/DataTables/dataTables.bootstrap5.min.css" />
<dnn:DnnJsInclude runat="server" FilePath="~/Resources/Libraries/DataTables/datatables.min.js" />
<dnn:DnnJsInclude runat="server" FilePath="~/Resources/Libraries/DataTables/dataTables.bootstrap5.min.js" />
<dnn:DnnJsInclude runat="server" FilePath="/Resources/Libraries/sweetalert/sweetalert2.min.js" />
<dnn:DnnCssInclude runat="server" FilePath="/Resources/Libraries/sweetalert/sweetalert2.min.css" />
<dnn:DnnJsInclude runat="server" FilePath="/Resources/Libraries/Noty/noty.min.js" />
<dnn:DnnCssInclude runat="server" FilePath="/Resources/Libraries/Noty/noty.min.css" />
<script>
var moduleId = <%=ModuleId%>;
var service = {
path: "JACS",
framework: $.ServicesFramework(moduleId)
};
(function ($, Sys) {
$(document).ready(function () {
const element = document.getElementById('edit_attyPhone');
const maskOptions = {
mask: '(000) 000-0000'
};
const mask = IMask(element, maskOptions);
try {
if (typeof AttorneyController === 'undefined') {
console.error('AttorneyController is not defined. Check if Script(attorney.js) loaded correctly.');
return;
}
const attorneyController = new AttorneyController({
moduleId: moduleId,
userId: <%=UserId%>,
isAdmin: "<%=IsAdmin%>",
adminRole: "<%=AdminRole%>",
service: service,
currentPage: 0,
pageSize: 25,
recordCount: 0,
sortColumnIndex: 0,
sortDirection: "asc"
});
attorneyController.init();
} catch (e) {
console.error('Error initializing AttorneyController:', e);
}
});
}(jQuery, window.Sys));
</script>