[Tickets #1241] NEW: No display for assign variable in Form
bugs at bugs.horde.org
bugs at bugs.horde.org
Mon Jan 24 13:27:58 PST 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=1241
-----------------------------------------------------------------------
Ticket | 1241
Created By | allen.zhao at camilion.com
Summary | No display for assign variable in Form
Queue | Horde Framework Packages
State | New
Priority | 1. Low
Type | Enhancement
Owners |
-----------------------------------------------------------------------
allen.zhao at camilion.com (2005-01-24 13:27) wrote:
I am trying to use assign. I found that assign has no related display
function. I simply add one in Horde/UI/VarRenderer/html.php:
function _renderVarDisplay_assign(&$form, &$var, &$vars)
{
global $registry;
Horde::addScriptFile('form_assign.js', 'horde', true);
$name = $var->getVarName();
$fname = $form->getName() . '.' . $name;
$size = $var->type->getSize();
$width = $var->type->getWidth();
$lhdr = (bool) $var->type->getHeader(0);
$rhdr = (bool) $var->type->getHeader(1);
$this->_addOnLoadJavascript('Horde_Form_Assign.setField(\'' . $fname
. '\');');
$html = '<table><tr><td>' .
'<input type="hidden" name="' . $name . '__values" />' .
sprintf('<select name="%s__left" multiple="multiple" size="%d"
style="width:%s">',
$name, $size, $width
) .
$var->type->getOptions(0, $fname) .
'</select></td><td>' .
'</td><td>' .
sprintf('<select name="%s__right" multiple="multiple" size="%d"
style="width:%s">',
$name, $size, $width
) .
$var->type->getOptions(1, $fname) .
'</select></td></tr></table>';
return $html;
}
More information about the bugs
mailing list