CDR Module: Incorporated restore session in admin gui scripts.
[openemr.git] / interface / super / rules / controllers / edit / view / summary.php
blobe0ff4805daa7a462576545d9f41f9b01e73e44b6
1 <?php
2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 $rule = $viewBean->rule ?>
10 <script language="javascript" src="<?php js_src('edit.js') ?>"></script>
11 <script type="text/javascript">
12 var edit = new rule_edit( {});
13 edit.init();
14 </script>
16 <table class="header">
17 <tr>
18 <td class="title"><?php echo $rule->id ? out( xl( 'Rule Edit' ) ) : out( xl( 'Rule Add' ) ); ?></td>
19 <td>
20 <a href="index.php?action=detail!view&id=<?php echo out( $rule->id ); ?>" class="iframe_medium css_button" onclick="top.restoreSession()">
21 <span><?php echo out( xl( 'Cancel' ) ); ?></span>
22 </a>
23 <a href="javascript:;" class="iframe_medium css_button" id="btn_save" onclick="top.restoreSession()"><span><?php echo out( xl( 'Save' ) ); ?></span></a>
24 </td>
25 </tr>
26 </table>
28 <div class="rule_detail edit summry text">
29 <p class="header"><?php echo out( xl( 'Summary' ) ); ?> </p>
31 <form action="index.php?action=edit!submit_summary" method="post" id="frm_submit" onsubmit="return top.restoreSession()">
32 <input type="hidden" name="id" value="<?php echo out( $rule->id ); ?>"/>
34 <p class="row">
35 <span class="left_col colhead req" data-fld="fld_title"><?php echo out( xl( 'Title' ) ); ?></span>
36 <span class="end_col"><input type="text" name="fld_title" class="field" id="fld_title" value="<?php echo out( $rule->title ); ?>"></span>
37 </p>
39 <p class="row">
40 <span class="left_col colhead" data-fld="fld_ruleTypes[]"><?php echo out( xl( 'Type' ) ); ?></span>
41 <span class="end_col">
42 <?php foreach ( RuleType::values() as $type ) {?>
43 <input name="fld_ruleTypes[]"
44 value="<?php echo out( $type ); ?>"
45 type="checkbox" <?php echo $rule->hasRuleType(RuleType::from($type)) ? "CHECKED": "" ?>>
46 <?php echo out( RuleType::from($type)->lbl ); ?>
47 <?php } ?>
48 </span>
49 </p>
51 </form>
53 </div>
55 <div id="required_msg" class="small">
56 <span class="required">*</span><?php echo out( xl( 'Required fields' ) ); ?>
57 </div>