1 <?php
require_once($GLOBALS["srcdir"] . "/../interface/super/rules/controllers/edit/helper/common.php"); ?
>
2 <?php
$rule = $viewBean->rule ?
>
3 <?php
$intervals = $rule->reminderIntervals ?
>
4 <script language
="javascript" src
="<?php js_src('edit.js') ?>"></script
>
5 <script type
="text/javascript">
6 var edit
= new rule_edit( {});
10 <table
class="header">
12 <td
class="title"><?php
echo out(xl('Rule Edit')); ?
></td
>
14 <a href
="index.php?action=detail!view&id=<?php echo out($rule->id); ?>" class="iframe_medium css_button" onclick
="top.restoreSession()">
15 <span
><?php
echo out(xl('Cancel')); ?
></span
>
17 <a href
="javascript:;" class="iframe_medium css_button" id
="btn_save" onclick
="top.restoreSession()"><span
><?php
echo out(xl('Save')); ?
></span
></a
>
22 <div
class="rule_detail edit text">
23 <p
class="header"><?php
echo out(xl('Reminder intervals')); ?
> </p
>
25 <form action
="index.php?action=edit!submit_intervals" method
="post" id
="frm_submit" onsubmit
="return top.restoreSession()">
26 <input type
="hidden" name
="id" value
="<?php echo out($rule->id); ?>"/>
28 <div
class="intervals">
30 <span
class="left_col colhead"><u
><?php
echo out(xl('Type')); ?
></u
></span
>
31 <span
class="end_col colhead"><u
><?php
echo out(xl('Detail')); ?
></u
></span
>
34 <?php
foreach (ReminderIntervalType
::values() as $type) { ?
>
35 <?php
foreach (ReminderIntervalRange
::values() as $range) { ?
>
37 $detail = $intervals->getDetailFor($type, $range); ?
>
39 <span
class="left_col <?php echo $first ? "req
" : ""?>" data
-grp
="<?php echo out($type->code); ?>"><?php
echo out($type->lbl
); ?
></span
>
40 <span
class="mid_col"><?php
echo out(xl($range->lbl
)); ?
></span
>
41 <span
class="mid_col">
42 <input data
-grp
-tgt
="<?php echo out($type->code) ?>"
44 name
="<?php echo out($type->code); ?>-<?php echo out($range->code); ?>"
45 value
="<?php echo is_null($detail) ? "" : out($detail->amount); ?>" />
47 <span
class="end_col">
48 <?php
echo timeunit_select(array( "context"=>"rule_reminder_intervals", "target"=>$type->code
, "name"=>$type->code
."-".$range->code
."-timeunit", "value" => $detail->timeUnit
)); ?
>
51 <?php
$first = false; ?
>
61 <div id
="required_msg" class="small">
62 <span
class="required">*</span
><?php
echo out(xl('Required fields')); ?
>