mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
Code cleanup
SVN:trunk[5973]
This commit is contained in:
@@ -28,7 +28,17 @@ use Combodo\iTop\Form\Field\SelectObjectField;
|
||||
|
||||
class ConsoleSelectObjectFieldRenderer extends FieldRenderer
|
||||
{
|
||||
public function Render()
|
||||
/**
|
||||
* @return RenderingOutput
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MissingQueryArgument
|
||||
* @throws \MySQLException
|
||||
* @throws \MySQLHasGoneAwayException
|
||||
*/
|
||||
public function Render()
|
||||
{
|
||||
$oOutput = new RenderingOutput();
|
||||
|
||||
@@ -124,13 +134,13 @@ class ConsoleSelectObjectFieldRenderer extends FieldRenderer
|
||||
if (($iCount == 1) && $bMandatory)
|
||||
{
|
||||
// When there is only once choice, select it by default
|
||||
$sSelected = ' checked';
|
||||
$sSelected = 'checked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sSelected = ($value == $iObject) ? ' checked' : '';
|
||||
$sSelected = ($value == $iObject) ? 'checked' : '';
|
||||
}
|
||||
$oOutput->AddHtml("<input type=\"radio\" id=\"{$sId}_{$iObject}\" name=\"radio_$sId\" onChange=\"$('#{$sId}').val(this.value).trigger('change');\" value=\"$iObject\"$sSelected><label class=\"radio\" for=\"{$sId}_{$iObject}\"> ".htmlentities($sLabel, ENT_QUOTES, 'UTF-8')."</label> ");
|
||||
$oOutput->AddHtml("<input type=\"radio\" id=\"{$sId}_{$iObject}\" name=\"radio_$sId\" onChange=\"$('#{$sId}').val(this.value).trigger('change');\" value=\"$iObject\" $sSelected><label class=\"radio\" for=\"{$sId}_{$iObject}\"> ".htmlentities($sLabel, ENT_QUOTES, 'UTF-8')."</label> ");
|
||||
if ($bVertical)
|
||||
{
|
||||
$oOutput->AddHtml("<br>\n");
|
||||
|
||||
Reference in New Issue
Block a user