Changeset 11012

Show
Ignore:
Timestamp:
01/18/11 16:35:40 (2 years ago)
Author:
p_lindheimer
Message:

adds range and emptyok info to tooltip re #4740

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/libraries/freepbx_conf.class.php

    r11010 r11012  
    569569 
    570570    case CONF_TYPE_INT: 
    571       $ret = $emptyok && $value == '' ? '' : (int) $value; 
    572  
    573       if ($options != '' && $ret != '') { 
     571      $ret = $emptyok && (string) $value === '' ? '' : (int) $value; 
     572 
     573      if ($options != '' && (string) $ret !== '') { 
    574574        $range = is_array($options) ? $options : explode(',',$options); 
    575575        switch ($ret) { 
  • modules/branches/2.9/core/page.advancedsettings.php

    r11010 r11012  
    7474    $dv = $c['type'] == CONF_TYPE_BOOL ? ($c['defaultval'] ? _("True") : _("False")) : $c['defaultval']; 
    7575    $default_val = $dv == '' ? _("No Default Provided") : sprintf(_("Default Value: %s"),$dv); 
     76    if ($c['emptyok'] && $c['type'] != CONF_TYPE_BOOL && $c['type'] != CONF_TYPE_SELECT) { 
     77      $default_val.= ', '._("field can be left blank"); 
     78    } 
     79    if ($c['type'] == CONF_TYPE_INT && $c['options']) { 
     80      $range = explode(',',$c['options']); 
     81      $default_val .= '<br />'.sprintf(_("Acceptable Values: %s - %s"),$range[0],$range[1]); 
     82    } 
    7683    echo '<tr><td><a href="javascript:void(null)" class="info">'.$c['keyword'].'<span>'.$c['description'].'<br /><br >'.$default_val.'</span></a></td>'; 
    7784    echo '<td>';