activate = false; parent::__construct($form); } protected function getInput() { if (! $this->activate) { $html = \Mobilemenuck\Helper::renderProMessage(); return $html; } $doc = JFactory::getDocument(); $doc->addStylesheet(MOBILEMENUCK_MEDIA_URI . '/assets/ckbox.css'); $doc->addScript(MOBILEMENUCK_MEDIA_URI . '/assets/ckbox.js'); // Initialize some field attributes. $js = 'function ckMobilemenuSelectModule(id, name, close) { if (!close && close != false) close = true; jQuery("#' . $this->id . '").val(id).trigger(\'change\'); jQuery("#' . $this->id . 'name").val(name); if (close) CKBox.close(); } function ckMobilemenuUpdateModule(nothing, id, name) { ckMobilemenuSelectModule(id, name, false); }'; $doc->addScriptDeclaration($js); $icon = $this->element['icon']; $suffix = $this->element['suffix']; $size = $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $maxLength = $this->element['maxlength'] ? ' maxlength="' . (int) $this->element['maxlength'] . '"' : ''; $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : 'class="form-control"'; $readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : ''; $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $defautlwidth = $suffix ? '128px' : '150px'; $styles = ' style="width:'.$defautlwidth.';'.$this->element['styles'].'"'; $module = \Mobilemenuck\Helper::getModuleById($this->value); $title = isset($module->title) ? $module->title : ''; // Initialize JavaScript field attributes. $onchange = $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; $html = $icon ? '