Fully responsive globals.php with vertical menu (#2460)
[openemr.git] / interface / usergroup / adminacl.php
blobdbc067b3111359285759dd8842c78a1e9d03707f
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-2018 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
17 require_once("../globals.php");
18 require_once("$srcdir/acl.inc");
20 use OpenEMR\Core\Header;
21 use OpenEMR\OeUI\OemrUI;
23 //ensure user has proper access
24 if (!acl_check('admin', 'acl')) {
25 echo "(" . xlt('ACL Administration Not Authorized') . ")";
26 exit;
29 //ensure phpgacl is installed
30 if (!isset($phpgacl_location)) {
31 echo "(" . xlt('PHP-gacl is not installed') . ")";
32 exit;
36 <html>
37 <head>
38 <title><?php echo xlt("Access Control List Administration"); ?></title>
40 <?php Header::setupHeader(); ?>
42 <script type="text/JavaScript">
43 $(function(){
44 //using jquery-ui-1-12-1 tooltip instead of bootstrap tooltip
45 var groupTitle = <?php echo xlj('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'); ?>;
46 $('#advanced-tooltip').attr( "title", <?php echo xlj('Click to manually configure access control, recommended for advanced users'); ?> ).tooltip();
47 $('#user-tooltip').attr("title", <?php echo xlj('Click the pencil icon to grant and remove access privileges to the selected user'); ?> ).tooltip();
48 $('#group-tooltip').attr("title", groupTitle).tooltip();
49 $('#new-group-tooltip').attr("title", <?php echo xlj('Enter values in this section to create a new group also known as Access Request Object (ARO)'); ?>).tooltip();
50 $('#remove-group-tooltip').attr("title", <?php echo xlj('Use this section to delete existing groups or Access Request Objects (AROs)'); ?>).tooltip();
51 //Show membership section by default
52 $("#membership_show").click();
53 membership_show();
54 //Show membership section by default
56 $("body").on("click", ".link_submit", function(){
57 generic_click(this);
58 return false;
59 });
61 $("body").on("click", ".button_submit", function(){
62 generic_click(this);
63 return false;
64 });
66 $("body").on("click", "#membership_show", function(){
67 membership_show();
68 return;
69 });
71 $("body").on("click", "#acl_show", function(){
72 acl_show();
73 return;
74 });
76 $("body").on("click", ".button_acl_add", function(){
77 //if Clear, then reset form
78 if (this.id == "button_acl_add_clear") {
79 $("#acl_error").empty();
80 $("#div_acl_add_form span.alert").empty();
81 return;
83 //if Cancel, then reset/hide form and show create/remove acl links
84 if (this.id == "button_acl_add_cancel") {
85 $("#div_acl_add_form").hide("slow");
86 $("#acl_error").empty();
87 $("#div_acl_add_form span.alert").empty();
88 $("#none_acl_returns").show();
89 $("#none_acl_list").show();
90 return;
92 //Submit selected, so send ajax request
93 title = $("#title_field").val();
94 identifier = $("#id_field").val();
95 return_value = $("#return_field").val();
96 description = $("#desc_field").val();
97 $.ajax({
98 type: "POST",
99 url: "../../library/ajax/adminacl_ajax.php",
100 dataType: "xml",
101 data: {
102 csrf_token_form: <?php echo js_escape(collectCsrfToken()); ?>,
103 control: "acl",
104 action: "add",
105 title: title,
106 identifier: identifier,
107 return_value: return_value,
108 description: description
110 success: function(xml){
111 //if successful, then show new group
112 if ($(xml).find("success").text() == "SUCCESS") {
113 $("#button_acl_add_cancel").click();
114 acl_show();
116 //Remove Loading indicator and old errors, then display new errors
117 $("#div_acl_add_form span.loading").hide();
118 $("#acl_error").empty();
119 $("#div_acl_add_form span.alert").empty();
120 $(xml).find("error").each(function(){
121 temparray = $(this).text().split("_");
122 $("#" + temparray[0] + "_error").append(temparray[1]);
124 $("#acl_error").show();
125 $("#div_acl_add_form span.alert").show();
127 beforeSend: function(){
128 //Show Loading indicator
129 $("#div_acl_add_form span.loading").show();
131 error: function(){
132 //Remove Loading indicator and show errors
133 $("#div_acl_add_form span.loading").hide();
134 $("#acl_error").empty();
135 $("#acl_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br></span>");
136 $("#acl_error").show();
139 return false;
142 $("body").on("click", ".button_acl_remove", function(){
143 //if Clear, then reset form
144 if (this.id == "button_acl_remove_clear") {
145 $("#acl_error").empty();
146 $("#div_acl_remove_form span.alert").empty();
147 return;
149 //if Cancel, then reset/hide form and show create/remove acl links
150 if (this.id == "button_acl_remove_cancel") {
151 $("#div_acl_remove_form").hide("slow");
152 $("#acl_error").empty();
153 $("#div_acl_remove_form span.alert").empty();
154 $("#none_acl_returns").show();
155 $("#none_acl_list").show();
156 return;
158 //Ensure confirmed before deleting group
159 confirmDelete = $("input[name=acl_remove_confirm]:checked").val();
160 if (confirmDelete == "no") { //send confirm alert and exit
161 $("#remove_confirm_error").empty();
162 $("#remove_confirm_error").append(<?php echo xlj('Select Yes to confirm group deletion'); ?>);
163 return false;
165 //Delete and confirmed, so send ajax request
166 temparray = $("#acl_field").val().split("-");
167 title = temparray[0];
168 return_value = temparray[1];
169 $.ajax({
170 type: "POST",
171 url: "../../library/ajax/adminacl_ajax.php",
172 dataType: "xml",
173 data: {
174 csrf_token_form: <?php echo js_escape(collectCsrfToken()); ?>,
175 control: "acl",
176 action: "remove",
177 title: title,
178 return_value: return_value
180 success: function(xml){
181 //if successful, then show new group
182 if ($(xml).find("success").text() == "SUCCESS") {
183 $("#button_acl_remove_cancel").click();
184 acl_show();
186 //Remove Loading indicator and old errors, then display new errors
187 $("#div_acl_remove_form span.loading").hide();
188 $("#acl_error").empty();
189 $("#div_acl_remove_form span.alert").empty();
190 $(xml).find("error").each(function(){
191 temparray = $(this).text().split("_");
192 $("#" + temparray[0] + "_error").append(temparray[1]);
194 $("#acl_error").show();
195 $("#div_acl_remove_form span.alert").show();
197 beforeSend: function(){
198 //Show Loading indicator
199 $("#div_acl_remove_form span.loading").show();
201 error: function(){
202 //Remove Loading indicator and show errors
203 $("#div_acl_remove_form span.loading").hide();
204 $("#acl_error").empty();
205 $("#acl_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br></span>");
206 $("#acl_error").show();
209 return false;
212 function membership_show() {
213 if (!$("#membership_show").prop('checked')) {
214 $("#membership_error").empty();
215 $("#membership").hide("slow");
216 return;
218 //Send ajax request
219 $.ajax({
220 type: "POST",
221 url: "../../library/ajax/adminacl_ajax.php",
222 dataType: "xml",
223 data: {
224 csrf_token_form: <?php echo js_escape(collectCsrfToken()); ?>,
225 control: "username",
226 action: "list"
228 success: function(xml){
229 $("#membership_error").empty();
230 $("#membership").empty();
231 $(xml).find("user").each(function(){
232 username = $(this).find("username").text();
233 $("#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 xlj('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 xlj('Hide'); ?> + " " + username + "'>&nbsp;<i class='fa fa-eye-slash' aria-hidden='true'></i></a><span class='alert' style='display: none;'>&nbsp;&nbsp;" + <?php echo xlj('This user is not a member of any group'); ?> + "!!!</span><span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + <?php echo xlj('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 xlj('Active'); ?> + "</span></th><th class='text-center'><span class='bold'>" + <?php echo xlj('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 xlj('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 xlj('Add'); ?> + "' id='" + username + "_membership_add' value=' << ' ></p></td></tr></tbody></table></div></div>");
234 if ($(this).find("alert").text() == "no membership") {
235 $("#link_" + username + " span.alert").show();
238 //Show the username list and remove loading indicator
239 $("#membership").show("slow");
240 $("#membership_edit span.loading:first").hide();
242 beforeSend: function(){
243 //Show Loading indicator
244 $("#membership_edit span.loading:first").show();
246 error: function(){
247 //Remove Loading indicator and previous error, if any, then show error
248 $("#membership_edit span.loading:first").hide();
249 $("#membership_error").empty();
250 $("#membership_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br><br></span>");
251 $("#membership_error").show();
254 return;
257 function acl_show() {
258 if (!$("#acl_show").prop('checked')) {
259 $("#acl_error").empty();
260 $("#none_acl_returns").hide();
261 $("#none_acl_list").hide();
262 $("#acl").hide("slow");
263 $("#div_acl_add_form").hide("slow");
264 $("#div_acl_remove_form").hide("slow");
265 return;
267 //Send ajax request
268 $.ajax({
269 type: "POST",
270 url: "../../library/ajax/adminacl_ajax.php",
271 dataType: "xml",
272 data: {
273 csrf_token_form: <?php echo js_escape(collectCsrfToken()); ?>,
274 control: "acl",
275 action: "list"
277 success: function(xml){
278 $("#acl_error").empty();
279 $("#acl").empty();
280 $(xml).find("acl").each(function(){
281 value_acl = $(this).find("value").text();
282 title = $(this).find("title").text();
283 titleDash = value_acl.replace(" ","-");
284 return_value = $(this).find("returnid").text();
285 return_title = $(this).find("returntitle").text();
286 note = $(this).find("note").text();
287 $("#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 xlj('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 xlj('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 xlj('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 xlj('Active'); ?> + "</span></th><th class='text-center'><span class='bold'>" + <?php echo xlj('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 xlj('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 xlj('Add'); ?> + "' id='" + titleDash + "_aco_add_" + return_value + "' value=' << ' ></p></td></tr></tbody></table></div></div>");
289 //Show the acl list and add link. Remove loading indicator.
290 $("#acl").show("slow");
291 $("#acl_edit div span.loading:first").hide();
292 $("#none_acl_returns").show();
293 $("#none_acl_list").show();
295 beforeSend: function(){
296 //Show Loading indicator
297 $("#acl_edit div span.loading:first").show();
299 error:function(){
300 //Remove Loading indicator and previous error, if any, then show error
301 $("#acl_edit div span.loading:first").hide();
302 $("#acl_error").empty();
303 $("#acl_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br><br></span>");
304 $("#acl_error").show();
307 return;
310 function generic_click(cthis) {
311 //set up variables and html page pointers
312 temparray = cthis.id.split("_");
313 identity = temparray[0];
314 identityFormatted = identity.replace("-"," ");
315 control = temparray[1];
316 action = temparray[2];
317 return_value = temparray[3];
318 if (control == "membership") {
319 identityFormatted = identity;
320 contentPointer = "#" + identity.replace(/([ .])/g,"\\$1");
321 linkPointer = "#link_" + identity.replace(/([ .])/g,"\\$1");
322 linkPointerPost ="";
323 errorPointer = "#error_" + identity.replace(/([ .])/g,"\\$1");
325 if (control == "acl" || control == "aco") {
326 contentPointer = "#acl_" + identity + "_" + return_value;
327 linkPointer = "#acl_link_" + identity + "_" + return_value;
328 linkPointerPost ="";
329 errorPointer = "#acl_error_" + identity + "_" + return_value;
331 //special cases, show add/remove acl forms
332 if (identity == "none" && control == "acl") { //action == "returns"
333 if (action == "returns") {
334 contentPointer = "#div_acl_add_form";
336 else if (action == "list") {
337 contentPointer = "#div_acl_remove_form";
339 linkPointer = "#acl_edit";
340 linkPointerPost =":first";
341 errorPointer = "#acl_error";
344 //If clicked Hide link
345 if (action == "hide") {
346 //Remove stuff and show Edit link
347 $(contentPointer).hide("slow");
348 $(errorPointer).hide();
349 $(linkPointer + " a.link_submit:last").hide();
350 $(linkPointer + " a.link_submit:first").show();
351 return;
354 //If clicked Add with ACO or membership, then collect selections
355 if (action == "add" && !(control == "acl")) {
356 var selected = [];
357 selected = $(contentPointer + " select:last").val();
360 //If clicked Remove with ACO or membership, then collect selections
361 if (action == "remove" && !(control == "acl")) {
362 var selected = [];
363 selected = $(contentPointer + " select:first").val();
366 //Send ajax request
367 $.ajax({
368 type: "POST",
369 url: "../../library/ajax/adminacl_ajax.php",
370 dataType: "xml",
371 data: {
372 csrf_token_form: <?php echo js_escape(collectCsrfToken()); ?>,
373 name: identityFormatted,
374 control: control,
375 action: action,
376 'selection[]': selected,
377 return_value: return_value
379 success: function(xml){
381 //SPECIAL CASES to show the add/remove acl form, then exit
382 if (identity == "none" && control == "acl") {
383 $(contentPointer + " select").empty();
384 if (action == "returns") {
385 $(xml).find("return").each(function(){
386 $(contentPointer + " select").append("<option value='" + $(this).find("returnid").text() + "'>" + $(this).find("returntitle").text() + "</option>");
389 else if (action == "list") {
390 $(xml).find("acl").each(function(){
391 $(contentPointer + " select").append("<option value='" + $(this).find("value").text() + "-" + $(this).find("returnid").text() + "'>" + $(this).find("title").text() + "-" + $(this).find("returntitle").text() + "</option>");
394 $(contentPointer + " option").removeAttr('selected');
395 $(contentPointer).show("slow");
396 $("#none_acl_returns").hide();
397 $("#none_acl_list").hide();
398 $(linkPointer + " span.loading" + linkPointerPost).hide();
399 return;
402 if (control == "membership") {
403 //Remove, then re-populate, then set size of selection boxes
404 $(contentPointer + " select").empty();
405 counterActive = 0;
406 counterInactive = 0;
407 $(xml).find("active").find("group").each(function(){
408 $(contentPointer + " select:first").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
409 counterActive = counterActive + 1;
411 $(xml).find("inactive").find("group").each(function(){
412 $(contentPointer + " select:last").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
413 counterInactive = counterInactive + 1;
415 $(contentPointer + " option").removeAttr('selected');
416 if (counterActive > counterInactive) {
417 size = counterActive;
419 else {
420 size = counterInactive;
422 if (size > 10) {
423 size = 10;
425 if (counterActive > 0) {
426 //ensure remove the no active group alert
427 $(linkPointer + " span.alert").hide();
431 if (control == "acl" || control == "aco") {
432 //Remove, then re-populate, then set size of selection boxes
433 $(contentPointer + " select").empty();
434 counterActive = 0;
435 counterInactive = 0;
436 $(xml).find("active").find("section").each(function(){
437 $(contentPointer + " select:first").append("<optgroup label='" + $(this).find("name").text() + "'>");
438 counterActive = counterActive + 1;
439 $(this).find("aco").each(function(){
440 $(contentPointer + " select:first").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
441 counterActive = counterActive + 1;
443 $(contentPointer + " select:first").append("</optgroup>");
445 $(xml).find("inactive").find("section").each(function(){
446 $(contentPointer + " select:last").append("<optgroup label='" + $(this).find("name").text() + "'>");
447 counterInactive = counterInactive + 1;
448 $(this).find("aco").each(function(){
449 $(contentPointer + " select:last").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
450 counterInactive = counterInactive + 1;
452 $(contentPointer + " select:last").append("</optgroup>");
454 $(contentPointer + " option").removeAttr('selected');
455 if (counterActive > counterInactive) {
456 size = counterActive;
458 else {
459 size = counterInactive;
461 if (size > 15) {
462 size = 15;
466 //display the selection boxes
467 $(contentPointer + " select").attr('size', size);
468 $(contentPointer).show("slow");
470 if (action == "list") {
471 //Remove Edit link and show Hide link
472 $(linkPointer + " a.link_submit:first").hide();
473 $(linkPointer + " a.link_submit:last").show();
476 //Remove Loading indicator
477 $(linkPointer + " span.loading" + linkPointerPost).hide();
479 //Remove old errors, then display any new errors to user
480 $(errorPointer).empty();
481 $(xml).find("error").each(function(){
482 $(errorPointer).append("<span class='alert'>" + $(this).text() + "<br></span>");
483 $(errorPointer).show();
486 beforeSend: function(){
487 //Show Loading indicator
488 $(linkPointer + " span.loading" + linkPointerPost).show();
490 error: function(){
491 //Remove Loading indicator and show errors
492 $(linkPointer + " span.loading" + linkPointerPost).hide();
493 $(errorPointer).empty();
494 $(errorPointer).append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br></span>");
495 $(errorPointer).show();
498 return;
501 </script>
502 <?php
503 $arrOeUiSettings = array(
504 'heading_title' => xl('Access Control List Administration'),
505 'include_patient_name' => false,//include only if appropriate
506 'expandable' => false,
507 'expandable_files' => array(),//all file names need suffix _xpd
508 'action' => "link",//conceal, reveal, search, reset, link or back
509 'action_title' => "",
510 'action_href' => "../../gacl/admin/acl_admin.php",//only for actions - reset, link or back
511 'show_help_icon' => true,
512 'help_file_name' => "adminacl_help.php"
514 $oemr_ui = new OemrUI($arrOeUiSettings);
516 </head>
517 <body id="adminacl" class="body_top">
518 <div id="container_div" class="<?php echo $oemr_ui->oeContainer();?>">
519 <div class="row">
520 <div class="col-sm-12">
521 <div class="page-header">
522 <?php echo $oemr_ui->pageHeading() . "\r\n"; ?>
523 </div>
524 </div>
525 </div>
526 <div class="row">
527 <div class="col-xs-12">
528 <div id='membership_edit'>
529 <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>
530 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
531 <div id='membership_error'></div>
532 <div class="section" id='membership' style='display: none;'></div>
533 </div>
534 <div id='acl_edit'>
535 <div style='margin-bottom:5px'>
536 <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>
537 </div>
538 <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>
539 <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>
540 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
541 <div id='acl_error'></div>
542 <div id='div_acl_add_form' class='section' style='display: none;'>
543 <form action="no_javascript" class="clearfix" id="acl_add_form" method="post" name="acl_add_form">
544 <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>
545 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
546 <div class='col-xs-12'>
547 <div class='row'>
548 <div class='col-xs-4'>
549 <label class="control-label" for="title_field"><?php echo xlt('Title'); ?>:</label>
550 <input id="title_field" type="text" class="form-control">
551 </div>
552 <div class='col-xs-6'>
553 <br><span class="alert" id="title_error"></span>
554 </div>
555 </div>
556 <div class='row'>
557 <div class='col-xs-4'>
558 <label class="control-label" for="id_field"><?php echo xlt('Identifier(one word)'); ?>:</label>
559 <input id="id_field" type="text" class="form-control">
560 </div>
561 <div class='col-xs-6'>
562 <br><span class="alert" id="identifier_error"></span>
563 </div>
564 </div>
565 <div class='row'>
566 <div class='col-xs-4'>
567 <label class="control-label" for="return_field"><?php echo xlt('Return Value'); ?>:</label>
568 <select id="return_field" class="form-control">
569 </select>
570 </div>
571 <div class='col-xs-6'>
572 <br><span class="alert" id="return_error"></span>
573 </div>
574 </div>
575 <div class='row'>
576 <div class='col-xs-4'>
577 <label class="control-label" for="desc_field"><?php echo xlt('Description'); ?>:</label>
578 <input id="desc_field" type="text" class="form-control">
579 </div>
580 <div class='col-xs-6'>
581 <br><span class="alert" id="description_error"></span>
582 </div>
583 </div>
584 <div class="row">
585 <div class="col-xs-12" style="padding:15px 18px">
586 <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>
587 <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>
588 <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>
589 </div>
590 </div>
591 </div>
592 </form>
593 </div>
594 <div id='div_acl_remove_form' class='section' style='display: none;'>
595 <form action="no_javascript" class="clearfix" id="acl_remove_form" method="post" name="acl_remove_form">
596 <div style='margin-bottom:5px'>
597 <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>
598 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
599 </div>
600 <div class='col-xs-12'>
601 <div class='row'>
602 <div class='col-xs-4'>
603 <label class="control-label" for="acl_field"><?php echo xlt('Group'); ?>:</label>
604 <select id="acl_field" class='form-control'>
605 </select>
606 </div>
607 <div class='col-xs-6'>
608 <br><span class="alert" id="aclTitle_error"></span>
609 </div>
610 </div>
611 <div class='row'>
612 <div class='col-xs-12'>
613 <br>
614 <span class='text'><?php echo xlt('Do you really want to delete this group'); ?>?</span>
615 </div>
616 </div>
617 <div class='row'>
618 <div class='col-xs-4'>
619 <br>
620 <input type="radio" name="acl_remove_confirm" value="yes"><span class='text'><?php echo xlt('Yes'); ?></span>
621 <input type="radio" name="acl_remove_confirm" value="no" checked><span class='text'><?php echo xlt('No'); ?></span>
622 </div>
623 <div class='col-xs-6'>
624 <br><span class="alert" id="remove_confirm_error"></span>
625 </div>
626 </div>
627 <div class="row">
628 <div class="col-xs-12" style="padding:15px 18px">
629 <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>
630 <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>
631 </div>
632 </div>
633 </div>
634 </form>
635 </div>
636 <div class="section hideaway" id='acl' style='display: none;'></div>
637 </div>
638 </div>
639 </div>
640 </div><!--end of container div-->
641 <br>
642 <?php $oemr_ui->oeBelowContainerDiv();?>
643 </body>
644 </html>