/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'show' page. */ public function actionWeboptions() { if (isset($_POST['options_posted'])) { User::updateOptionTemplate(User::optionsWebTemplate(), 0, 0); $this->redirect(Yii::app()->request->baseUrl); } else { $this->render('weboptions', array('weboptions' => Options::model()->findAll('companyId=0 AND userId=0', array()))); } }
* */ ?> <div class="yiiForm"> <?php echo CHtml::beginForm(); ?> <?php $calendar = array('firstDay' => '1', 'language' => 'en', 'inputField' => 'fodelsedatum', 'ifFormat' => User::getPhPDateFormat()); echo CHtml::hiddenField('options_posted', 'true'); if (isset($weboptions)) { $useroptions = $weboptions; $optionTemplate = User::optionsWebTemplate(); ?> <table class="dataGrid" width="550"> <?php foreach ($useroptions as $useroption) { if (isset($optionTemplate[$useroption->name])) { if ($optionTemplate[$useroption->name][3] == 'false') { ?> <tr><td> <!-- <div class="simple"> --> <?php echo CHtml::label(yii::t('lazy8', 'option.name.' . $useroption->name), 'false', array('class' => 'help', 'title' => Yii::t('lazy8', 'contexthelp.option.' . $useroption->name), 'onclick' => 'alert(this.title)')); ?> </td><td> <?php switch ($optionTemplate[$useroption->name][0]) {