Show
Ignore:
Timestamp:
07/08/09 02:35:59 (3 years ago)
Author:
john
Message:

bug fixes / updates

Location:
trunk/trax/vendor/trax/action_view/helpers
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php

    r308 r316  
    173173            $header_sub_message = isset($options['header_sub_message']) ? 
    174174                $options['header_sub_message'] : "There were problems with the following fields:"; 
    175                  
     175 
    176176            return $this->content_tag("div", 
    177177                $this->content_tag( 
  • trunk/trax/vendor/trax/action_view/helpers/date_helper.php

    r230 r316  
    15911591    $date_helper = new DateHelper($object, $attribute); 
    15921592    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 */ 
     1606function select_year() { 
     1607    $date_helper = new DateHelper(); 
     1608    $args = func_get_args(); 
     1609    return call_user_func_array(array($date_helper, 'select_year'), $args);     
    15931610} 
    15941611 
  • trunk/trax/vendor/trax/action_view/helpers/form_helper.php

    r311 r316  
    367367 * is set to 0 which is convenient for boolean values. Usually unchecked checkboxes don't post anything. 
    368368 * We work around this problem by adding a hidden value with the same name as the checkbox. 
    369 # 
     369 * 
    370370 * Example: Imagine that $post->validated is 1: 
    371371 *   check_box("post", "validated"); 
     
    373373 *   <input type="checkbox" id="post_validate" name="post[validated] value="1" checked="checked" /> 
    374374 *   <input name="post[validated]" type="hidden" value="0" /> 
    375 # 
     375 * 
    376376 * Example: Imagine that $puppy->gooddog is no: 
    377377 *   check_box("puppy", "gooddog", array(), "yes", "no"); 
  • trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php

    r308 r316  
    202202    function to_select_tag($choices, $options, $html_options) { 
    203203        $html_options = $this->add_default_name_and_id($html_options); 
    204         $value = $this->value(); 
     204        $value = isset($options['selected']) ? $options['selected'] : $this->value(); 
    205205        return $this->error_wrapping( 
    206206            $this->content_tag(