3 * Edit Layout Properties.
5 * Copyright (C) 2016-2017 Rod Roark <rod@sunsetsystems.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @author Rod Roark <rod@sunsetsystems.com>
20 * @link http://www.open-emr.org
26 require_once("../globals.php");
27 require_once("$srcdir/acl.inc");
28 require_once("$phpgacl_location/gacl_api.class.php");
32 // Check authorization.
33 $thisauth = acl_check('admin', 'super');
35 die(xlt('Not authorized'));
38 $opt_line_no = intval($_GET['lineno']);
42 <?php
html_header_show();?
>
43 <title
><?php
echo xlt("Edit Layout Properties"); ?
></title
>
44 <link rel
="stylesheet" href
='<?php echo $css_header ?>' type
='text/css'>
47 td
{ font
-size
:10pt
; }
50 <script type
="text/javascript" src
="<?php echo $webroot ?>/interface/main/tabs/js/include_opener.js?v=<?php echo $v_js_includes; ?>"></script
>
51 <script type
="text/javascript" src
="../../library/textformat.js?v=<?php echo $v_js_includes; ?>"></script
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js"></script
>
53 <script type
="text/javascript" src
="../../library/dialog.js?v=<?php echo $v_js_includes; ?>"></script
>
55 <script language
="JavaScript">
57 <?php
require($GLOBALS['srcdir'] . "/restoreSession.php"); ?
>
59 var mypcc
= '<?php echo $GLOBALS['phone_country_code
'] ?>';
60 var target
= opener
.document
.forms
[0]['opt[<?php echo $opt_line_no; ?>][notes]'];
62 $
(document
).ready(function () {
64 if (target
.value
.length
) {
66 jobj
= JSON
.parse(target
.value
);
67 $
("#fm_props").find('input,select').each(function() {
68 var fm_prop
= $
(this
).prop('name').slice(5);
69 if ((typeof(jobj
[fm_prop
]) !== 'undefined') && (fm_prop
!== '')) {
70 $
(this
).val(jobj
[fm_prop
]);
75 alert('<?php echo xls('Invalid data
, will be ignored
and replaced
.'); ?>');
80 // Onclick handler for Submit button.
81 function submitProps() {
83 $
("#fm_props").find('input,select').each(function() {
84 var fm_prop
= $
(this
).prop('name').slice(5);
85 if (($
(this
).val() !== '') && (fm_prop
!== '')) {
86 jobj
[fm_prop
] = $
(this
).val();
89 target
.value
= ((Object.keys(jobj
).length
> 0) ? JSON
.stringify(jobj
) : '');
97 <body
class="body_top">
99 <form id
='fm_props' method
='post'>
102 <table border
='0' width
='100%'>
105 <td valign
='top' nowrap
>
106 <?php
echo xlt('Layout Columns'); ?
>
109 <select name
='form_columns'>
111 echo "<option value=''>" . xlt('Default') . " (4)</option>\n";
112 for ($cols = 2; $cols <= 10; ++
$cols) {
114 echo "<option value='$cols'>$cols</option>\n";
123 <td valign
='top' nowrap
>
124 <?php
echo xlt('Font Size'); ?
>
127 <select name
='form_size'>
129 echo "<option value=''>" . xlt('Default') . "</option>\n";
130 for ($size = 5; $size <= 15; ++
$size) {
131 echo "<option value='$size'";
132 echo ">$size</option>\n";
140 <td valign
='top' nowrap
>
141 <?php
echo xlt('Access Control'); ?
>
144 <select name
='form_aco'>
145 <option value
=''></option
>
146 <?php
echo gen_aco_html_options(); ?
>
152 <td valign
='top' nowrap
>
153 <label
for='form_category'><?php
echo xlt('Category'); ?
></label
>
156 <input type
="text" id
='form_category' name
='form_category' size
="40">
163 <input type
='button' value
='<?php echo xla('Submit
'); ?>' onclick
='submitProps()' />
166 <input type
='button' value
='<?php echo xla('Cancel
'); ?>' onclick
='window.close()' />
171 <script language
='JavaScript'>
174 echo " alert('".addslashes($info_msg)."');\n";
175 echo " window.close();\n";