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.
9 <?php
$action = $viewBean->action?
>
10 <?php
$rule = $viewBean->rule?
>
12 <script language
="javascript" src
="<?php js_src('edit.js') ?>"></script
>
13 <script language
="javascript" src
="<?php js_src('bucket.js') ?>"></script
>
14 <script type
="text/javascript">
15 var edit
= new rule_edit( {});
18 var bucket
= new bucket( {} );
22 <table
class="header">
24 <td
class="title"><?php
echo out( xl( 'Rule Edit' ) ); ?
></td
>
26 <a href
="index.php?action=detail!view&id=<?php echo $action->id ?>" class="iframe_medium css_button" onclick
="top.restoreSession()">
27 <span
><?php
echo out( xl( 'Cancel' ) ); ?
></span
>
29 <a href
="javascript:;" class="iframe_medium css_button" id
="btn_save" onclick
="top.restoreSession()"><span
><?php
echo out( xl('Save' ) ); ?
></span
></a
>
34 <div
class="rule_detail edit text">
35 <p
class="header"><?php
echo out( xl( 'Action' ) ); ?
> </p
>
37 <form action
="index.php?action=edit!submit_action" method
="post" id
="frm_submit" onsubmit
="return top.restoreSession()">
38 <input type
="hidden" name
="guid" value
="<?php echo out( $action->guid ); ?>"/>
39 <input type
="hidden" name
="group_id" value
="<?php echo out( $action->groupId ); ?>"/>
40 <input type
="hidden" name
="id" value
="<?php echo out( $action->id ); ?>"/>
41 <input type
="hidden" name
="group_id" value
="<?php echo out( $action->groupId ); ?>"/>
43 <!-- custom rules input
-->
46 <?php
echo textfield_row(array("id" => "fld_category_lbl",
47 "name" => "fld_category_lbl",
48 "title" => xl("Category"),
49 "value" => out( $action->getCategoryLabel() ) ) ); ?
>
50 <br
/><a href
="javascript:;" id
="change_category" onclick
="top.restoreSession()">(change
)</a
>
51 <input type
="hidden" id
="fld_category" name
="fld_category" value
="<?php echo out( $action->category ); ?>" />
54 <?php
echo textfield_row(array("id" => "fld_item_lbl",
55 "name" => "fld_item_lbl",
56 "title" => xl("Item"),
57 "value" => out( $action->getItemLabel() ) ) ); ?
>
58 <br
/><a href
="javascript:;" id
="change_item" onclick
="top.restoreSession()">(change
)</a
>
59 <input type
="hidden" id
="fld_item" name
="fld_item" value
="<?php echo out( $action->item ); ?>" />
61 <!-- reminder link
-->
62 <?php
echo textfield_row(array("id" => "fld_link",
64 "title" => xl("Link"),
65 "value" => out( $action->reminderLink
) ) ); ?
>
67 <!-- reminder message
-->
68 <?php
echo textfield_row(array("id" => "fld_message",
69 "name" => "fld_message",
70 "title" => xl("Message"),
71 "value" => out( $action->reminderMessage
) ) ); ?
>
74 <!-- custom rules input
-->
76 <span
class="left_col colhead req" data
-field
="fld_custom_input"><?php
echo out( xl( 'Custom input?' ) ); ?
></span
>
77 <span
class="end_col">
78 <select data
-grp
-tgt
="" type
="dropdown" name
="fld_custom_input" id
="">
79 <option id
="" value
="">--<?php
echo out( xl( 'Select' ) ); ?
>--</option
>
80 <option id
="Yes" value
="yes" <?php
echo $action->customRulesInput ?
"SELECTED" : "" ?
>><?php
echo out( xl( 'Yes' ) ); ?
></option
>
81 <option id
="No" value
="no" <?php
echo !$action->completed ?
"SELECTED" : "" ?
>><?php
echo out( xl( 'No' ) ); ?
></option
>
90 <div id
="required_msg" class="small">
91 <span
class="required">*</span
><?php
echo out( xl( 'Required fields' ) ); ?
>