6.0.0-beta1
11/9/25

[#1241] No display for assign variable in Form
Summary No display for assign variable in Form
Queue Horde Framework Packages
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester allen.zhao (at) camilion (dot) com
Created 01/24/2005 (7594 days ago)
Due
Updated 01/24/2005 (7594 days ago)
Assigned
Resolved 01/24/2005 (7594 days ago)
Milestone
Patch No

History
01/24/2005 11:35:09 PM Jan Schneider Comment #2
State ⇒ Rejected
Reply to this comment
The assign field is not really intended to be "displayable". And your 
patch doesn't make sense because it shows a form field. If at all, it 
should show a table with assignments or something similar.
01/24/2005 09:27:57 PM allen (dot) zhao (at) camilion (dot) com Comment #1
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ No display for assign variable in Form
Queue ⇒ Horde Framework Packages
Reply to this comment
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 = '<!--a75c305b1c0a6022--><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;

     }




Saved Queries