Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbarkowsky committed Dec 11, 2014
1 parent 158e339 commit ee3f058
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions forms/FormCheckBoxExtended.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ class FormCheckBoxExtended extends \Widget

protected $blnSubmitInput = true;


protected $strTemplate = 'form_widget';


protected $arrOptions = array();


Expand Down Expand Up @@ -128,7 +130,7 @@ public function generate()
{
$evp_link_target = LINK_NEW_WINDOW_BLUR;
}

// Embeded link
$evp_link_embed = explode('%s', $this->checkbox_extended_embed);

Expand All @@ -147,7 +149,16 @@ public function generate()
{
$href = $this->checkbox_extended_url;
}


if (!strlen($this->checkbox_extended_url) && !strlen($this->checkbox_extended_singleSRC))
{
$strCheckboxLink = sprintf('%s%s%s', $evp_link_embed[0], $this->checkbox_extended_title, $evp_link_embed[1]);
}
else
{
$strCheckboxLink = sprintf('%s<a href="%s" title="%s"%s>%s</a>%s', $evp_link_embed[0], $href, $this->checkbox_extended_title, $evp_link_target, $this->checkbox_extended_title, $evp_link_embed[1]);
}

$strOptions = sprintf('<span><input type="checkbox" name="%s" id="opt_%s" class="checkbox" value="%s"%s%s /> <label id="lbl_%s" for="opt_%s">%s</label></span>',
$this->strName,
$this->strId . '_0',
Expand All @@ -156,18 +167,9 @@ public function generate()
$this->getAttributes(),
$this->strId . '_0',
$this->strId . '_0',
sprintf('%s<a href="%s" title="%s"%s>%s</a>%s',
$evp_link_embed[0],
$href,
$this->checkbox_extended_title,
$evp_link_target,
$this->checkbox_extended_title,
$evp_link_embed[1])) . $this->addSubmit();

return sprintf('<div id="ctrl_%s" class="checkbox_container%s">%s</div>',
$this->strId,
(strlen($this->strClass) ? ' ' . $this->strClass : ''),
$strOptions) . $this->addSubmit();
$strCheckboxLink) . $this->addSubmit();

return sprintf('<div id="ctrl_%s" class="checkbox_container%s">%s</div>', $this->strId, (strlen($this->strClass) ? ' ' . $this->strClass : ''), $strOptions) . $this->addSubmit();
}


Expand All @@ -176,6 +178,11 @@ public function generate()
*/
private function buildDownload($singleSRC)
{
if (!strlen($singleSRC))
{
return '';
}

$objFile = \FilesModel::findByUuid($singleSRC);

if ($objFile === null)
Expand Down

0 comments on commit ee3f058

Please sign in to comment.