public function run() { $model = $this->model; $cities = $this->cities; $locations = $model->locations; if (empty($locations)) { $location = new CompetitionLocation(); $locations = array($location->attributes); } //tab echo CHtml::openTag('ul', array('class' => 'nav nav-tabs', 'role' => 'tablist')); foreach ($locations as $key => $location) { $index = $key + 1; echo CHtml::tag('li', array('class' => $key == 0 ? 'active' : ''), CHtml::tag('a', array('href' => '#location-' . $index, 'role' => 'tab', 'data-toggle' => 'tab'), '地址' . $index . ($key == 0 ? '<span class="required">*</span></a>' : ''))); } echo '<li><a id="addLocation"><i class="fa fa-plus"></i> 添加</a></li>'; echo CHtml::closeTag('ul'); echo '<div class="text-danger col-lg-12">地址1必填,除非多地点比赛,否则请只填写一个地址,留空即可删去多余地址。</div>'; //tab content echo CHtml::openTag('div', array('class' => 'tab-content locations')); foreach ($locations as $key => $location) { $index = $key + 1; echo CHtml::openTag('div', array('class' => 'tab-pane location' . ($key == 0 ? ' active' : ''), 'id' => 'location-' . $index)); echo Html::formGroup($model, 'locations[province_id][]', array('class' => 'col-lg-6'), CHtml::label('省份', false), CHtml::dropDownList(CHtml::activeName($model, 'locations[province_id][]'), $location['province_id'], Region::getProvinces(false), array('class' => 'form-control province', 'prompt' => '')), CHtml::error($model, 'locations.province_id.' . $key, array('class' => 'text-danger'))); echo Html::formGroup($model, 'locations[city_id][]', array('class' => 'col-lg-6'), CHtml::label('城市', false), CHtml::dropDownList(CHtml::activeName($model, 'locations[city_id][]'), $location['city_id'], isset($cities[$location['province_id']]) ? $cities[$location['province_id']] : array(), array('class' => 'form-control city', 'prompt' => '')), CHtml::error($model, 'locations.city_id.' . $key, array('class' => 'text-danger'))); echo Html::formGroup($model, 'locations[venue_zh][]', array('class' => 'col-lg-12'), CHtml::label('中文地址', false), CHtml::textField(CHtml::activeName($model, 'locations[venue_zh][]'), $location['venue_zh'], array('class' => 'form-control')), CHtml::error($model, 'locations.venue_zh.' . $key, array('class' => 'text-danger'))); echo Html::formGroup($model, 'locations[venue][]', array('class' => 'col-lg-12'), CHtml::label('英文地址', false), CHtml::textField(CHtml::activeName($model, 'locations[venue][]'), $location['venue'], array('class' => 'form-control')), CHtml::error($model, 'locations.venue.' . $key, array('class' => 'text-danger'))); echo CHtml::closeTag('div'); } echo CHtml::closeTag('div'); Yii::app()->clientScript->registerScript('MultiLocations', <<<EOT \$(document).on('click', '#addLocation', function() { var location = \$('.location:last').clone(); var index = \$('.location').length + 1; var tab = \$('<a role="tab" data-toggle="tab">').attr('href', '#location-' + index).text('地址' + index); location.appendTo(\$('.locations')); location.find('.province').val('').trigger('change'); location.find('input').val(''); location.attr('id', 'location-' + index).removeClass('active'); \$('<li>').append( tab ).insertBefore(\$('#addLocation').parent()); tab.tab('show'); }); EOT ); }
public function actionCreate() { $head = new CalculationHead(); if (isset($_POST['CalculationHead'])) { $head->attributes = $_POST['CalculationHead']; $head->scenario = $head->project_type; $valid = $head->validate(); $valid2 = true; if (isset($_POST['CalculationDetail'])) { $det = array(); $i = 0; $errorDet = ""; $detail = $_POST['CalculationDetail']; foreach ($detail as $data) { $det[$i] = new CalculationDetail(); $det[$i]->area_type = $data['area_type']; $det[$i]->area_size = $data['area_size']; $det[$i]->head_id = $i; if (!$det[$i]->validate()) { $errorDet = $det[$i]; $valid2 = false; break; } $i += 1; } } if ($valid && $valid2) { $head->datetime = new CDbExpression('NOW()'); $head->deadline = date('Y-m-d', mktime(0, 0, 0, $head->month, $head->date, $head->year)); if ($head->save()) { if (isset($det)) { foreach ($det as $d) { $d->head_id = $head->id; $d->save(); } } $this->SendMail($head, $det); echo CJSON::encode(array('result' => 'success')); } } else { //print_r($head->getErrors()); echo CJSON::encode(array('result' => 'failed', 'vc' => CHtml::error($head, 'views_count'), 'ia' => CHtml::error($head, 'interior_areas'), 'nv' => CHtml::error($head, 'number_views'), 'sop' => CHtml::error($head, 'project_style'), 'pt' => CHtml::error($head, 'product_type'), 'date' => CHtml::error($head, 'date'), 'month' => CHtml::error($head, 'month'), 'year' => CHtml::error($head, 'year'), 'ref' => CHtml::error($head, 'reference'), 'email' => CHtml::error($head, 'email'), 'area_type' => $errorDet ? CHtml::error($errorDet, 'area_type') : "", 'area_size' => $errorDet ? CHtml::error($errorDet, 'area_size') : "", 'det_idx' => $errorDet ? $errorDet->head_id + 1 : 0)); } } }
* <?php echo $form->error($model,'lastName'); ?> * </div> * * <?php $this->endWidget(); ?> * </pre> * * To respond to the AJAX validation requests, we need the following class code: * <pre> * public function actionCreate() * { * $model=new User; * $this->performAjaxValidation($model); * if(isset($_POST['User'])) * { * $model->attributes=$_POST['User']; * if($model->save()) * $this->redirect('index'); * } * $this->render('create',array('model'=>$model)); * } * * protected function performAjaxValidation($model) * { * if(isset($_POST['ajax']) && $_POST['ajax']==='user-form') * { * echo CActiveForm::validate($model); * Yii::app()->end(); * } * } * </pre> * The method <code>performAjaxValidation</code> is the main extra code we add to our * traditional model creation action code. In this method, we check if the request * is submitted via AJAX by the 'user-form'. If so, we validate the model and return * the validation results. We may call the same method in model update action. * * On the client side, an input field may be in one of the four states: initial (not validated), * validating, error and success. To differentiate these states, CActiveForm automatically
<?php /** * @var $this YdAccountController * @var $user YdAccountRecover * @var $recaptcha string * * @author Brett O'Donnell <*****@*****.**> * @author Zain Ul abidin <*****@*****.**> * @copyright 2013 Mr PHP * @link https://github.com/cornernote/yii-dressing * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt */ $this->pageTitle = Yii::t('dressing', 'Recover Password'); /** @var YdActiveForm $form */ $form = $this->beginWidget('dressing.widgets.YdActiveForm', array('id' => 'recover-form', 'type' => 'horizontal')); echo $form->beginModalWrap(); echo $form->errorSummary($user); echo $form->textFieldRow($user, 'username_or_email'); if ($recaptcha) { echo CHtml::activeLabel($user, 'recaptcha'); $this->widget('dressing.widgets.YdReCaptchaInput', array('model' => $user)); echo CHtml::error($user, 'recaptcha'); } echo $form->endModalWrap(); echo '<div class="' . $form->getSubmitRowClass() . '">'; $this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('dressing', 'Recover'), 'type' => 'primary', 'buttonType' => 'submit')); echo ' '; $this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('dressing', 'Back to Login'), 'url' => array('/account/login'))); echo '</div>'; $this->endWidget();
?> :</th> <th><?php echo CHtml::activeLabel($form, 'lng'); ?> :</th> </tr> <tr> <td><?php echo CHtml::activeTextField($form, 'lat', array('style' => 'width: 130px;')); echo CHtml::error($form, 'lat'); ?> </td> <td><?php echo CHtml::activeTextField($form, 'lng', array('style' => 'width: 130px;')); echo CHtml::error($form, 'lng'); ?> </td> </tr> <tr> <td colspan="2"> You change the coordinates by moving the pin. <div id="map_canvas" style="width: 386px; height: 300px; border: 1px solid #c0c0c0;"></div> </td> </tr> </table> <div style="clear: both;"></div> <?php echo CHtml::endForm(); ?>
/** * Displays the first validation error for a model attribute. * This is similar to {@link CHtml::error} except that it registers the model attribute * so that if its value is changed by users, an AJAX validation may be triggered. * @param CModel $model the data model * @param string $attribute the attribute name * @param array $htmlOptions additional HTML attributes to be rendered in the container div tag. * Besides all those options available in {@link CHtml::error}, the following options are recognized in addition: * <ul> * <li>validationDelay</li> * <li>validateOnChange</li> * <li>validateOnType</li> * <li>hideErrorMessage</li> * <li>inputContainer</li> * <li>errorCssClass</li> * <li>successCssClass</li> * <li>validatingCssClass</li> * <li>beforeValidateAttribute</li> * <li>afterValidateAttribute</li> * </ul> * These options override the corresponding options as declared in {@link options} for this * particular model attribute. For more details about these options, please refer to {@link clientOptions}. * Note that these options are only used when {@link enableAjaxValidation} or {@link enableClientValidation} * is set true. * * When client-side validation is enabled, an option named "clientValidation" is also recognized. * This option should take a piece of JavaScript code to perform client-side validation. In the code, * the variables are predefined: * <ul> * <li>value: the current input value associated with this attribute.</li> * <li>messages: an array that may be appended with new error messages for the attribute.</li> * <li>attribute: a data structure keeping all client-side options for the attribute</li> * </ul> * @param boolean $enableAjaxValidation whether to enable AJAX validation for the specified attribute. * Note that in order to enable AJAX validation, both {@link enableAjaxValidation} and this parameter * must be true. * @param boolean $enableClientValidation whether to enable client-side validation for the specified attribute. * Note that in order to enable client-side validation, both {@link enableClientValidation} and this parameter * must be true. This parameter has been available since version 1.1.7. * @return string the validation result (error display or success message). * @see CHtml::error */ public function error($model, $attribute, $htmlOptions = array(), $enableAjaxValidation = true, $enableClientValidation = true) { if (!$this->enableAjaxValidation) { $enableAjaxValidation = false; } if (!$this->enableClientValidation) { $enableClientValidation = false; } if (!isset($htmlOptions['class'])) { $htmlOptions['class'] = $this->errorMessageCssClass; } if (!$enableAjaxValidation && !$enableClientValidation) { return CHtml::error($model, $attribute, $htmlOptions); } $id = CHtml::activeId($model, $attribute); $inputID = isset($htmlOptions['inputID']) ? $htmlOptions['inputID'] : $id; unset($htmlOptions['inputID']); if (!isset($htmlOptions['id'])) { $htmlOptions['id'] = $inputID . '_em_'; } $option = array('id' => $id, 'inputID' => $inputID, 'errorID' => $htmlOptions['id'], 'model' => get_class($model), 'name' => $attribute, 'enableAjaxValidation' => $enableAjaxValidation); $optionNames = array('validationDelay', 'validateOnChange', 'validateOnType', 'hideErrorMessage', 'inputContainer', 'errorCssClass', 'successCssClass', 'validatingCssClass', 'beforeValidateAttribute', 'afterValidateAttribute'); foreach ($optionNames as $name) { if (isset($htmlOptions[$name])) { $option[$name] = $htmlOptions[$name]; unset($htmlOptions[$name]); } } if ($model instanceof CActiveRecord && !$model->isNewRecord) { $option['status'] = 1; } if ($enableClientValidation) { $validators = isset($htmlOptions['clientValidation']) ? array($htmlOptions['clientValidation']) : array(); $attributeName = $attribute; if (($pos = strrpos($attribute, ']')) !== false && $pos !== strlen($attribute) - 1) { $attributeName = substr($attribute, $pos + 1); } foreach ($model->getValidators($attributeName) as $validator) { if ($validator->enableClientValidation) { if (($js = $validator->clientValidateAttribute($model, $attributeName)) != '') { $validators[] = $js; } } } if ($validators !== array()) { $option['clientValidation'] = new CJavaScriptExpression("function(value, messages, attribute) {\n" . implode("\n", $validators) . "\n}"); } } $html = CHtml::error($model, $attribute, $htmlOptions); if ($html === '') { if (isset($htmlOptions['style'])) { $htmlOptions['style'] = rtrim($htmlOptions['style'], ';') . ';display:none'; } else { $htmlOptions['style'] = 'display:none'; } $html = CHtml::tag('div', $htmlOptions, ''); } $this->attributes[$inputID] = $option; return $html; }
<?php echo CHtml::error($salary, 'level_id'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($salary, 'grade_id', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeDropDownList($salary, 'grade_id', CHtml::listData(ReferenceGrades::model()->findAll(), 'id', 'grade'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select', 'id' => 'field_grade_id')); ?> <?php echo CHtml::error($salary, 'grade_id'); ?> </div> </div> </div> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/ ?> <?php // echo CHtml::submitButton('Save', array('class'=>'btn btn-primary pull-right')); ?> <a class="btn btn-primary pull-right" href="#" id="btnUpgradeSalary">Save</a> </div> </div>
<?php echo CHtml::error($model, 'group_close'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'sort_ord', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeTextField($model, 'sort_ord', array('class' => 'validate[custom[number]] form-control')); ?> <?php echo CHtml::error($model, 'sort_ord'); ?> </div> </div> </div> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/ ?> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn btn-primary pull-right')); ?> </div> </div> </div>
?> <?php echo CHtml::activeTextField($user, 'username'); echo CHtml::error($user, 'username'); ?> </div> <div class="simple"> <?php echo CHtml::activeLabel($user, 'password'); ?> <?php echo CHtml::activePasswordField($user, 'password'); echo CHtml::error($user, 'password'); ?> </div> <div class="action"> <?php if ($this->enableRememberMe) { echo CHtml::activeCheckBox($user, 'rememberMe'); ?> Remember me next time<br/> <?php } echo CHtml::submitButton('Login'); ?> </div>
<td> </td> <td class="date"> <?php echo CHtml::activeTextField($form, 'date_to', array('class' => 'date-pick input-calendar')); ?> <?php echo CHtml::error($form, 'date_to'); ?> </td> <td class="time"> <?php echo CHtml::activeTextField($form, 'time_to', array('style' => 'width: 50px;')); ?> <?php echo CHtml::error($form, 'time_to'); ?> </td> <td> </td> <td class="buttons"> <input type="submit" name="filter" value="<?php echo It::t('site_label', 'do_filter'); ?> " /> <input type="submit" name="clear" value="<?php echo It::t('site_label', 'do_reset'); ?> " /> </td> </tr>
echo Yum::t('Your Avatar image'); echo '</h2>'; echo $model->getAvatar(); } else { echo Yum::t('You do not have set an avatar image yet'); } } echo '<br />'; if (Yum::module('avatar')->avatarMaxWidth != 0) { echo '<p>' . Yum::t('The image should have at least 50px and a maximum of 200px in width and height. Supported filetypes are .jpg, .gif and .png') . '</p>'; } echo CHtml::errorSummary($model); echo CHtml::beginForm(array('//avatar/avatar/editAvatar', 'id' => $model->id), 'POST', array('enctype' => 'multipart/form-data')); echo '<div class="row">'; echo CHtml::activeLabelEx($model, 'avatar'); echo CHtml::activeFileField($model, 'avatar'); echo CHtml::error($model, 'avatar'); echo '</div>'; if (Yum::module('avatar')->enableGravatar) { echo CHtml::submitButton(Yum::t('Upload avatar'), array('class' => 'btn btn-primary left_button')); } echo '<br />'; echo CHtml::link(Yum::t('Use Gravatar'), array('//avatar/avatar/enableGravatar', 'id' => $model->id), array('class' => 'btn btn-primary left_button')); echo ' '; echo CHtml::link(Yum::t('Remove Avatar'), array('//avatar/avatar/removeAvatar', 'id' => $model->id), array('class' => 'btn btn-primary left_button')); echo CHtml::endForm(); ?> </div> </div>
<td><?php echo CHtml::error($form, 'username'); ?> </td> </tr> <tr> <th><?php echo CHtml::activeLabel($form, 'password'); ?> </th> <td><?php echo CHtml::activePasswordField($form, 'password'); ?> </td> <td><?php echo CHtml::error($form, 'password'); ?> </td> </tr> <tr class="bottom"> <td><?php echo CHtml::activeCheckBox($form, 'rememberMe'); ?> <?php echo CHtml::activeLabel($form, 'rememberMe'); ?> </td> <td><?php echo CHtml::submitButton('Login'); ?> </td>
<?php echo CHtml::error($model, 'doctor_letter_proof'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'number_of_hours', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeTextField($model, 'number_of_hours', array('class' => 'validate[required] form-control', 'style' => 'width:100px;', 'value' => '')); ?> <?php echo CHtml::error($model, 'number_of_hours'); ?> </div> </div> </div> <input value="save" name="command" id="hiddenInputCommand" hidden> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/ ?> <span class="pull-right"> <?php
<?php if ($model->id) { ?> <h3><?php echo CartModule::t('Add Relation', 'product'); ?> </h3> <div class="row"> <?php echo CHtml::activeLabelEx($newRelation, 'pr_id', array('label' => CartModule::t('Product Id', 'product'))); ?> <?php echo CHtml::activeTextField($newRelation, 'pr_id'); ?> <?php echo CHtml::error($newRelation, 'pr_id'); ?> </div> <?php } if ($model->relation) { echo '<h2>' . CartModule::t('Relation Products', 'product') . '</h2>'; } //echo "<pre>"; print_r($model->relation); die(); foreach ($model->relation as $n => $m) { ?> <div class="row"> <div class="photo"><?php if ($m->photo) { echo CHtml::link($m->photo->img(array("w" => "100")), array('view', 'id' => $m->id)); }
<?php echo CHtml::error($model, 'alergy'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'mcu_status', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeRadioButtonList($model, 'mcu_status', MastersEmployeeMcu::model()->getStatuses(), array('class' => 'validate[required] form-control iradio', 'separator' => ' ')); ?> <?php echo CHtml::error($model, 'mcu_status'); ?> </div> </div> </div> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/ ?> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn btn-primary pull-right')); ?> </div> </div> </div>
<td colspan="3"> <?php echo CHtml::activePasswordField($user, 'pass', array('style' => 'width: 300px;')); ?> <?php echo CHtml::error($user, 'pass'); ?> </td> </tr> <th></th> <td colspan="3"> <?php echo CHtml::activePasswordField($user, 'pass2', array('style' => 'width: 300px;')); ?> <?php echo CHtml::error($user, 'pass2'); ?> </td> <?php if (!$user->isSuperAdmin()) { ?> <tr> <th><?php echo CHtml::activeLabel($user, 'role'); ?> <sup>*</sup></th> <td colspan="3"> <?php echo CHtml::activeDropDownList($user, 'role', array_slice(Yii::app()->params['user_role'], 0), array('style' => 'width: 270px;')); ?> </td>
?> <div class='grid_12'> <div class="box"> <div class="title"><?php echo at('Reply'); ?> </div> <div class="inside"> <div class="in"> <?php echo CHtml::beginForm('', 'post', array('class' => 'formee')); ?> <div class="grid-12-12"> <?php echo CHtml::error($reply, 'message'); ?> <?php Yii::app()->customEditor->getEditor(array('model' => $reply, 'attribute' => 'message')); ?> </div> <div class="clear"></div> </div> <section class="box_footer"> <div class="grid-12-12"> <a href='<?php echo $this->createUrl('index'); ?> ' class='right button'><?php echo at('Cancel');
/* @var $divisions Division[] */ $this->breadcrumbs = array($this->module->id); $this->page_class[] = 'page-division'; ?> <?php if (!O::app()->user->getIsGuest()) { /* @var $form CActiveForm */ $form = $this->beginWidget('CActiveForm', array('id' => 'division-choice-form', 'enableClientValidation' => false, 'clientOptions' => array('validateOnSubmit' => false))); $dropDownListAttr = array('prompt' => O::t('oprecx', '-- choose one --')); $fieldSet = JqmTag::jTag('fieldset', 'controlgroup')->appendContent($form->errorSummary($model)); for ($i = 0; $i < $model->max_choice; ++$i) { $fieldSet->appendContent(CHtml::activeDropDownList($model, "choices[{$i}]", $model->allDivisionsName, $dropDownListAttr)); } $fieldSet->render(true); echo CHtml::error($model, 'choices'); // render submit button $this->renderPartial('submit'); // end $this->endWidget(); } ?> <?php foreach ($divisions as $division) { ?> <div class="division"> <h3 class="division-name"><?php echo CHtml::encode($division->name); ?> </h3>
echo CHtml::activeDropDownList($model, "[{$index}]company_organization", $level); ?> <?php echo CHtml::error($model, "[{$index}]company_organization"); ?> </div> <div class="simple"> <?php echo CHtml::activeLabelEx($model, "company_business"); ?> <?php echo CHtml::activeTextField($model, "[{$index}]company_business"); ?> <?php echo CHtml::error($model, "[{$index}]company_business"); ?> </div> <div class="simple"> <?php //echo CHtml::activeLabelEx($model,"degree"); ?> <?php echo CHtml::activeHiddenField($model, "[{$index}]user_id", array('value' => 3)); ?> <?php //echo CHtml::error($model,"[$index]degree"); ?> </div> <!--
?> <?php echo $form->PasswordFieldControlGroup($model, 'new_password'); ?> <?php echo $form->PasswordFieldControlGroup($model, 'password_confirm'); ?> <div class="control-group"> <div class="controls"> <?php echo CHtml::activeLabel($model, 'verify_code'); ?> <?php $this->widget('application.extensions.recaptcha.EReCaptcha', array('model' => $model, 'attribute' => 'verify_code', 'theme' => 'red', 'language' => 'en', 'publicKey' => Yii::app()->params['recaptcha_public_key'])); ?> <?php echo CHtml::error($model, 'verify_code'); ?> </div> </div> <?php echo TbHtml::formActions(array(TbHtml::submitButton('Submit', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::resetButton('Reset'))); ?> <?php $this->endWidget(); ?> </div><!-- form --> </div>
<div class="form-group"> <?php echo CHtml::activeLabel($model, 'max', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-5"> <?php echo CHtml::activeTextField($model, 'max', array('class' => 'form-control')); ?> <span class="help-block"> <?php echo CHtml::error($model, 'max', array('class' => 'label label-danger')); ?> </span> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'min', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-5"> <?php echo CHtml::activeTextField($model, 'min', array('class' => 'form-control')); ?> <span class="help-block"> <?php echo CHtml::error($model, 'min', array('class' => 'label label-danger')); ?> </span> </div> </div>
public function error($model, $attribute, $htmlOptions = array(), $enableAjaxValidation = true, $enableClientValidation = true) { return CHtml::error($model, $attribute, $htmlOptions); }
echo CHtml::error($propertyAmenities, 'houseAmenities'); ?> </li> </ul> <ul> <li><span><label for="Property_description" class="required">External Amenities <span class="required"></span></label></span> <?php //echo CHtml::activeDropdownList($propertyAmenities,'amenity_id[]',CHtml::listData(CategoryAmenities::model()->findAll(),'id','amenity'),array('size'=>'5','multiple'=>'multiple','id'=>'amenities-multi')) ?> <div class="multi_checkbox avg"><?php echo CHtml::activeCheckBoxList($propertyAmenities, 'externalAmenities', CHtml::listData(CategoryAmenities::model()->findAll('amenity_type=:amenityType', array(':amenityType' => '1')), 'id', 'amenity')); ?> </div> </li> <li class="error_message"><?php echo CHtml::error($propertyAmenities, 'externalAmenities'); ?> </li> </ul> </fieldset> <?php break; } ?>
?> </div> </div> <div class="well" style="height: 200px"> GOOLE MAP HERE </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'location', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-8"> <?php echo CHtml::activeTextField($model, 'location', array('class' => 'form-control', 'placeholder' => Lang::t('Type the department location or mark it on the map.'))); ?> <?php echo CHtml::error($model, 'location'); ?> </div> </div> </div> </div> </div> </div> <div class="clearfix form-actions"> <div class="col-md-12"> <button class="btn btn-sm btn-primary" type="submit"><i class="icon-ok bigger-110"></i> <?php echo Lang::t($model->isNewRecord ? 'Save and Create Contact Person' : 'Save'); ?> </button>
echo CHtml::activeLabelEx($model, 'break_in', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <div class="input-group bootstrap-timepicker"> <span class="input-group-addon"> <span class="checkbox"><label><input type="checkbox" id="check_break_in"></label></span> </span> <?php echo CHtml::activeTextField($model, 'break_in', array('class' => 'validate[required] form-control timepicker24', 'disabled' => 'true', 'id' => 'break_in', 'value' => '00:00:00')); ?> <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span> </div> <?php echo CHtml::error($model, 'break_in'); ?> </div> </div> </div> <div class="panel-footer"> <?php /*echo CHtml::button('Clear Form', array('class'=>'btn btn-default'));*/ ?> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn btn-primary pull-right')); ?> </div> </div> </div>
?> <?php echo CHtml::activeDropDownList($model, 'parent', $roles, array('prompt' => Yii::t('global', '-- Choose Value --'), 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'parent', array('class' => 'input-notification errorshow png_bg')); ?> <?php echo CHtml::label(Yii::t('adminroles', 'Auth Item Child'), ''); ?> <?php echo CHtml::activeListBox($model, 'child', $roles, array('size' => 20, 'multiple' => 'multiple', 'prompt' => Yii::t('global', '-- Choose Value --'), 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'child', array('class' => 'input-notification errorshow png_bg')); ?> <p><?php echo CHtml::submitButton(Yii::t('adminglobal', 'Submit'), array('class' => 'button')); ?> </p> <?php echo CHtml::endForm(); ?> </div> <!-- End .content-box-content --> </div> <!-- End .content-box -->
</td> <td> <?php $this->widget('CCaptcha', array('buttonType' => 'button')); ?> </td> </tr> <tr> <td> </td> <td> <?php echo CHtml::activeTextField($model, 'verifiedCode'); ?> <?php echo CHtml::error($model, 'verifiedCode'); ?> </td> </tr> <tr> <td> </td> <td> <?php echo CHtml::submitButton(Yii::t('flexiblearn', 'Ok'), array('class' => 'bt')); ?> <span style="color: #0066ff"> <?php echo CHtml::link(Yii::t('flexiblearn', 'Cancel'), array('site/index')); ?>
echo CHtml::activeTextField($model, 'username', array('size' => 20, 'maxlength' => 20)); ?> <?php echo CHtml::error($model, 'username'); ?> </div> <div class="row"> <?php echo CHtml::activeLabelEx($model, 'email'); ?> <?php echo CHtml::activeTextField($model, 'email', array('size' => 60, 'maxlength' => 128)); ?> <?php echo CHtml::error($model, 'email'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save')); ?> </div> <?php echo CHtml::endForm(); ?> </div><!-- form -->
?> <p class="hint"><?php echo UserModule::t('Display order of fields.'); ?> </p> </div> <div class="row visible"> <?php echo CHtml::activeLabelEx($model, 'visible'); ?> <?php echo CHtml::activeDropDownList($model, 'visible', ProfileField::itemAlias('visible')); ?> <?php echo CHtml::error($model, 'visible'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save')); ?> </div> <?php echo CHtml::endForm(); ?> </div><!-- form --> <div id="dialog-form" title="<?php
<ul> <li> <span>State</span> <?php if ($list) { echo CHtml::activeDropdownList($modelProfile, 'state_id', $list, array('empty' => 'All'), array('class' => 'slctbox')); } else { echo CHtml::activeDropdownList($modelProfile, 'state_id', array('' => 'All'), array('class' => 'slctbox')); } ?> </li> <li class="error_message"><?php echo CHtml::error($modelProfile, 'state_id'); ?> </li> </ul> <div id="city_content"> <ul> <li><span>City</span> <?php echo CHtml::activeDropdownList($modelProfile, 'city_id', array('' => 'All'), array('class' => 'slctbox')); ?> </li> <li class="error_message"><?php echo CHtml::error($modelProfile, 'city_id'); ?> </li> </ul> </div> </div>