Changeset 316 for trunk/trax/vendor/trax/action_view
- Timestamp:
- 07/08/09 02:35:59 (3 years ago)
- Location:
- trunk/trax/vendor/trax/action_view/helpers
- Files:
-
- 4 modified
-
active_record_helper.php (modified) (1 diff)
-
date_helper.php (modified) (1 diff)
-
form_helper.php (modified) (2 diffs)
-
form_options_helper.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php
r308 r316 173 173 $header_sub_message = isset($options['header_sub_message']) ? 174 174 $options['header_sub_message'] : "There were problems with the following fields:"; 175 175 176 176 return $this->content_tag("div", 177 177 $this->content_tag( -
trunk/trax/vendor/trax/action_view/helpers/date_helper.php
r230 r316 1591 1591 $date_helper = new DateHelper($object, $attribute); 1592 1592 return $date_helper->expiration_date_select($options); 1593 } 1594 1595 /** 1596 * Make a new DateHelper object and call its select_year() method 1597 * 1598 * Generate HTML/XML for year selector pull-down menu using only 1599 * explicit month specification.<br /> 1600 * <b>NB:</b> An attempt to get value of an attribute will always 1601 * fail because there is no way to set 1602 * {@link DateHelper::object_name} and 1603 * {@link DateHelper::attribute_name}. 1604 * @uses DateHelper::select_year() 1605 */ 1606 function select_year() { 1607 $date_helper = new DateHelper(); 1608 $args = func_get_args(); 1609 return call_user_func_array(array($date_helper, 'select_year'), $args); 1593 1610 } 1594 1611 -
trunk/trax/vendor/trax/action_view/helpers/form_helper.php
r311 r316 367 367 * is set to 0 which is convenient for boolean values. Usually unchecked checkboxes don't post anything. 368 368 * We work around this problem by adding a hidden value with the same name as the checkbox. 369 # 369 * 370 370 * Example: Imagine that $post->validated is 1: 371 371 * check_box("post", "validated"); … … 373 373 * <input type="checkbox" id="post_validate" name="post[validated] value="1" checked="checked" /> 374 374 * <input name="post[validated]" type="hidden" value="0" /> 375 # 375 * 376 376 * Example: Imagine that $puppy->gooddog is no: 377 377 * check_box("puppy", "gooddog", array(), "yes", "no"); -
trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php
r308 r316 202 202 function to_select_tag($choices, $options, $html_options) { 203 203 $html_options = $this->add_default_name_and_id($html_options); 204 $value = $this->value();204 $value = isset($options['selected']) ? $options['selected'] : $this->value(); 205 205 return $this->error_wrapping( 206 206 $this->content_tag(
