Changeset 12276

Show
Ignore:
Timestamp:
06/27/11 09:51:07 (2 years ago)
Author:
mbrevda
Message:

make drawselects use html5 forms require attribute by defualt. Goodbye needless js!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/helpers/freepbx_helpers.php

    r12167 r12276  
    3636 *  
    3737 */    
    38 function drawselects($goto,$i,$show_custom=false, $table=true, $nodest_msg='') { 
     38function drawselects($goto,$i,$show_custom=false, $table=true, $nodest_msg='', $required = true) { 
    3939  global $tabindex, $active_modules, $drawselect_destinations, $drawselects_module_hash;  
    4040  $html=$destmod=$errorclass=$errorstyle=''; 
     
    9090  //draw "parent" select box 
    9191  $style=' style="'.(($destmod=='Error')?'background-color:red;':'background-color:white;').'"'; 
    92   $html.='<select name="goto'.$i.'" class="destdropdown" '.$style.' tabindex="'.++$tabindex.'">'; 
     92  $html.='<select name="goto'.$i.'" class="destdropdown" '.$style.' tabindex="'.++$tabindex.'"' 
     93      . ($required ? ' required ' : '') . '>';//html5 validation 
    9394  $html.='<option value="" style="background-color:white;">'.$nodest_msg.'</option>'; 
    9495  foreach($drawselects_module_hash as $mod => $disc){