Binds the active form widget to the controller
@return void
185029
protected function bindFormWidgetToController()
    {
        $alias = Request::input('formWidgetAlias');
        $type = Request::input('templateType');
        $object = $this->loadTemplate($type, Request::input('templatePath'));
        $widget = $this->makeTemplateFormWidget($type, $object, $alias);

        $widget->bindToController();
    }
561663
protected function InitForm()
    {
        $this->repeater = $this->LoadElement();
        $this->AddCssClassField();
        $this->AddCssIDField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }
1308091
public function run() {

		list($name, $id) = $this->resolveNameID();

		if ($this->hasModel()) {
			if ($this->form) {
				echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions);
			} else {
				echo CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
			}
		} else {
			echo CHtml::checkBox($name, $this->value, $this->htmlOptions);
		}

		$this->registerClientScript($id);
	}
447263
protected function formWidget()
    {
        if (!key_exists(self::DATA_SOURCE_METADATA, array_flip($this->dataSources()))) {
            return $this->form();
        }

        return $this;
    }
641283
public function init()
  {
    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        Html::addCssClass($this->htmlOptions,'widgetadmin');      
        Draggable::begin();
      }
    }
    ob_start();
    ob_implicit_flush(false);
    
    $this->htmlOptions['id']=$this->getId();

    echo Html::beginTag($this->tagName,$this->htmlOptions)."\n";

    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        $this->renderToolbar();
      }
    }

    $this->renderDecoration();
    echo "<div class=\"{$this->contentCssClass}\">\n";

    $this->_beginTag=ob_get_contents();

    ob_clean();
    if(!Yii::$app->user->isGuest)
    {
      if(Yii::$app->user->identity->isAdmin && $this->enableAdmin){
        Draggable::end();
      }
    }
  }
81319
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->resolveId();
        if (isset($this->size)) {
            TbArray::defaultValue('size', $this->size, $this->htmlOptions);
        }
    }
1187057
protected function registerElements() {
		$this->action_mode = self::ACTION_GET;
		
		$validatorBool = new \OWeb\utils\inputManagement\validators\Boolean();
		
		$jsString = new \OWeb\utils\inputManagement\validators\JsString();
		
		$this->setAction('refresh');
		
		$active = new \Controller\OWeb\Helpers\Form\Elements\Text();
		$active->init();
		$active->setName('active');
		$active->setTitle('Active');
		$active->setDescription("Which panel is currently open.");
		$active->addValidator(new \OWeb\utils\inputManagement\validators\Integer());
		$active->addValidator(new \OWeb\utils\inputManagement\validators\CanBeEmpty());
		$active->setVal(0);
		$this->addDisplayElement($active);
		
		$animate = new \Controller\OWeb\Helpers\Form\Elements\Text();
		$animate->init();
		$animate->setName('animate');
		$animate->setTitle('Animate');
		$animate->setVal('Animate');
		$animate->addValidator($jsString);
		$animate->setDescription("If and how to animate changing panels.");
		//$this->addDisplayElement($animate);
		
		$collapsible = new \Controller\OWeb\Helpers\Form\Elements\Radio();
		$collapsible->init();
		$collapsible->setName('collapsible');
		$collapsible->setTitle('Collapsible');
		$collapsible->add("true", "true");
		$collapsible->add("false", "false");
		$collapsible->addValidator($validatorBool);
		$collapsible->setVal('true');
		$collapsible->setDescription("hether all the sections can be closed at once. Allows collapsing the active section");
		$this->addDisplayElement($collapsible);
		
		$disabled = new \Controller\OWeb\Helpers\Form\Elements\Radio();
		$disabled->init();
		$disabled->setName('disabled');
		$disabled->setTitle('Disabled');
		$disabled->add("true", "true");
		$disabled->add("false", "false");
		$disabled->addValidator($validatorBool);
		$disabled->setVal('false');
		$disabled->setDescription("Disables the accordion if set to true.");
		$this->addDisplayElement($disabled);
		
		$event = new \Controller\OWeb\Helpers\Form\Elements\Text();
		$event->init();
		$event->setName('event');
		$event->setTitle('Event');
		$event->setVal('click');
		$event->addValidator($jsString);
		$event->setDescription("The event that accordion headers will react to in order to activate the associated panel. Multiple events can be specified, separated by a space.");
		$this->addDisplayElement($event);
		
		$heightStyle = new \Controller\OWeb\Helpers\Form\Elements\Select();
		$heightStyle->init();
		$heightStyle->setName('heightStyle');
		$heightStyle->setTitle('Height Style');
		$heightStyle->add("Auto", "auto");
		$heightStyle->add("Fill", "fill");
		$heightStyle->add("Content", "content");
		$heightStyle->addValidator($jsString);
		$heightStyle->setVal('auto');
		$heightStyle->setDescription("Controls the height of the accordion and each panel.");
		$this->addDisplayElement($heightStyle);
		
		$submit = new \Controller\OWeb\Helpers\Form\Elements\Submit();
		$submit->init();
		$submit->setVal("Refresh");
		$this->addDisplayElement($submit);
	}
447243
void activateWidget() {

        if (m_activationHandlerRegistration != null) {
            m_activationHandlerRegistration.removeHandler();
            m_activationHandlerRegistration = null;
        }
        if ((m_widget != null) && !m_widget.isActive()) {
            m_widget.setActive(true);
            if ((m_defaultValue != null) && (m_defaultValue.trim().length() > 0)) {
                m_widget.setValue(m_defaultValue, true);
            }
            m_handler.updateButtonVisisbility();
            removeStyleName(formCss().emptyValue());
        }
    }
1277855
protected function InitForm()
    {
        $this->submit = $this->LoadElement();
        
        $this->AddNameField();
        $this->AddValueField();
        
        $this->AddCssIDField();
        $this->AddCssClassField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }
122868
protected function InitForm()
    {
        $this->logout = $this->LoadElement();
        $this->AddNextUrlField();
        $this->AddCssIDField();
        $this->AddCssClassField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }
629937
protected function registerBindings()
    {
        foreach ($this->bindings as $concrete => $abstracts) {
            if (!is_array($abstracts)) {
                $this->app->bind($abstracts, $concrete);
                continue;
            }

            $first = array_shift($abstracts);

            $this->app->bind($first, $concrete);

            foreach ($abstracts as $abstract) {
                $this->app->alias($first, $abstract);
            }
        }
    }
1266417
public function actionActivate ()
		{
			if (Yii::$app->request->isAjax)
			{
				$post = Yii::$app->request->post();
				$page = Page::findOne($post[ 'id' ]);
				$page->updateAttributes([ 'active' => $page->active ? 0 : 1 ]);

				echo $page->active;
			}
			Yii::$app->end();
		}
162330
public function run()
    {
        echo Html::beginTag('div', ['class' => 'portlet-input input-inline']);
        echo Html::beginTag('div', ['class' => 'input-icon right']);
        echo Html::tag('i', '', ['class' => 'icon-magnifier']);

        ActiveForm::begin([
            'action' => $this->url,
            'method' => 'get',
        ]);
        echo Html::activeInput('text', $this->searchModel, 'searchField', ['class' => 'form-control input-circle', 'placeholder' => 'search...', 'autofocus' => true]);
        ActiveForm::end();

        echo Html::endTag('div');   // portlet-input input-inline
        echo Html::endTag('div');   // input-icon right
        echo ' ';
        echo Html::a(Html::tag('i', '', ['class' => 'fa fa-refresh']), $this->resetUrl, ['class' => 'btn btn-circle purple btn-sm', 'accesskey' => '',
            'data-toggle' => 'tooltip', 'title' => 'Reset Search',
        ]);
    }
1228080
public function init()
	{
		if(!isset($this->htmlOptions['id']))
			$this->htmlOptions['id']=$this->id;
		else
			$this->id=$this->htmlOptions['id'];

		if($this->stateful)
			echo CHtml::statefulForm($this->action, $this->method, $this->htmlOptions);
		else
			echo CHtml::beginForm($this->action, $this->method, $this->htmlOptions);

		if($this->errorMessageCssClass===null)
			$this->errorMessageCssClass=CHtml::$errorMessageCss;
	}
1244739
public function init()
    {
        TbArray::defaultValue('layout', $this->layout, $this->activeForm);
        TbArray::defaultValue('class', '\TbActiveForm', $this->activeForm);
    }
35156
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);

        TbArray::defaultValue('id', $this->getId(), $this->htmlOptions);
        TbArray::defaultValue('role', 'dialog', $this->htmlOptions);
        TbArray::defaultValue('tabindex', '-1', $this->htmlOptions);

        TbHtml::addCssClass('modal', $this->htmlOptions);
        if ($this->fade) {
            TbHtml::addCssClass('fade', $this->htmlOptions);
        }

        if (is_array($this->footer)) {
            $this->footer = implode('&nbsp;', $this->footer);
        }

        $this->initOptions();
        $this->initEvents();

        echo TbHtml::openTag('div', $this->htmlOptions) . PHP_EOL;
        echo TbHtml::openTag('div', array('class' => 'modal-dialog' . $this->size)) . PHP_EOL;
        echo TbHtml::openTag('div', array('class' => 'modal-content')) . PHP_EOL;
        echo TbHtml::modalHeader($this->header);

        if (!isset($this->content)) {
            ob_start();
        }
    }
1260468
public function sasEditInstance()
    {
        $this->loadStandaloneMode();

        $clazz = $this->getCurrentClass();
		$instance = $this->getCurrentInstance();

		$formContainer = new tao_actions_form_Instance($clazz, $instance);
		$myForm = $formContainer->getForm();

		if($myForm->isSubmited()){
			if($myForm->isValid()){
				$binder = new tao_models_classes_dataBinding_GenerisFormDataBinder($instance);
				$instance = $binder->bind($myForm->getValues());
				$instance = $this->getClassService()->setDefaultItemContent($instance);
				$this->setData('message', __('Item saved'));
			}
		}

		$this->setData('uri', tao_helpers_Uri::encode($instance->getUri()));
		$this->setData('classUri', tao_helpers_Uri::encode($clazz->getUri()));
		$this->setData('formTitle', __('Edit item'));
		$this->setData('myForm', $myForm->render());
		$this->setView('form.tpl', 'tao');
	}