2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>
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( {});
16 <table
class="header">
18 <td
class="title"><?php
echo $rule->id ?
out( xl( 'Rule Edit' ) ) : out( xl( 'Rule Add' ) ); ?
></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
>
23 <a href
="javascript:;" class="iframe_medium css_button" id
="btn_save" onclick
="top.restoreSession()"><span
><?php
echo out( xl( 'Save' ) ); ?
></span
></a
>
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 ); ?>"/>
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
>
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
); ?
>
55 <div id
="required_msg" class="small">
56 <span
class="required">*</span
><?php
echo out( xl( 'Required fields' ) ); ?
>