From: <gem...@li...> - 2011-12-05 12:45:05
|
Revision: 340 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=340&view=rev Author: mennodekker Date: 2011-12-05 12:44:59 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Made number of visible options in organization element adjustable Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2011-12-05 11:55:49 UTC (rev 339) +++ trunk/library/classes/Gems/Default/IndexAction.php 2011-12-05 12:44:59 UTC (rev 340) @@ -70,6 +70,15 @@ public $project; /** + * For small numbers of organizations a multiline selectbox will be nice. This + * setting handles how many lines will display at once. Use 1 for the normal + * dropdown selectbox + * + * @var int + */ + protected $organizationMaxLines = 6; + + /** * The default behaviour for showing a lost password button * * @var boolean @@ -191,7 +200,9 @@ $element->setLabel($this->_('Organization')); $element->setMultiOptions($orgs); $element->setRequired(true); - $element->setAttrib('size', max(count($orgs) + 1, 6)); + if ($this->organizationMaxLines > 1) { + $element->setAttrib('size', max(count($orgs) + 1, $this->organizationMaxLines)); + } if (! $this->_request->isPost()) { $element->setValue($org); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |