?> </span> <span class="end_col"><input id="fld_value" type="text" name="fld_value" class="field short" value="<?php echo out($criteria->getRequirements()); ?> "></span> </p> <!-- age unit --> <p class="row"> <span class="left_col colhead req" data-fld="fld_timeunit"><?php echo out(xl('Unit')); ?> </span> <span class="end_col"> <?php echo timeunit_select(array("context" => "rule_age_intervals", "target" => "fld_target_interval_type", "name" => "fld_target_interval_type", "value" => $criteria->timeUnit)); ?> </span> </p> <input type="hidden" name="fld_type" value="<?php echo out($criteria->type); ?> "/> <br/> <!-- optional/required and inclusion/exclusion fields --> <?php echo common_fields(array("criteria" => $criteria));
function common_fields($args) { ?> <?php $criteria = $args['criteria']; ?> <p class="row"> <span class="left_col colhead req" data-field="fld_optional"><?php echo out(xl('Optional')); ?> </span> <span class="end_col"> <input id="fld_optional" type="radio" name="fld_optional" class="field" value="yes" <?php echo $criteria->optional ? "CHECKED" : ""; ?> > <?php echo out(xl('Yes')); ?> <input id="fld_optional" type="radio" name="fld_optional" class="field" value="no" <?php echo !$criteria->optional ? "CHECKED" : ""; ?> > <?php echo out(xl('No')); ?> </span> </p> <p class="row"> <span class="left_col colhead req" data-field="fld_inclusion"><?php echo out(xl('Inclusion')); ?> </span> <span class="end_col"> <input id="fld_inclusion" type="radio" name="fld_inclusion" class="field" value="yes" <?php echo $criteria->inclusion ? "CHECKED" : ""; ?> > <?php echo out(xl('Yes')); ?> <input id="fld_inclusion" type="radio" name="fld_inclusion" class="field" value="no" <?php echo !$criteria->inclusion ? "CHECKED" : ""; ?> > <?php echo out(xl('No')); ?> </span> </p> <?php if ($criteria->interval && $criteria->intervalType) { ?> <p class="row"> <span class="left_col colhead req" data-field="fld_target_interval"><?php echo out(xl('Interval')); ?> </span> <span class="end_col"> <input data-grp-tgt="flt_target_interval" class="field short" type="text" name="fld_target_interval" value="<?php echo out(xl($criteria->interval)); ?> " /> <?php echo timeunit_select(array("context" => "rule_target_intervals", "target" => "fld_target_interval_", "name" => "fld_target_interval_type", "value" => $criteria->intervalType)); ?> </span> </p> <?php } }
type="text" name="<?php echo out($type->code); ?> -<?php echo out($range->code); ?> " value="<?php echo is_null($detail) ? "" : out($detail->amount); ?> " /> </span> <span class="end_col"> <?php echo timeunit_select(array("context" => "rule_reminder_intervals", "target" => $type->code, "name" => $type->code . "-" . $range->code . "-timeunit", "value" => $detail->timeUnit)); ?> </span> </p> <?php $first = false; ?> <?php } ?> <?php } ?> </div>