projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Customer balances reports: further fixes and cleanups.
[fa-stable.git]
/
includes
/
ui
/
ui_input.inc
diff --git
a/includes/ui/ui_input.inc
b/includes/ui/ui_input.inc
index 2a4d75fd308c154c6475b84a440807bd4ff9af9f..7f680eaf8a05d5368174e6c550f7125fdaec30ea 100644
(file)
--- a/
includes/ui/ui_input.inc
+++ b/
includes/ui/ui_input.inc
@@
-159,6
+159,7
@@
function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=fal
if ($icon===false) $icon=ICON_ESCAPE; break;
case 'nonajax':
if ($icon===false) $icon=ICON_ESCAPE; break;
case 'nonajax':
+ case 'download':
$atype = false;
}
}
$atype = false;
}
}
@@
-304,7
+305,7
@@
function button($name, $value, $title=false, $icon=false, $aspect='')
if ($value == _("Delete")) // Helper during implementation
$icon = ICON_DELETE;
return "<button type='submit' class='editbutton' name='"
if ($value == _("Delete")) // Helper during implementation
$icon = ICON_DELETE;
return "<button type='submit' class='editbutton' name='"
- .html
entities
(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'" : '')
)))
."' value='1'" . ($title ? " title='$title'":" title='$value'")
. ($aspect ? " aspect='$aspect'" : '')
@@
-347,9
+348,13
@@
function select_button_cell($name, $value, $title=false)
function check_value($name)
{
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)
}
function checkbox($label, $name, $value=null, $submit_on_change=false, $title=false)
@@
-691,7
+696,7
@@
function date_row($label, $name, $title=null, $check=null, $inc_days=0, $inc_mon
function password_row($label, $name, $value)
{
echo "<tr><td class='label'>$label</td>";
function password_row($label, $name, $value)
{
echo "<tr><td class='label'>$label</td>";
- label_cell("<input type='password' name='$name' size=
20 maxlength=20
value='$value' >");
+ label_cell("<input type='password' name='$name' size=
32 maxlength=32
value='$value' >");
echo "</tr>\n";
}
echo "</tr>\n";
}
@@
-728,7
+733,7
@@
function ref_cells($label, $name, $title=null, $init=null, $params=null, $submit
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.'_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 (isset($init))
{
@@
-740,7
+745,7
@@
function ref_cells($label, $name, $title=null, $init=null, $params=null, $submit
}
if (check_ui_refresh($name)) { // call context changed
}
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]);
}
$Ajax->addUpdate(true, $name, $_POST[$name]);
}
@@
-759,7
+764,7
@@
function ref_cells($label, $name, $title=null, $init=null, $params=null, $submit
label_cell($list."<input name='".$name."' "
.(check_edit_access($name) ? '' : 'disabled ')
label_cell($list."<input name='".$name."' "
.(check_edit_access($name) ? '' : 'disabled ')
- ."value='".@$_POST[$name]."' size=1
0
maxlength=35>");
+ ."value='".@$_POST[$name]."' size=1
6
maxlength=35>");
}
else // just wildcard ref field (e.g. for global inquires)
{
}
else // just wildcard ref field (e.g. for global inquires)
{
@@
-906,7
+911,7
@@
function small_qty_cells($label, $name, $init=null, $params=null, $post_label=nu
//-----------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------
-function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $params="")
+function textarea_cells($label, $name, $value, $cols, $rows, $
max=255, $
title = null, $params="")
{
global $Ajax;
{
global $Ajax;
@@
-917,14
+922,15
@@
function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $par
$value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
echo "<td><textarea name='$name' cols='$cols' rows='$rows'"
.($title ? " title='$title'" : '')
$value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
echo "<td><textarea name='$name' cols='$cols' rows='$rows'"
.($title ? " title='$title'" : '')
+ .($max ? " maxlength=$max" : '')
.">$value</textarea></td>\n";
$Ajax->addUpdate($name, $name, $value);
}
.">$value</textarea></td>\n";
$Ajax->addUpdate($name, $name, $value);
}
-function textarea_row($label, $name, $value, $cols, $rows, $title=null, $params="")
+function textarea_row($label, $name, $value, $cols, $rows, $
max=255, $
title=null, $params="")
{
echo "<tr><td class='label'>$label</td>";
{
echo "<tr><td class='label'>$label</td>";
- textarea_cells(null, $name, $value, $cols, $rows, $title, $params);
+ textarea_cells(null, $name, $value, $cols, $rows, $
max, $
title, $params);
echo "</tr>\n";
}
echo "</tr>\n";
}