Changeset 15254
- Timestamp:
- 02/26/08 13:08:07 (7 months ago)
- Files:
-
- trunk/midcom/midcom.helper.datamanager2/QuickForm_rules/date.php (added)
- trunk/midcom/midcom.helper.datamanager2/formmanager.php (modified) (2 diffs)
- trunk/midcom/midcom.helper.datamanager2/widget/jsdate.php (modified) (1 diff)
- trunk/midcom/midcom.helper.datamanager2/widget/simpledate.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.datamanager2/formmanager.php
r15253 r15254 247 247 248 248 $this->widgets[$name]->set_form($this->form); 249 //Load custom QF rules, so that they can be used in widgets' add_element_to_form calls 250 $this->_load_type_qfrules($name); 249 251 $this->widgets[$name]->add_elements_to_form(); 250 252 $this->_add_rules_and_filters($name, $config); … … 676 678 function _add_rules_and_filters($name, $config) 677 679 { 678 $this->_load_type_qfrules($name);679 680 $widget =& $this->widgets[$name]; 680 681 if ($config['readonly']) trunk/midcom/midcom.helper.datamanager2/widget/jsdate.php
r15253 r15254 175 175 176 176 $this->_form->addGroup($elements, $this->name, $this->_translate($this->_field['title']), '', false); 177 178 if($this->_field['required']) 179 { 180 $errmsg = sprintf($this->_l10n->get('field %s is required'), $this->_field['title']); 181 182 $this->_form->addRule($this->name, $errmsg, 'regex', '/^[^0]/'); 183 } 184 $this->_form->addRule($this->name, $this->_translate('validation failed: date'), 'checkjsdate'); 177 185 } 178 186 trunk/midcom/midcom.helper.datamanager2/widget/simpledate.php
r15235 r15254 110 110 $this->_form->addGroupRule($this->name, $errmsg, 'nonzero', null, 3); 111 111 } 112 $this->_form->addRule($this->name, $this->_translate('validation failed: date'), 'checksimpledate'); 112 113 } 113 114
