change viewer calling paths (#1410)
[openemr.git] / interface / usergroup / adminacl.php
blobd45b63dd0010d9615a7dd5887e08f9763247e60a
1 <?php
2 /**
3 * Allows acl(php-gacl) administration. Heavily ajax and
4 * javascript/jquery dependent. All ajax functions are called
5 * from adminacl_ajax.php
7 * @package OpenEMR
8 * @link http://www.open-emr.org
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @author Ranganath Pathak <pathak01@hotmail.com>
11 * @copyright Copyright (c) 2007-2017 Brady Miller <brady.g.miller@gmail.com>
12 * @copyright Copyright (c) 2017 Ranganath Pathak <pathak01@hotmail.com>
13 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
16 require_once("../globals.php");
17 require_once("$srcdir/acl.inc");
19 use OpenEMR\Core\Header;
21 //ensure user has proper access
22 if (!acl_check('admin', 'acl')) {
23 echo "(" . xlt('ACL Administration Not Authorized') . ")";
24 exit;
27 //ensure phpgacl is installed
28 if (!isset($phpgacl_location)) {
29 echo "(" . xlt('PHP-gacl is not installed') . ")";
30 exit;
34 <html>
35 <head>
36 <title><?php echo xlt("Access Control List Administration"); ?></title>
38 <?php Header::setupHeader(); ?>
40 <script type="text/JavaScript">
41 $(document).ready(function(){
42 var groupTitle = "<?php echo xla('This section allows you to create and remove groups and modify or grant access privileges to existing groups. Check the check box to display section'); ?>";
43 $('#advanced-tooltip').tooltip({title: "<?php echo xla('Click to manually configure access control, recommended for advanced users'); ?>"});
44 $('#user-tooltip').tooltip({title: "<?php echo xla('Click the pencil icon to grant and remove access privileges to the selected user'); ?>"});
45 $('#group-tooltip').tooltip({title: groupTitle});
46 $('#new-group-tooltip').tooltip({title: "<?php echo xla('Enter values in this section to create a new group also known as Access Request Object (ARO)'); ?>"});
47 $('#remove-group-tooltip').tooltip({title: "<?php echo xla('Use this section to delete existing groups or Access Request Objects (AROs)'); ?>"});
49 //Show membership section by default
50 $("#membership_show").click();
51 membership_show();
52 //Show membership section by default
54 $("body").on("click", ".link_submit", function(){
55 generic_click(this);
56 return false;
57 });
59 $("body").on("click", ".button_submit", function(){
60 generic_click(this);
61 return false;
62 });
64 $("body").on("click", "#membership_show", function(){
65 membership_show();
66 return;
67 });
69 $("body").on("click", "#acl_show", function(){
70 acl_show();
71 return;
72 });
74 $("body").on("click", ".button_acl_add", function(){
75 //if Clear, then reset form
76 if (this.id == "button_acl_add_clear") {
77 $("#acl_error").empty();
78 $("#div_acl_add_form span.alert").empty();
79 return;
81 //if Cancel, then reset/hide form and show create/remove acl links
82 if (this.id == "button_acl_add_cancel") {
83 $("#div_acl_add_form").hide("slow");
84 $("#acl_error").empty();
85 $("#div_acl_add_form span.alert").empty();
86 $("#none_acl_returns").show();
87 $("#none_acl_list").show();
88 return;
90 //Submit selected, so send ajax request
91 title = $("#title_field").val();
92 identifier = $("#id_field").val();
93 return_value = $("#return_field").val();
94 description = $("#desc_field").val();
95 $.ajax({
96 type: "POST",
97 url: "../../library/ajax/adminacl_ajax.php",
98 dataType: "xml",
99 data: {
100 control: "acl",
101 action: "add",
102 title: title,
103 identifier: identifier,
104 return_value: return_value,
105 description: description
107 success: function(xml){
108 //if successful, then show new group
109 if ($(xml).find("success").text() == "SUCCESS") {
110 $("#button_acl_add_cancel").click();
111 acl_show();
113 //Remove Loading indicator and old errors, then display new errors
114 $("#div_acl_add_form span.loading").hide();
115 $("#acl_error").empty();
116 $("#div_acl_add_form span.alert").empty();
117 $(xml).find("error").each(function(){
118 temparray = $(this).text().split("_");
119 $("#" + temparray[0] + "_error").append(temparray[1]);
121 $("#acl_error").show();
122 $("#div_acl_add_form span.alert").show();
124 beforeSend: function(){
125 //Show Loading indicator
126 $("#div_acl_add_form span.loading").show();
128 error: function(){
129 //Remove Loading indicator and show errors
130 $("#div_acl_add_form span.loading").hide();
131 $("#acl_error").empty();
132 $("#acl_error").append("<span class='alert'><?php echo xla('ERROR, unable to collect data from server'); ?><br></span>");
133 $("#acl_error").show();
136 return false;
139 $("body").on("click", ".button_acl_remove", function(){
140 //if Clear, then reset form
141 if (this.id == "button_acl_remove_clear") {
142 $("#acl_error").empty();
143 $("#div_acl_remove_form span.alert").empty();
144 return;
146 //if Cancel, then reset/hide form and show create/remove acl links
147 if (this.id == "button_acl_remove_cancel") {
148 $("#div_acl_remove_form").hide("slow");
149 $("#acl_error").empty();
150 $("#div_acl_remove_form span.alert").empty();
151 $("#none_acl_returns").show();
152 $("#none_acl_list").show();
153 return;
155 //Ensure confirmed before deleting group
156 confirmDelete = $("input[name=acl_remove_confirm]:checked").val();
157 if (confirmDelete == "no") { //send confirm alert and exit
158 $("#remove_confirm_error").empty();
159 $("#remove_confirm_error").append("<?php echo xla('Select Yes to confirm group deletion'); ?>");
160 return false;
162 //Delete and confirmed, so send ajax request
163 temparray = $("#acl_field").val().split("-");
164 title = temparray[0];
165 return_value = temparray[1];
166 $.ajax({
167 type: "POST",
168 url: "../../library/ajax/adminacl_ajax.php",
169 dataType: "xml",
170 data: {
171 control: "acl",
172 action: "remove",
173 title: title,
174 return_value: return_value
176 success: function(xml){
177 //if successful, then show new group
178 if ($(xml).find("success").text() == "SUCCESS") {
179 $("#button_acl_remove_cancel").click();
180 acl_show();
182 //Remove Loading indicator and old errors, then display new errors
183 $("#div_acl_remove_form span.loading").hide();
184 $("#acl_error").empty();
185 $("#div_acl_remove_form span.alert").empty();
186 $(xml).find("error").each(function(){
187 temparray = $(this).text().split("_");
188 $("#" + temparray[0] + "_error").append(temparray[1]);
190 $("#acl_error").show();
191 $("#div_acl_remove_form span.alert").show();
193 beforeSend: function(){
194 //Show Loading indicator
195 $("#div_acl_remove_form span.loading").show();
197 error: function(){
198 //Remove Loading indicator and show errors
199 $("#div_acl_remove_form span.loading").hide();
200 $("#acl_error").empty();
201 $("#acl_error").append("<span class='alert'><?php echo xla('ERROR, unable to collect data from server'); ?><br></span>");
202 $("#acl_error").show();
205 return false;
208 function membership_show() {
209 if (!$("#membership_show").prop('checked')) {
210 $("#membership_error").empty();
211 $("#membership").hide("slow");
212 return;
214 //Send ajax request
215 $.ajax({
216 type: "POST",
217 url: "../../library/ajax/adminacl_ajax.php",
218 dataType: "xml",
219 data: {
220 control: "username",
221 action: "list"
223 success: function(xml){
224 $("#membership_error").empty();
225 $("#membership").empty();
226 $(xml).find("user").each(function(){
227 username = $(this).find("username").text();
228 $("#membership").append("<div id='link_" + username + "'><span class='text'>" + username + "</span><a class='link_submit' href='no_javascript' id='" + username + "_membership_list' title='<?php echo xla('Edit'); ?> " + username + "'>&nbsp;<i class='fa fa-pencil' aria-hidden='true'></i></a></span><a class='link_submit' href='no_javascript' id='" + username + "_membership_hide' style='display: none' title='<?php echo xla('Hide'); ?> " + username + "'>&nbsp;<i class='fa fa-eye-slash' aria-hidden='true'></i></a><span class='alert' style='display: none;'>&nbsp;&nbsp;<?php echo xla('This user is not a member of any group'); ?>!!!</span><span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xla('LOADING'); ?>...</span></div><div id='error_" + username + "'></div><div id='" + username + "' style='display: none'><div class='table-responsive'><table class='head'><thead><tr><th class='text-center'><span class='bold'><?php echo xla('Active'); ?></span></th><th class='text-center'><span class='bold'><?php echo xla('Inactive'); ?></span></th></tr><tbody><tr><td align='center'><select name='active[]' multiple></select><br /><p align='center'><input class='button_submit' type='button' title='<?php echo xla('Remove'); ?>' id='" + username + "_membership_remove' value=' >> '></p></td><td align='center'><select name='inactive[]' multiple></select><br /><p align='center'><input class='button_submit' type='button' title='<?php echo xla('Add'); ?>' id='" + username + "_membership_add' value=' << ' ></p></td></tr></tbody></table></div></div>");
229 if ($(this).find("alert").text() == "no membership") {
230 $("#link_" + username + " span.alert").show();
233 //Show the username list and remove loading indicator
234 $("#membership").show("slow");
235 $("#membership_edit span.loading:first").hide();
237 beforeSend: function(){
238 //Show Loading indicator
239 $("#membership_edit span.loading:first").show();
241 error: function(){
242 //Remove Loading indicator and previous error, if any, then show error
243 $("#membership_edit span.loading:first").hide();
244 $("#membership_error").empty();
245 $("#membership_error").append("<span class='alert'><?php echo xla('ERROR, unable to collect data from server'); ?><br><br></span>");
246 $("#membership_error").show();
249 return;
252 function acl_show() {
253 if (!$("#acl_show").prop('checked')) {
254 $("#acl_error").empty();
255 $("#none_acl_returns").hide();
256 $("#none_acl_list").hide();
257 $("#acl").hide("slow");
258 $("#div_acl_add_form").hide("slow");
259 $("#div_acl_remove_form").hide("slow");
260 return;
262 //Send ajax request
263 $.ajax({
264 type: "POST",
265 url: "../../library/ajax/adminacl_ajax.php",
266 dataType: "xml",
267 data: {
268 control: "acl",
269 action: "list"
271 success: function(xml){
272 $("#acl_error").empty();
273 $("#acl").empty();
274 $(xml).find("acl").each(function(){
275 value_acl = $(this).find("value").text();
276 title = $(this).find("title").text();
277 titleDash = value_acl.replace(" ","-");
278 return_value = $(this).find("returnid").text();
279 return_title = $(this).find("returntitle").text();
280 note = $(this).find("note").text();
281 $("#acl").append("<div id='acl_link_" + titleDash + "_" + return_value + "'><span class='text' title='" + note + "'>" + title + "-" + return_title + "</span><a class='link_submit' href='no_javascript' id='" + titleDash + "_aco_list_" + return_value + "' title='<?php echo xla('Edit'); ?> " + title + "-" + return_title + "'>&nbsp;<i class='fa fa-pencil' aria-hidden='true'></i></a></span><a class='link_submit' href='no_javascript' id='" + titleDash + "_acl_hide_" + return_value + "' style='display: none' title='<?php echo xla('Hide'); ?> " + title + "-" + return_title + "'>&nbsp;<i class='fa fa-eye-slash' aria-hidden='true'></i></a><span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xla('LOADING'); ?>...</span></div><div id='acl_error_" + titleDash + "_" + return_value + "'></div><div id='acl_" + titleDash + "_" + return_value + "' style='display: none'><div class='table-responsive'><table class='head'><thead><tr><th class='text-center'><span class='bold'><?php echo xla('Active'); ?></span></th><th class='text-center'><span class='bold'><?php echo xla('Inactive'); ?></span></th></tr></thead><tbody><tr><td align='center'><select name='active[]' size='6' multiple class='form-control'></select><br /><p align='center'><input class='button_submit' type='button' title='<?php echo xla('Remove'); ?>' id='" + titleDash +"_aco_remove_" + return_value + "' value=' >> '></p></td><td align='center'><select name='inactive[]' size='6' multiple class='form-control'></select><br /><p align='center'><input class='button_submit' type='button' title='<?php echo xla('Add'); ?>' id='" + titleDash + "_aco_add_" + return_value + "' value=' << ' ></p></td></tr></tbody></table></div></div>");
283 //Show the acl list and add link. Remove loading indicator.
284 $("#acl").show("slow");
285 $("#acl_edit div span.loading:first").hide();
286 $("#none_acl_returns").show();
287 $("#none_acl_list").show();
289 beforeSend: function(){
290 //Show Loading indicator
291 $("#acl_edit div span.loading:first").show();
293 error:function(){
294 //Remove Loading indicator and previous error, if any, then show error
295 $("#acl_edit div span.loading:first").hide();
296 $("#acl_error").empty();
297 $("#acl_error").append("<span class='alert'><?php echo xla('ERROR, unable to collect data from server'); ?><br><br></span>");
298 $("#acl_error").show();
301 return;
304 function generic_click(cthis) {
305 //set up variables and html page pointers
306 temparray = cthis.id.split("_");
307 identity = temparray[0];
308 identityFormatted = identity.replace("-"," ");
309 control = temparray[1];
310 action = temparray[2];
311 return_value = temparray[3];
312 if (control == "membership") {
313 contentPointer = "#" + identity;
314 linkPointer = "#link_" + identity;
315 linkPointerPost ="";
316 errorPointer = "#error_" + identity;
318 if (control == "acl" || control == "aco") {
319 contentPointer = "#acl_" + identity + "_" + return_value;
320 linkPointer = "#acl_link_" + identity + "_" + return_value;
321 linkPointerPost ="";
322 errorPointer = "#acl_error_" + identity + "_" + return_value;
324 //special cases, show add/remove acl forms
325 if (identity == "none" && control == "acl") { //action == "returns"
326 if (action == "returns") {
327 contentPointer = "#div_acl_add_form";
329 else if (action == "list") {
330 contentPointer = "#div_acl_remove_form";
332 linkPointer = "#acl_edit";
333 linkPointerPost =":first";
334 errorPointer = "#acl_error";
337 //If clicked Hide link
338 if (action == "hide") {
339 //Remove stuff and show Edit link
340 $(contentPointer).hide("slow");
341 $(errorPointer).hide();
342 $(linkPointer + " a.link_submit:last").hide();
343 $(linkPointer + " a.link_submit:first").show();
344 return;
347 //If clicked Add with ACO or membership, then collect selections
348 if (action == "add" && !(control == "acl")) {
349 var selected = [];
350 selected = $(contentPointer + " select:last").val();
353 //If clicked Remove with ACO or membership, then collect selections
354 if (action == "remove" && !(control == "acl")) {
355 var selected = [];
356 selected = $(contentPointer + " select:first").val();
359 //Send ajax request
360 $.ajax({
361 type: "POST",
362 url: "../../library/ajax/adminacl_ajax.php",
363 dataType: "xml",
364 data: {
365 name: identityFormatted,
366 control: control,
367 action: action,
368 'selection[]': selected,
369 return_value: return_value
371 success: function(xml){
373 //SPECIAL CASES to show the add/remove acl form, then exit
374 if (identity == "none" && control == "acl") {
375 $(contentPointer + " select").empty();
376 if (action == "returns") {
377 $(xml).find("return").each(function(){
378 $(contentPointer + " select").append("<option value='" + $(this).find("returnid").text() + "'>" + $(this).find("returntitle").text() + "</option>");
381 else if (action == "list") {
382 $(xml).find("acl").each(function(){
383 $(contentPointer + " select").append("<option value='" + $(this).find("value").text() + "-" + $(this).find("returnid").text() + "'>" + $(this).find("title").text() + "-" + $(this).find("returntitle").text() + "</option>");
386 $(contentPointer + " option").removeAttr('selected');
387 $(contentPointer).show("slow");
388 $("#none_acl_returns").hide();
389 $("#none_acl_list").hide();
390 $(linkPointer + " span.loading" + linkPointerPost).hide();
391 return;
394 if (control == "membership") {
395 //Remove, then re-populate, then set size of selection boxes
396 $(contentPointer + " select").empty();
397 counterActive = 0;
398 counterInactive = 0;
399 $(xml).find("active").find("group").each(function(){
400 $(contentPointer + " select:first").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
401 counterActive = counterActive + 1;
403 $(xml).find("inactive").find("group").each(function(){
404 $(contentPointer + " select:last").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
405 counterInactive = counterInactive + 1;
407 $(contentPointer + " option").removeAttr('selected');
408 if (counterActive > counterInactive) {
409 size = counterActive;
411 else {
412 size = counterInactive;
414 if (size > 10) {
415 size = 10;
417 if (counterActive > 0) {
418 //ensure remove the no active group alert
419 $(linkPointer + " span.alert").hide();
423 if (control == "acl" || control == "aco") {
424 //Remove, then re-populate, then set size of selection boxes
425 $(contentPointer + " select").empty();
426 counterActive = 0;
427 counterInactive = 0;
428 $(xml).find("active").find("section").each(function(){
429 $(contentPointer + " select:first").append("<optgroup label='" + $(this).find("name").text() + "'>");
430 counterActive = counterActive + 1;
431 $(this).find("aco").each(function(){
432 $(contentPointer + " select:first").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
433 counterActive = counterActive + 1;
435 $(contentPointer + " select:first").append("</optgroup>");
437 $(xml).find("inactive").find("section").each(function(){
438 $(contentPointer + " select:last").append("<optgroup label='" + $(this).find("name").text() + "'>");
439 counterInactive = counterInactive + 1;
440 $(this).find("aco").each(function(){
441 $(contentPointer + " select:last").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
442 counterInactive = counterInactive + 1;
444 $(contentPointer + " select:last").append("</optgroup>");
446 $(contentPointer + " option").removeAttr('selected');
447 if (counterActive > counterInactive) {
448 size = counterActive;
450 else {
451 size = counterInactive;
453 if (size > 15) {
454 size = 15;
458 //display the selection boxes
459 $(contentPointer + " select").attr('size', size);
460 $(contentPointer).show("slow");
462 if (action == "list") {
463 //Remove Edit link and show Hide link
464 $(linkPointer + " a.link_submit:first").hide();
465 $(linkPointer + " a.link_submit:last").show();
468 //Remove Loading indicator
469 $(linkPointer + " span.loading" + linkPointerPost).hide();
471 //Remove old errors, then display any new errors to user
472 $(errorPointer).empty();
473 $(xml).find("error").each(function(){
474 $(errorPointer).append("<span class='alert'>" + $(this).text() + "<br></span>");
475 $(errorPointer).show();
478 beforeSend: function(){
479 //Show Loading indicator
480 $(linkPointer + " span.loading" + linkPointerPost).show();
482 error: function(){
483 //Remove Loading indicator and show errors
484 $(linkPointer + " span.loading" + linkPointerPost).hide();
485 $(errorPointer).empty();
486 $(errorPointer).append("<span class='alert'><?php echo xla('ERROR, unable to collect data from server'); ?><br></span>");
487 $(errorPointer).show();
490 return;
493 </script>
495 <style type="text/css">
496 body {
497 padding: 5pt 15pt 5pt 5pt;
498 margin: 0pt;
500 .loading {
501 font-family: sans-serif;
502 text-decoration: blink;
503 font-size: 10pt;
504 color: red;
505 font-weight: bold;
507 .alert {
508 font-family: sans-serif;
509 font-size: 10pt;
510 color: red;
511 font-weight: bold;
513 .section {
514 border: solid;
515 border-width: 1px;
516 border-color: #0000ff;
517 margin: 10pt 0 10pt 0pt;
518 padding: 5pt;
520 select[multiple], select[size] {
521 height: auto !Important;
522 width: 400px;
524 .section a, .section a:visited, .section a:hover {
525 text-decoration:none;
526 color:#000000 ! Important;
528 </style>
529 </head>
530 <body class="body_top">
531 <div class="container">
532 <div class="row">
533 <div class="col-xs-12">
534 <div class="page-header clearfix">
535 <h2 class="clearfix"><span id='header_text'><?php echo xlt("Access Control List Administration"); ?></span> &nbsp;&nbsp; <?php echo ($phpgacl_location) ? "<a href='../../gacl/admin/acl_admin.php' onclick='top.restoreSession()'><i id='advanced-tooltip' class='fa fa-external-link fa-2x small' aria-hidden='true'></i> </a>" : ""; ?><a class="pull-right" data-target="#myModal" data-toggle="modal" href="#" id="help-href" name="help-href" style="color:#000000"><i class="fa fa-question-circle" aria-hidden="true"></i></a></h2>
536 </div>
537 </div>
538 </div>
539 <div class="row">
540 <div class="col-xs-12">
541 <div id='membership_edit'>
542 <span class="bold"><input id='membership_show' type='checkbox'><?php echo xlt('User Memberships'); ?></span> <i id='user-tooltip' class="fa fa-info-circle text-primary" aria-hidden="true"></i>
543 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
544 <div id='membership_error'></div>
545 <div class="section" id='membership' style='display: none;'></div>
546 </div>
547 <div id='acl_edit'>
548 <div style='margin-bottom:5px'>
549 <span class="bold" ><input id='acl_show' type='checkbox'><?php echo xlt('Groups and Access Controls'); ?></span> <i id='group-tooltip' class="fa fa-info-circle text-primary" aria-hidden="true"></i>
550 </div>
551 <a class='link_submit btn btn-default btn-add' href='no_javascript' id='none_acl_returns' style='display: none;' title='<?php echo xla('Add New Group'); ?>'><?php echo xlt('Add New Group'); ?></a>
552 <a class='link_submit btn btn-default btn-cancel' href='no_javascript' id='none_acl_list' style='display: none;' title='<?php echo xla('Remove Group'); ?>'><?php echo xlt('Remove Group'); ?></a>
553 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
554 <div id='acl_error'></div>
555 <div id='div_acl_add_form' style='display: none;'>
556 <form action="no_javascript" class="section clearfix" id="acl_add_form" method="post" name="acl_add_form">
557 <span class='bold'><?php echo xlt('New Group Information'); ?></span> <i id='new-group-tooltip' class="fa fa-info-circle text-primary" aria-hidden="true"></i>
558 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
559 <div class='col-xs-12'>
560 <div class='row'>
561 <div class='col-xs-4'>
562 <label class="control-label" for="title_field"><?php echo xlt('Title'); ?>:</label>
563 <input id="title_field" type="text" class="form-control">
564 </div>
565 <div class='col-xs-6'>
566 <br><span class="alert" id="title_error"></span>
567 </div>
568 </div>
569 <div class='row'>
570 <div class='col-xs-4'>
571 <label class="control-label" for="id_field"><?php echo xlt('Identifier(one word)'); ?>:</label>
572 <input id="id_field" type="text" class="form-control">
573 </div>
574 <div class='col-xs-6'>
575 <br><span class="alert" id="identifier_error"></span>
576 </div>
577 </div>
578 <div class='row'>
579 <div class='col-xs-4'>
580 <label class="control-label" for="return_field"><?php echo xlt('Return Value'); ?>:</label>
581 <select id="return_field" class="form-control">
582 </select>
583 </div>
584 <div class='col-xs-6'>
585 <br><span class="alert" id="return_error"></span>
586 </div>
587 </div>
588 <div class='row'>
589 <div class='col-xs-4'>
590 <label class="control-label" for="desc_field"><?php echo xlt('Description'); ?>:</label>
591 <input id="desc_field" type="text" class="form-control">
592 </div>
593 <div class='col-xs-6'>
594 <br><span class="alert" id="description_error"></span>
595 </div>
596 </div>
597 <div class="row">
598 <div class="col-xs-12" style="padding:15px 18px">
599 <button type="submit" class="button_acl_add btn btn-default" id="button_acl_add_submit" title='<?php echo xla('Add Group'); ?>'><?php echo xlt('Add Group'); ?></button>
600 <button type="reset" class="button_acl_add btn btn-link" id="button_acl_add_clear" title='<?php echo xla('Clear'); ?>'><?php echo xlt('Clear'); ?></button>
601 <button type="reset" class="button_acl_add btn btn-link btn-cancel oe-opt-btn-separate-left" id="button_acl_add_cancel" title='<?php echo xla('Cancel'); ?>'><?php echo xlt('Cancel'); ?></button>
602 </div>
603 </div>
604 </div>
605 </form>
606 </div>
607 <div id='div_acl_remove_form' style='display: none;'>
608 <form action="no_javascript" class="section clearfix" id="acl_remove_form" method="post" name="acl_remove_form">
609 <div style='margin-bottom:5px'>
610 <span class='bold'><?php echo xlt('Remove Group Form'); ?></span> <i id='remove-group-tooltip' class="fa fa-info-circle text-primary" aria-hidden="true"></i>
611 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
612 </div>
613 <div class='col-xs-12'>
614 <div class='row'>
615 <div class='col-xs-4'>
616 <label class="control-label" for="acl_field"><?php echo xlt('Group'); ?>:</label>
617 <select id="acl_field" class='form-control'>
618 </select>
619 </div>
620 <div class='col-xs-6'>
621 <br><span class="alert" id="aclTitle_error"></span>
622 </div>
623 </div>
624 <div class='row'>
625 <div class='col-xs-12'>
626 <br>
627 <span class='text'><?php echo xlt('Do you really want to delete this group'); ?>?</span>
628 </div>
629 </div>
630 <div class='row'>
631 <div class='col-xs-4'>
632 <br>
633 <input type="radio" name="acl_remove_confirm" value="yes"><span class='text'><?php echo xlt('Yes'); ?></span>
634 <input type="radio" name="acl_remove_confirm" value="no" checked><span class='text'><?php echo xlt('No'); ?></span>
635 </div>
636 <div class='col-xs-6'>
637 <br><span class="alert" id="remove_confirm_error"></span>
638 </div>
639 </div>
640 <div class="row">
641 <div class="col-xs-12" style="padding:15px 18px">
642 <button type="submit" class="button_acl_remove btn btn-default" id="button_acl_remove_delete" title='<?php echo xla('Delete Group'); ?>'><?php echo xlt('Delete Group'); ?></button>
643 <button type="reset" class="button_acl_remove btn btn-link btn-cancel oe-opt-btn-separate-left" id="button_acl_remove_cancel" title='<?php echo xla('Cancel'); ?>'><?php echo xlt('Cancel'); ?></button>
644 </div>
645 </div>
646 </div>
647 </form>
648 </div>
649 <div class="section hideaway" id='acl' style='display: none;'></div>
650 </div>
651 </div>
652 </div>
653 </div><!--end of container div-->
654 <div class="row">
655 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
656 <div class="modal-dialog modal-lg">
657 <div class="modal-content oe-modal-content">
658 <div class="modal-header clearfix"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" style="color:#000000; font-size:1.5em;">×</span></button></div>
659 <div class="modal-body">
660 <iframe src="" id="targetiframe" style="height:75%; width:100%; overflow-x: hidden; border:none" allowtransparency="true"></iframe>
661 </div>
662 <div class="modal-footer" style="margin-top:0px;">
663 <button class="btn btn-link btn-cancel pull-right" data-dismiss="modal" type="button"><?php echo xlt('close'); ?></button>
664 </div>
665 </div>
666 </div>
667 </div>
668 </div>
669 <script>
670 $( document ).ready(function() {
671 $('#help-href').click (function(){
672 document.getElementById('targetiframe').src ='adminacl_help.php';
675 </script>
676 </body>
677 </html>