2 /* +-----------------------------------------------------------------------------+
3 * OpenEMR - Open Source Electronic Medical Record
4 * Copyright (C) 2013 Z&H Consultancy Services Private Limited <sam@zhservices.com>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * 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 Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 * @author Jacob T.Paul <jacob@zhservices.com>
19 * @author Vipin Kumar <vipink@zhservices.com>
20 * @author Remesh Babu S <remesh@zhservices.com>
21 * +------------------------------------------------------------------------------+
24 $listener = $this->listenerObject;
25 $hangers = $this->hangers;
26 $Hooks = $this->Hooks;
27 $hookObj = $this->hookObject;
28 $mod_id = $this->mod_id;
29 $title = $listener->z_xlt('Module Installer');
30 $this->headTitle($title);
31 $baseModuleDir = $GLOBALS['baseModDir'];
32 $customDir = $GLOBALS['customModDir'];
33 $zendModDir = $GLOBALS['zendModDir'];
34 $confirmationMSG = $listener->z_xlt("Do you really want to delete?");
35 if(count($TabSettings)>0){
38 <div class="easyui-tabs" id="tab<?php echo $this->escapeHtml($mod_id); ?>" style="width:950px;height:auto;">
40 if($TabSettings[1]['cnt'] > 0){
42 <div title="<?php echo $listener->z_xla('Access Control');?>" id="tab_acl<?php echo $this->escapeHtml($mod_id); ?>" iconCls="icon-acl">
43 <div class="easyui-accordion" id="configaccord<?php echo $this->escapeHtml($mod_id); ?>" style="width:930px;height:auto;align:center;margin:5px">
44 <iframe src="<?php echo $GLOBALS['webroot']; ?>/interface/modules/zend_modules/public/acl/acltab?module_id=<?php echo $this->escapeHtml($this->mod_id); ?>" style="width:100%;height: 700px;overflow: hidden;" frameborder="0"></iframe>
50 <div class="easyui-accordion" id="configaccord<?php echo $this->escapeHtml($mod_id); ?>" style="width:930px;height:auto;align:center;margin:5px"></div>
53 if($TabSettings[2]['cnt'] > 0){
55 <div title="<?php echo $listener->z_xla('Preference');?>" id="tab_preference<?php echo $this->escapeHtml($mod_id); ?>" iconCls="icon-preference">
56 <!-- For Future Development-->
60 if($TabSettings[3]['cnt'] > 0){
63 <div title="<?php echo $listener->z_xla('Hooks');?>" id="tab_hooks<?php echo $this->escapeHtml($mod_id); ?>" iconCls="icon-plug" >
66 <td colspan="2" align="center" style="font-size:14px;font-weight:bold">
67 <?php echo $listener->z_xlt("Manage Hooks");?>
72 <form name="hooksform<?php echo $this->escapeHtml($mod_id); ?>" id="hooksform<?php echo $this->escapeHtml($mod_id); ?>">
75 <td style="width: 150px"><span id="hook_response<?php echo $this->escapeHtml($mod_id); ?>"> </span></td>
78 foreach($hangers as $value => $title){
80 <td align="center"><?php echo $listener->z_xlt($title);?></td>
88 foreach($Hooks as $obj_hooks){
91 <td><?php echo $listener->z_xlt($obj_hooks['title']);?></td>
93 foreach($hangers as $value => $title){
95 if($hookObj->getHookStatus($mod_id,$obj_hooks['name'],$value) == "1"){
96 $checked = "checked=\"checked\"";
100 <input type="checkbox" <?php echo $this->escapeHtml($checked); ?>
101 name="hook_hanger[<?php echo $this->escapeHtml($obj_hooks['name']);?>][<?php echo $this->escapeHtml($value); ?>]"
102 id="hook_hanger_<?php echo $this->escapeHtml($obj_hooks['name']);?>_<?php echo $this->escapeHtml($value); ?>"
103 value="<?php echo $this->escapeHtml($obj_hooks['name']).",".$this->escapeHtml($value);?>"
104 onclick="javascript:SaveMe('hooksform',<?php echo $this->escapeHtml($mod_id);?>)" >
115 <td colspan="<?php echo $this->escapeHtml($hanger_count)+1; ?>" align="center" style="font-size:14px">
116 <?php echo $listener->z_xlt('No Hooks Available in this Module'); ?>
123 <input type="hidden" name="mod_id" value="<?php echo $this->escapeHtml($mod_id);?>">
129 <!-- Start Configuration Tab -->
130 <div title="<?php echo $listener->z_xla('Settings');?>" id="tab_config<?php echo $this->escapeHtml($mod_id); ?>" iconCls="icon-preference">
132 if(is_object($this->settings) && count($this->settings) > 0){
134 $form = $this->settings;
135 if(method_exists($form,'prepare')){
138 <form name="configform" id="configform<?php echo $this->escapeHtml($mod_id); ?>">
139 <table style="width:100%; margin: 0px; height: 140px">
143 foreach ($form as $element) :
146 <td width='15%'><?php echo $listener->z_xlt($element->getLabel()) ?></td>
147 <td><?php echo $this->formElement($element->setValue($configuration[$element->getAttribute('id')]['field_value'])); ?></td>
156 <a href="#" class="easyui-linkbutton" iconCls="icon-save"
157 plain="true" onclick="javascript:saveConfig('configform',<?php echo $this->escapeHtml($mod_id);?>)">
158 <?php echo $listener->z_xlt('Save'); ?>
160 <span id='target<?php echo $this->escapeHtml($mod_id); ?>' style="color: #996600" ></span>
164 <input type="hidden" name="module_id" value="<?php echo $this->escapeHtml($mod_id);?>">
169 echo $listener->z_xlt('No Settings avaliable in this module');
173 echo $listener->z_xlt('No Settings avaliable in this module');
177 <!-- End Configuration Tab -->
181 <?php if (count($setup) > 0) { ?>
182 <div title="<?php echo $listener->z_xla($setup['title']);?>" style="width:800px;height:auto;"
183 id="tab_config<?php echo $this->escapeHtml($mod_id); ?>"
184 iconCls="icon-setup">
185 <iframe scrolling="yes" frameborder="0"
186 src="<?php echo $this->basePath() . '/' . $this->escapeHtml($setup[module_dir]); ?>/setup/index"
187 style="width:100%;height:400px;">
193 } else if (count($setup) > 0) { ?>
194 <div class="easyui-tabs" id="tab<?php echo $this->escapeHtml($mod_id); ?>" style="width:800px;height:auto;">
195 <div title="<?php echo $listener->z_xla($setup['title']);?>"
196 id="tab_config<?php echo $mod_id; ?>"
197 iconCls="icon-setup">
198 <iframe scrolling="yes" frameborder="0"
199 src="<?php echo $this->basePath() . '/' . $this->escapeHtml($setup[module_dir]); ?>/setup/index"
200 style="width:100%;height:400px;">
207 <div class="easyui-tabs" id="tab<?php echo $this->escapeHtml($mod_id); ?>" style="width:800px;height:auto;">
208 <?php echo $listener->z_xlt('No Configuration Defined for this Module');?>