if ($icon===false) $icon=ICON_ESCAPE; break;
case 'nonajax':
+ case 'download':
$atype = false;
}
}
if ($value == _("Delete")) // Helper during implementation
$icon = ICON_DELETE;
return "<button type='submit' class='editbutton' name='"
- .htmlentities(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B'
+ .html_specials_encode(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B'
)))
."' value='1'" . ($title ? " title='$title'":" title='$value'")
. ($aspect ? " aspect='$aspect'" : '')
function check_value($name)
{
- if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)
- return 0;
- return 1;
+ if (is_array($name)) {
+ $ret = array();
+ foreach($name as $key)
+ $ret[$key] = check_value($key);
+ return $ret;
+ } else
+ return (empty($_POST[$name]) ? 0 : 1);
}
function checkbox($label, $name, $value=null, $submit_on_change=false, $title=false)
if (empty($_POST[$name.'_list'])) // restore refline id
$_POST[$name.'_list'] = $Refs->reflines->find_refline_id(empty($_POST[$name]) ? $init : $_POST[$name], $type);
- if (empty($_POST[$name]) || ($_SERVER['REQUEST_METHOD'] == 'GET')) // initialization
+ if (empty($_POST[$name])) // initialization
{
if (isset($init))
{
}
if (check_ui_refresh($name)) { // call context changed
- $_POST[$name] = $Refs->normalize($init, $type, $context, $_POST[$name.'_list']);
+ $_POST[$name] = $Refs->normalize($_POST[$name], $type, $context, $_POST[$name.'_list']);
$Ajax->addUpdate(true, $name, $_POST[$name]);
}
label_cell($list."<input name='".$name."' "
.(check_edit_access($name) ? '' : 'disabled ')
- ."value='".@$_POST[$name]."' size=10 maxlength=35>");
+ ."value='".@$_POST[$name]."' size=16 maxlength=35>");
}
else // just wildcard ref field (e.g. for global inquires)
{