Billing Manager and Some Module fixes (#7747)
[openemr.git] / interface / usergroup / adminacl.php
blob2871d7ba839c329c4b72cffd827a98c4347c3fc2
1 <?php
3 /**
4 * Allows acl(php-gacl) administration. Heavily ajax and
5 * javascript/jquery dependent. All ajax functions are called
6 * from adminacl_ajax.php
8 * @package OpenEMR
9 * @link http://www.open-emr.org
10 * @author Brady Miller <brady.g.miller@gmail.com>
11 * @author Ranganath Pathak <pathak01@hotmail.com>
12 * @copyright Copyright (c) 2007-2018 Brady Miller <brady.g.miller@gmail.com>
13 * @copyright Copyright (c) 2017 Ranganath Pathak <pathak01@hotmail.com>
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once("../globals.php");
19 use OpenEMR\Common\Acl\AclMain;
20 use OpenEMR\Common\Csrf\CsrfUtils;
21 use OpenEMR\Common\Twig\TwigContainer;
22 use OpenEMR\Core\Header;
23 use OpenEMR\OeUI\OemrUI;
25 //ensure user has proper access
26 if (!AclMain::aclCheckCore('admin', 'acl')) {
27 echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Access Control List Administration")]);
28 exit;
32 <html>
33 <head>
34 <title><?php echo xlt("Access Control List Administration"); ?></title>
36 <?php Header::setupHeader(); ?>
38 <script>
39 $(function () {
40 //Bootstrap tooltip
41 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'); ?>;
42 $('#advanced-tooltip').attr({"title": <?php echo xlj('Click to manually configure access control, recommended for advanced users'); ?>, "data-toggle":"tooltip", "data-placement":"bottom"}).tooltip();
43 $('#user-tooltip').attr({"title": <?php echo xlj('Click the pencil icon to grant and remove access privileges to the selected user'); ?>, "data-toggle":"tooltip", "data-placement":"bottom"}).tooltip();
44 $('#group-tooltip').attr({"title": groupTitle, "data-toggle":"tooltip", "data-placement":"bottom"}).tooltip();
45 $('#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)'); ?>, "data-toggle":"tooltip", "data-placement":"bottom"}).tooltip();
46 $('#remove-group-tooltip').attr({"title": <?php echo xlj('Use this section to delete existing groups or Access Request Objects (AROs)'); ?>, "data-toggle":"tooltip", "data-placement":"bottom"}).tooltip();
47 //Show membership section by default
48 $("#membership_show").click();
49 membership_show();
50 //Show membership section by default
52 $("body").on("click", ".link_submit", function(){
53 generic_click(this);
54 return false;
55 });
57 $("body").on("click", ".button_submit", function(){
58 generic_click(this);
59 return false;
60 });
62 $("body").on("click", "#membership_show", function(){
63 membership_show();
64 return;
65 });
67 $("body").on("click", "#acl_show", function(){
68 acl_show();
69 return;
70 });
72 $("body").on("click", ".button_acl_add", function(){
73 //if Clear, then reset form
74 if (this.id == "button_acl_add_clear") {
75 $("#acl_error").empty();
76 $("#div_acl_add_form span.alert").empty();
77 return;
79 //if Cancel, then reset/hide form and show create/remove acl links
80 if (this.id == "button_acl_add_cancel") {
81 $("#div_acl_add_form").hide("slow");
82 $("#acl_error").empty();
83 $("#div_acl_add_form span.alert").empty();
84 $("#none_acl_returns").show();
85 $("#none_acl_list").show();
86 return;
88 //Submit selected, so send ajax request
89 title = $("#title_field").val();
90 identifier = $("#id_field").val();
91 return_value = $("#return_field").val();
92 description = $("#desc_field").val();
93 $.ajax({
94 type: "POST",
95 url: "../../library/ajax/adminacl_ajax.php",
96 dataType: "xml",
97 data: {
98 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>,
99 control: "acl",
100 action: "add",
101 title: title,
102 identifier: identifier,
103 return_value: return_value,
104 description: description
106 success: function(xml){
107 //if successful, then show new group
108 if ($(xml).find("success").text() == "SUCCESS") {
109 $("#button_acl_add_cancel").click();
110 acl_show();
112 //Remove Loading indicator and old errors, then display new errors
113 $("#div_acl_add_form span.loading").hide();
114 $("#acl_error").empty();
115 $("#div_acl_add_form span.alert").empty();
116 $(xml).find("error").each(function(){
117 temparray = $(this).text().split("_");
118 $("#" + temparray[0] + "_error").append(temparray[1]);
120 $("#acl_error").show();
121 $("#div_acl_add_form span.alert").show();
123 beforeSend: function(){
124 //Show Loading indicator
125 $("#div_acl_add_form span.loading").show();
127 error: function(){
128 //Remove Loading indicator and show errors
129 $("#div_acl_add_form span.loading").hide();
130 $("#acl_error").empty();
131 $("#acl_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br /></span>");
132 $("#acl_error").show();
135 return false;
138 $("body").on("click", ".button_acl_remove", function(){
139 //if Clear, then reset form
140 if (this.id == "button_acl_remove_clear") {
141 $("#acl_error").empty();
142 $("#div_acl_remove_form span.alert").empty();
143 return;
145 //if Cancel, then reset/hide form and show create/remove acl links
146 if (this.id == "button_acl_remove_cancel") {
147 $("#div_acl_remove_form").hide("slow");
148 $("#acl_error").empty();
149 $("#div_acl_remove_form span.alert").empty();
150 $("#none_acl_returns").show();
151 $("#none_acl_list").show();
152 return;
154 //Ensure confirmed before deleting group
155 confirmDelete = $("input[name=acl_remove_confirm]:checked").val();
156 if (confirmDelete == "no") { //send confirm alert and exit
157 $("#remove_confirm_error").empty();
158 $("#remove_confirm_error").append(<?php echo xlj('Select Yes to confirm group deletion'); ?>);
159 return false;
161 //Delete and confirmed, so send ajax request
162 temparray = $("#acl_field").val().split("-");
163 title = temparray[0];
164 return_value = temparray[1];
165 $.ajax({
166 type: "POST",
167 url: "../../library/ajax/adminacl_ajax.php",
168 dataType: "xml",
169 data: {
170 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>,
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 xlj('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 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>,
221 control: "username",
222 action: "list"
224 success: function(xml){
225 $("#membership_error").empty();
226 $("#membership").empty();
227 $(xml).find("user").each(function(){
228 username = $(this).find("username").text();
229 $("#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-alt' 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 class='form-control' name='active[]' multiple></select><br /><p align='center'><input class='button_submit btn btn-primary btn-sm' type='button' title='" + <?php echo xlj('Remove'); ?> + "' id='" + username + "_membership_remove' value=' >> '></p></td><td align='center'><select class='form-control' name='inactive[]' multiple></select><br /><p align='center'><input class='button_submit btn btn-primary btn-sm' type='button' title='" + <?php echo xlj('Add'); ?> + "' id='" + username + "_membership_add' value=' << ' ></p></td></tr></tbody></table></div></div>");
230 if ($(this).find("alert").text() == "no membership") {
231 $("#link_" + username + " span.alert").show();
234 //Show the username list and remove loading indicator
235 $("#membership").show("slow");
236 $("#membership_edit span.loading:first").hide();
238 beforeSend: function(){
239 //Show Loading indicator
240 $("#membership_edit span.loading:first").show();
242 error: function(){
243 //Remove Loading indicator and previous error, if any, then show error
244 $("#membership_edit span.loading:first").hide();
245 $("#membership_error").empty();
246 $("#membership_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br /><br /></span>");
247 $("#membership_error").show();
250 return;
253 function acl_show() {
254 if (!$("#acl_show").prop('checked')) {
255 $("#acl_error").empty();
256 $("#none_acl_returns").hide();
257 $("#none_acl_list").hide();
258 $("#acl").hide("slow");
259 $("#div_acl_add_form").hide("slow");
260 $("#div_acl_remove_form").hide("slow");
261 return;
263 //Send ajax request
264 $.ajax({
265 type: "POST",
266 url: "../../library/ajax/adminacl_ajax.php",
267 dataType: "xml",
268 data: {
269 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>,
270 control: "acl",
271 action: "list"
273 success: function(xml){
274 $("#acl_error").empty();
275 $("#acl").empty();
276 $(xml).find("acl").each(function(){
277 value_acl = $(this).find("value").text();
278 title = $(this).find("title").text();
279 titleDash = value_acl.replace(/ /g,"-");
280 return_value = $(this).find("returnid").text();
281 return_title = $(this).find("returntitle").text();
282 note = $(this).find("note").text();
283 $("#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-alt' 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 btn btn-primary' 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 btn btn-primary' type='button' title='" + <?php echo xlj('Add'); ?> + "' id='" + titleDash + "_aco_add_" + return_value + "' value=' << ' ></p></td></tr></tbody></table></div></div>");
285 //Show the acl list and add link. Remove loading indicator.
286 $("#acl").show("slow");
287 $("#acl_edit div span.loading:first").hide();
288 $("#none_acl_returns").show();
289 $("#none_acl_list").show();
291 beforeSend: function(){
292 //Show Loading indicator
293 $("#acl_edit div span.loading:first").show();
295 error:function(){
296 //Remove Loading indicator and previous error, if any, then show error
297 $("#acl_edit div span.loading:first").hide();
298 $("#acl_error").empty();
299 $("#acl_error").append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br /><br /></span>");
300 $("#acl_error").show();
303 return;
306 function generic_click(cthis) {
307 //set up variables and html page pointers
308 temparray = cthis.id.split("_");
309 identity = temparray[0];
310 identityFormatted = identity.replace(/-/g," ");
311 control = temparray[1];
312 action = temparray[2];
313 return_value = temparray[3];
314 // Membership stuff needs special treatment because username may have underscores.
315 temparray = cthis.id.match(/^(.*)_membership_([a-z]+)$/);
316 if (temparray) {
317 identity = temparray[1];
318 identityFormatted = identity;
319 control = 'membership';
320 action = temparray[2];
321 return_value = null;
322 tempid = identity.replace(/([ .])/g,"\\$1");
323 contentPointer = "#" + tempid;
324 linkPointer = "#link_" + tempid;
325 linkPointerPost = "";
326 errorPointer = "#error_" + tempid;
328 if (control == "acl" || control == "aco") {
329 contentPointer = "#acl_" + identity + "_" + return_value;
330 linkPointer = "#acl_link_" + identity + "_" + return_value;
331 linkPointerPost ="";
332 errorPointer = "#acl_error_" + identity + "_" + return_value;
334 //special cases, show add/remove acl forms
335 if (identity == "none" && control == "acl") { //action == "returns"
336 if (action == "returns") {
337 contentPointer = "#div_acl_add_form";
339 else if (action == "list") {
340 contentPointer = "#div_acl_remove_form";
342 linkPointer = "#acl_edit";
343 linkPointerPost =":first";
344 errorPointer = "#acl_error";
347 //If clicked Hide link
348 if (action == "hide") {
349 //Remove stuff and show Edit link
350 $(contentPointer).hide("slow");
351 $(errorPointer).hide();
352 $(linkPointer + " a.link_submit:last").hide();
353 $(linkPointer + " a.link_submit:first").show();
354 return;
357 //If clicked Add with ACO or membership, then collect selections
358 if (action == "add" && !(control == "acl")) {
359 var selected = [];
360 selected = $(contentPointer + " select:last").val();
363 //If clicked Remove with ACO or membership, then collect selections
364 if (action == "remove" && !(control == "acl")) {
365 var selected = [];
366 selected = $(contentPointer + " select:first").val();
369 //Send ajax request
370 $.ajax({
371 type: "POST",
372 url: "../../library/ajax/adminacl_ajax.php",
373 dataType: "xml",
374 data: {
375 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>,
376 name: identityFormatted,
377 control: control,
378 action: action,
379 'selection[]': selected,
380 return_value: return_value
382 success: function(xml){
384 //SPECIAL CASES to show the add/remove acl form, then exit
385 if (identity == "none" && control == "acl") {
386 $(contentPointer + " select").empty();
387 if (action == "returns") {
388 $(xml).find("return").each(function(){
389 $(contentPointer + " select").append("<option value='" + $(this).find("returnid").text() + "'>" + $(this).find("returntitle").text() + "</option>");
392 else if (action == "list") {
393 $(xml).find("acl").each(function(){
394 $(contentPointer + " select").append("<option value='" + $(this).find("value").text() + "-" + $(this).find("returnid").text() + "'>" + $(this).find("title").text() + "-" + $(this).find("returntitle").text() + "</option>");
397 $(contentPointer + " option").removeAttr('selected');
398 $(contentPointer).show("slow");
399 $("#none_acl_returns").hide();
400 $("#none_acl_list").hide();
401 $(linkPointer + " span.loading" + linkPointerPost).hide();
402 return;
405 if (control == "membership") {
406 //Remove, then re-populate, then set size of selection boxes
407 $(contentPointer + " select").empty();
408 counterActive = 0;
409 counterInactive = 0;
410 $(xml).find("active").find("group").each(function(){
411 $(contentPointer + " select:first").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
412 counterActive = counterActive + 1;
414 $(xml).find("inactive").find("group").each(function(){
415 $(contentPointer + " select:last").append("<option value='" + $(this).find("value").text() + "'>" + $(this).find("label").text() + "</option>");
416 counterInactive = counterInactive + 1;
418 $(contentPointer + " option").removeAttr('selected');
419 if (counterActive > counterInactive) {
420 size = counterActive;
422 else {
423 size = counterInactive;
425 if (size > 10) {
426 size = 10;
428 if (counterActive > 0) {
429 //ensure remove the no active group alert
430 $(linkPointer + " span.alert").hide();
434 if (control == "acl" || control == "aco") {
435 //Remove, then re-populate, then set size of selection boxes
436 $(contentPointer + " select").empty();
437 counterActive = 0;
438 counterInactive = 0;
439 $(xml).find("active").find("section").each(function(){
440 $(contentPointer + " select:first").append("<optgroup label='" + $(this).find("name").text() + "'>");
441 counterActive = counterActive + 1;
442 $(this).find("aco").each(function(){
443 $(contentPointer + " select:first").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
444 counterActive = counterActive + 1;
446 $(contentPointer + " select:first").append("</optgroup>");
448 $(xml).find("inactive").find("section").each(function(){
449 $(contentPointer + " select:last").append("<optgroup label='" + $(this).find("name").text() + "'>");
450 counterInactive = counterInactive + 1;
451 $(this).find("aco").each(function(){
452 $(contentPointer + " select:last").append("<option value='" + $(this).find("id").text() + "'>" + $(this).find("title").text() + "</option>");
453 counterInactive = counterInactive + 1;
455 $(contentPointer + " select:last").append("</optgroup>");
457 $(contentPointer + " option").removeAttr('selected');
458 if (counterActive > counterInactive) {
459 size = counterActive;
461 else {
462 size = counterInactive;
464 if (size > 15) {
465 size = 15;
469 //display the selection boxes
470 $(contentPointer + " select").attr('size', size);
471 $(contentPointer).show("slow");
473 if (action == "list") {
474 //Remove Edit link and show Hide link
475 $(linkPointer + " a.link_submit:first").hide();
476 $(linkPointer + " a.link_submit:last").show();
479 //Remove Loading indicator
480 $(linkPointer + " span.loading" + linkPointerPost).hide();
482 //Remove old errors, then display any new errors to user
483 $(errorPointer).empty();
484 $(xml).find("error").each(function(){
485 $(errorPointer).append("<span class='alert'>" + $(this).text() + "<br /></span>");
486 $(errorPointer).show();
489 beforeSend: function(){
490 //Show Loading indicator
491 $(linkPointer + " span.loading" + linkPointerPost).show();
493 error: function(){
494 //Remove Loading indicator and show errors
495 $(linkPointer + " span.loading" + linkPointerPost).hide();
496 $(errorPointer).empty();
497 $(errorPointer).append("<span class='alert'>" + <?php echo xlj('ERROR, unable to collect data from server'); ?> + "<br /></span>");
498 $(errorPointer).show();
501 return;
504 </script>
505 <?php
506 $arrOeUiSettings = array(
507 'heading_title' => xl('Access Control List Administration'),
508 'include_patient_name' => false,//include only if appropriate
509 'expandable' => false,
510 'expandable_files' => array(),//all file names need suffix _xpd
511 'action' => "link",//conceal, reveal, search, reset, link or back
512 'action_title' => "",
513 'action_href' => "../../gacl/admin/acl_admin.php",//only for actions - reset, link or back
514 'show_help_icon' => true,
515 'help_file_name' => "adminacl_help.php"
517 $oemr_ui = new OemrUI($arrOeUiSettings);
519 </head>
520 <body id="adminacl" class="body_top">
521 <div id="container_div" class="<?php echo $oemr_ui->oeContainer();?>">
522 <div class="row">
523 <div class="col-sm-12">
524 <?php echo $oemr_ui->pageHeading() . "\r\n"; ?>
525 </div>
526 </div>
527 <div class="row">
528 <div class="col-12">
529 <div id='membership_edit'>
530 <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>
531 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
532 <div id='membership_error'></div>
533 <div class="section" id='membership' style='display: none;'></div>
534 </div>
535 <div id='acl_edit'>
536 <div style='margin-bottom:5px'>
537 <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>
538 </div>
539 <a class='link_submit btn btn-secondary 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>
540 <a class='link_submit btn btn-secondary btn-cancel' href='no_javascript' id='none_acl_list' style='display: none;' title='<?php echo xla('Remove Group'); ?>'><?php echo xlt('Remove Group'); ?></a>
541 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
542 <div id='acl_error'></div>
543 <div id='div_acl_add_form' class='section' style='display: none;'>
544 <form action="no_javascript" class="clearfix" id="acl_add_form" method="post" name="acl_add_form">
545 <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>
546 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
547 <div class='col-12'>
548 <div class='row'>
549 <div class='col-4'>
550 <label class="control-label" for="title_field"><?php echo xlt('Title'); ?>:</label>
551 <input id="title_field" type="text" class="form-control">
552 </div>
553 <div class='col-6'>
554 <br /><span class="alert" id="title_error"></span>
555 </div>
556 </div>
557 <div class='row'>
558 <div class='col-4'>
559 <label class="control-label" for="id_field"><?php echo xlt('Identifier(one word)'); ?>:</label>
560 <input id="id_field" type="text" class="form-control">
561 </div>
562 <div class='col-6'>
563 <br /><span class="alert" id="identifier_error"></span>
564 </div>
565 </div>
566 <div class='row'>
567 <div class='col-4'>
568 <label class="control-label" for="return_field"><?php echo xlt('Return Value'); ?>:</label>
569 <select id="return_field" class="form-control">
570 </select>
571 </div>
572 <div class='col-6'>
573 <br /><span class="alert" id="return_error"></span>
574 </div>
575 </div>
576 <div class='row'>
577 <div class='col-4'>
578 <label class="control-label" for="desc_field"><?php echo xlt('Description'); ?>:</label>
579 <input id="desc_field" type="text" class="form-control">
580 </div>
581 <div class='col-6'>
582 <br /><span class="alert" id="description_error"></span>
583 </div>
584 </div>
585 <div class="row">
586 <div class="col-12" style="padding: 15px 18px">
587 <button type="submit" class="button_acl_add btn btn-secondary" id="button_acl_add_submit" title='<?php echo xla('Add Group'); ?>'><?php echo xlt('Add Group'); ?></button>
588 <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>
589 <button type="reset" class="button_acl_add btn btn-link btn-cancel" id="button_acl_add_cancel" title='<?php echo xla('Cancel'); ?>'><?php echo xlt('Cancel'); ?></button>
590 </div>
591 </div>
592 </div>
593 </form>
594 </div>
595 <div id='div_acl_remove_form' class='section' style='display: none;'>
596 <form action="no_javascript" class="clearfix" id="acl_remove_form" method="post" name="acl_remove_form">
597 <div style='margin-bottom:5px'>
598 <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>
599 <span class='loading' style='display: none;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo xlt('LOADING'); ?>...</span>
600 </div>
601 <div class='col-12'>
602 <div class='row'>
603 <div class='col-4'>
604 <label class="control-label" for="acl_field"><?php echo xlt('Group'); ?>:</label>
605 <select id="acl_field" class='form-control'>
606 </select>
607 </div>
608 <div class='col-6'>
609 <br /><span class="alert" id="aclTitle_error"></span>
610 </div>
611 </div>
612 <div class='row'>
613 <div class='col-12'>
614 <br />
615 <span class='text'><?php echo xlt('Do you really want to delete this group'); ?>?</span>
616 </div>
617 </div>
618 <div class='row'>
619 <div class='col-4'>
620 <br />
621 <input type="radio" name="acl_remove_confirm" value="yes"><span class='text'><?php echo xlt('Yes'); ?></span>
622 <input type="radio" name="acl_remove_confirm" value="no" checked><span class='text'><?php echo xlt('No'); ?></span>
623 </div>
624 <div class='col-6'>
625 <br /><span class="alert" id="remove_confirm_error"></span>
626 </div>
627 </div>
628 <div class="row">
629 <div class="col-12" style="padding:15px 18px">
630 <button type="submit" class="button_acl_remove btn btn-secondary" id="button_acl_remove_delete" title='<?php echo xla('Delete Group'); ?>'><?php echo xlt('Delete Group'); ?></button>
631 <button type="reset" class="button_acl_remove btn btn-link btn-cancel" id="button_acl_remove_cancel" title='<?php echo xla('Cancel'); ?>'><?php echo xlt('Cancel'); ?></button>
632 </div>
633 </div>
634 </div>
635 </form>
636 </div>
637 <div class="section hideaway" id='acl' style='display: none;'></div>
638 </div>
639 </div>
640 </div>
641 </div><!--end of container div-->
642 <br />
643 <?php $oemr_ui->oeBelowContainerDiv();?>
644 </body>
645 </html>