function updateFromRequest()
 {
     parent::updateFromRequest();
     $category = _post("fld_category");
     $categoryLbl = _post("fld_category_lbl");
     $item = _post("fld_item");
     $itemLbl = _post("fld_item_lbl");
     $completed = _post("fld_completed");
     $frequency = _post("fld_frequency");
     $frequencyComparator = _post("fld_frequency_comparator");
     $this->completed = $completed == 'yes';
     $this->frequency = $frequency;
     $this->frequencyComparator = $frequencyComparator;
     // update labels
     // xxx todo abstract this out to a manager (which may or may not defer to core options handling code)!
     // xxx this belongs more in the rule manager
     $dbLbl = getLabel($category, 'rule_action_category');
     if ($category && $dbLbl != $categoryLbl) {
         // update
         sqlStatement("UPDATE list_options SET title = ? WHERE list_id = 'rule_action_category' AND option_id = ?", array($categoryLbl, $category));
     }
     $dbLbl = getLabel($item, 'rule_action');
     if ($item && $dbLbl != $itemLbl) {
         // update
         sqlStatement("UPDATE list_options SET title = ? WHERE list_id = 'rule_action' AND option_id = ?", array($itemLbl, $item));
     }
     $this->category = $category;
     $this->item = $item;
     $this->itemLbl = $itemLbl;
     $this->categoryLbl = $categoryLbl;
 }
Example #2
0
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $age = _post("fld_value");
     $timeUnit = TimeUnit::from(_post("fld_timeunit"));
     $this->value = $age;
     $this->timeUnit = $timeUnit;
 }
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $value = _post("fld_value");
     $exploded = explode(" ", $value);
     $diagInfo = explode(":", $exploded[0]);
     $this->codeType = $diagInfo[0];
     $this->id = $diagInfo[1];
 }
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $this->table = _post("fld_table");
     $this->column = _post("fld_column");
     $this->value = _post("fld_value");
     $this->valueComparator = _post("fld_value_comparator");
     $this->frequency = _post("fld_frequency");
     $this->frequencyComparator = _post("fld_frequency_comparator");
 }
Example #5
0
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $age = _post("fld_value");
     $timeUnit = TimeUnit::from(_post("fld_timeunit"));
     if ($timeUnit == null) {
         $timeUnit = TimeUnit::from(_post("fld_target_interval_type"));
     }
     $this->value = $age;
     $this->timeUnit = $timeUnit;
 }
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $lifestyle = _post("fld_lifestyle");
     $value = _post("fld_value");
     $matchType = _post("fld_value_type");
     $this->type = $lifestyle;
     if ($matchType == "any") {
         $this->matchValue = null;
     } else {
         $this->matchValue = $value;
     }
 }
Example #7
0
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $sex = _post("fld_sex");
     $this->value = $sex;
 }
 function updateFromRequest()
 {
     parent::updateFromRequest();
     $value = _post("fld_value");
     $this->value = $value;
 }