-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJudgeView.ascx
More file actions
249 lines (242 loc) · 12.9 KB
/
Copy pathJudgeView.ascx
File metadata and controls
249 lines (242 loc) · 12.9 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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JudgeView.ascx.cs" Inherits="tjc.Modules.jacs.JudgeView" %>
<%@ 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"></i>
</button>
<h2 class="mb-0">Judges</h2>
</section>
<div class="d-flex">
<tb:navbar runat="server" ID="navbar" />
<main class="main flex-grow-1 p-3 pt-0">
<a id="lnkAdd" class="btn btn-primary me-3" tabindex="-1" href="#" data-bs-toggle="modal" data-bs-target="#JudgeEditModal"><i class="fa fa-plus" aria-hidden="true"></i> Add Judge</a>
<table id="tblJudge" class="table table-striped w-100">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th>Name</th>
<th>Phone</th>
<th>Court</th>
<th>Title</th>
<th></th>
</tr>
</thead>
</table>
</main>
</div>
<!-- Detail Modal -->
<div class="modal fade" id="JudgeDetailModal" tabindex="-1" aria-labelledby="JudgeDetailModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="progress-judge" 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="JudgeDetailModalLabel">Judge 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><strong>Name:</strong></td>
<td><span id="judgeName"></span></td>
</tr>
<tr>
<td><strong>Phone:</strong></td>
<td><span id="judgePhone"></span></td>
</tr>
<tr>
<td><strong>Court:</strong></td>
<td><span id="judgeCourt"></span></td>
</tr>
<tr>
<td><strong>Title:</strong></td>
<td><span id="judgeTitle"></span></td>
</tr>
</tbody>
</table>
<input type="hidden" id="hdJudgeId" />
</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="#JudgeEditModal" id="editJudgeBtn"><i class="fas fa-edit me-2"></i> Edit</button>
<button type="button" id="cmdDelete" class="btn btn-danger" data-bs-dismiss="modal"><i class="fa fa-trash me-2"></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="JudgeEditModal" tabindex="-1" aria-labelledby="JudgeEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="edit_progress_judge" 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="JudgeEditModalLabel">Edit Judge</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_hdJudgeId">
<div class="form-group">
<div class="row">
<div class="col-md-8">
<label>Name<em>*</em></label>
<select id="edit_judgeName" class="form-control" required>
<option value="">Select Judge</option>
</select>
<input type="text" id="edit_judgeNameText" class="form-control" style="display: none;" required>
<div class="invalid-feedback" id="edit_judgeName_error">Judge is Required.</div>
<div id="judgeHelp" class="form-text mb-0">Judges must have an existing account on this site and must be added to the Judge Role before assignment can be made.</div>
</div>
<div class="col-md-4">
<label>Title</label>
<select id="edit_judgeTitle" class="form-control">
<option value="Judge">Judge</option>
<option value="Mediator">Mediator</option>
<option value="Magistrate">Magistrate</option>
<option value="Case Manager">Case Manager</option>
<option value="Hearing Officer">Hearing Officer</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-8">
<label>Court</label>
<select id="edit_judgeCourt" class="form-control" aria-describedby="courtHelp">
<option value="">Select Court</option>
<!-- Courts will be populated dynamically -->
</select>
<div id="courtHelp" class="form-text mb-0">Only unassigned Courts appear in the list</div>
</div>
<div class="col-md-4">
<label>Phone</label>
<input type="text" id="edit_judgePhone" class="form-control phone">
</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>
<!-- Cross Reference Modal -->
<div class="modal fade" id="JudgeXrefModal" tabindex="-1" aria-labelledby="JudgeXrefModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="xref_progress_judge" 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="xrefJudgeHeader">Managing cross-references for: <span id="xrefSelectedJudgeName" class="fw-bold"></span></h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" id="hdXrefJudgeId" />
<div class="container-fluid">
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label for="xref_county">County<em>*</em></label>
<select id="xref_county" class="form-control" aria-describedby="countyHelp">
</select>
<div class="invalid-feedback" id="xref_county_error">County is Required.</div>
<div id="countyHelp" class="form-text mb-0">Select the county to associate</div>
</div>
<div class="col-md-6">
<label for="xref_clerkJudge">Clerk Judge<em>*</em></label>
<select id="xref_clerkJudge" class="form-control" aria-describedby="clerkJudgeHelp">
</select>
<div id="xref_clerkJudge_error" class="invalid-feedback">Clerk Judge is required.</div>
<div id="clerkJudgeHelp" class="form-text mb-0">Select the judge from the Clerk's Judge List</div>
</div>
</div>
<button type="button" class="btn btn-success" id="xref_cmdSaveReference">
<i class="fas fa-save"></i> Save Reference
</button>
</div>
</div>
<table id="tblJudgeXref" class="table table-striped w-100">
<thead>
<tr>
<th>Clerk Judge ID</th>
<th>Clerk Judge</th>
<th>County</th>
<th></th>
</tr>
</thead>
</table>
</div>
<div class="modal-footer justify-content-between">
<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/judge.js" ForceProvider="DnnFormBottomProvider" Priority="101" />
<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 portalId = <%=PortalId%>;
var service = {
path: "JACS",
framework: $.ServicesFramework(moduleId)
};
(function ($, Sys) {
$(document).ready(function () {
const element = document.getElementById('edit_judgePhone');
const maskOptions = {
mask: '(000) 000-0000'
};
const mask = IMask(element, maskOptions);
try {
if (typeof JudgeController === 'undefined') {
console.error('JudgeController is not defined. Check if Script(judge.js) loaded correctly.');
return;
}
const judgeController = new JudgeController({
moduleId: moduleId,
userId: <%=UserId%>,
isAdmin: "<%=IsAdmin%>",
adminRole: "<%=AdminRole%>",
judgeRole: "<%=JudgeRole%>",
portalId: portalId,
service: service,
currentPage: 0,
pageSize: 25,
recordCount: 0,
sortColumnIndex: 3,
sortDirection: "asc"
});
judgeController.init();
} catch (e) {
console.error('Error initializing JudgeController:', e);
}
});
}(jQuery, window.Sys));
</script>