Exemplo n.º 1
0
 /**
  * Capture the latitude and longitude of the marker to a model.
  * 
  * @param CModel $model Model object
  * @param string $lat Attribute name for latitude
  * @param string $lng Attribute name for longitude
  * @param array $options Options to set :<ul>
  * <li>'visible' - show the input fields
  * <li>'nocallback' - do not update on callback
  * <li>'nodragend' - do not update on dragend
  * <li>'drag' - update on drag
  * </ul>
  */
 public function capturePosition(CModel $model, $lat, $lng, array $options = array())
 {
     // field options
     if (in_array('visible', $options)) {
         echo CHtml::activeLabelEx($model, $lat), CHtml::activeTextField($model, $lat);
         echo '<br>';
         echo CHtml::activeLabelEx($model, $lng), CHtml::activeTextField($model, $lng);
     } else {
         echo CHtml::activeHiddenField($model, $lat), CHtml::activeHiddenField($model, $lng);
     }
     $latId = CHtml::activeId($model, $lat);
     $lngId = CHtml::activeId($model, $lng);
     // update function
     $jsFunction = "function captureMarkerPosition(marker){\$('#{$latId}').val(marker.getPosition().lat());\$('#{$lngId}').val(marker.getPosition().lng());}";
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#capturePosition', $jsFunction, CClientScript::POS_END);
     // event options
     if (!in_array('nocallback', $options)) {
         $this->addCallback('function(result){captureMarkerPosition(result);}');
     }
     if (!in_array('nodragend', $options)) {
         $this->addEvent('dragend', 'function(result){captureMarkerPosition(result);}');
     }
     if (in_array('drag', $options)) {
         $this->addEvent('drag', 'function(result){captureMarkerPosition(result);}');
     }
     $this->addEvent('position_changed', 'function(result){captureMarkerPosition(result);}');
 }
 /**
  * @param $value
  * @return string
  */
 public function editAttribute($model, $field, $params = array())
 {
     if (!isset($params['options'])) {
         $params['options'] = array();
     }
     $options = $params['options'];
     unset($params['options']);
     return CHtml::activeFileField($model, $field->varname, $params) . ($model->getAttribute($field->varname) ? '<br/>' . CHtml::activeCheckBox($model, '[uwfdel]' . $field->varname, $params) . ' ' . CHtml::activeLabelEx($model, '[uwfdel]' . $field->varname, array('label' => UserModule::t('Delete file'), 'style' => 'display:inline;')) : '');
 }
 /**
  * Run widget.
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo CHtml::activeLabelEx($this->model, $this->attribute);
         echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo CHtml::textArea($this->name, $this->value, $this->htmlOptions);
     }
 }
Exemplo n.º 4
0
    public function run()
    {
        $idFrom = EHtml::resolveId($this->model, $this->attributeName);
        $idTo = EHtml::resolveId($this->model, $this->attributeDateTo);
        Yii::app()->clientScript->registerScript('datePickerInitialize', '
			$.datepicker.setDefaults( $.datepicker.regional["ru"] );
			$("#' . $idFrom . '").datepicker({
				onSelect: function( selectedDate ) {
					$( "#' . $idTo . '" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#' . $idTo . '").datepicker({
				onSelect: function( selectedDate ) {
					$( "#' . $idFrom . '" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
		');
        echo "\n<style type='text/css'>\n.controls-line {\n\tmargin-bottom: 5px;\n}\n</style>\n<div class='control-group'>\n\t" . CHtml::activeLabelEx($this->model, $this->attributeName, array('class' => 'control-label')) . "\n\t<div class='controls controls-line'>\n\t\t<div class='input-append'>\n\t\t\t{$this->form->textField($this->model, $this->attributeName)}<span class='add-on'><i class='icon-calendar'></i></span>\n\t\t</div>\n\t\t<div class='input-append'>\n\t\t\t<label style='margin: 0 20px; display:inline;' for='" . $idTo . "'>\n\t\t\t\t{$this->model->getAttributeLabel($this->attributeDateTo)}\n\t\t\t</label>\n\t\t\t{$this->form->textField($this->model, $this->attributeDateTo)}<span class='add-on'><i class='icon-calendar'></i></span>\n\t\t</div>\n\t</div>\n\t<div class='controls'>\n\t\t{$this->form->error($this->model, $this->attributeName)}\n\t\t{$this->form->error($this->model, $this->attributeDateTo)}\n\t</div>\n</div>\n";
    }
Exemplo n.º 5
0
<?php

echo CHtml::beginForm();
?>
	<?php 
if (CHtml::errorSummary($tag)) {
    ?>
		<?php 
    echo CHtml::errorSummary($tag);
    ?>
	<?php 
}
?>

	<p class="help_hint">Star marked fields are required.</p>
	
	<p>
	<?php 
echo CHtml::activeLabelEx($tag, 'name');
?>
<br />
	<?php 
echo CHtml::activeTextField($tag, 'name', array('maxlength' => 255, 'class' => 'small'));
?>
	</p>
	
	<?php 
echo CHtml::submitButton($create ? 'Add' : 'Update', array('class' => 'button'));
echo CHtml::endForm();
Exemplo n.º 6
0
echo Html::form('/admin/cart/history/', 'GET', array('id' => 'filter_form', 'class' => 'floatR'));
?>
        <div class="row-form">

            <?php 
echo Html::activeLabelEx($form, 'from_date');
?>

            <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => CHtml::activeName($form, 'from_date'), 'value' => $form->from_date, 'options' => array('dateFormat' => "yy-mm-dd")));
?>
</div>

        <div class="row-form">
            <?php 
echo CHtml::activeLabelEx($form, 'to_date');
?>

            <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => CHtml::activeName($form, 'to_date'), 'value' => $form->to_date, 'options' => array('dateFormat' => "yy-mm-dd")));
?>
</div>

        <div class="row-form">
            <?php 
echo Html::link('<span class="icon-medium icon-arrow-right-2 colorWhite"></span>', 'javascript:void(0)', array('class' => 'btn bBlue ', 'onClick' => '$("#filter_form").submit()'));
?>
        </div> <div class="clear"></div>
            <?php 
echo Html::endForm();
?>
Exemplo n.º 7
0
?>
				</div>
			</div>
			<div class="form-group">
				<?php 
echo CHtml::activeLabelEx($model, 'padding_left', array('class' => 'control-label col-md-3'));
?>
				<div class="col-md-9">
					<?php 
echo CHtml::activeTextField($model, 'padding_left', array('class' => 'form-control input-large'));
?>
				</div>
			</div>
			<div class="form-group">
				<?php 
echo CHtml::activeLabelEx($model, 'width', array('class' => 'control-label col-md-3'));
?>
				<div class="col-md-9">
					<?php 
echo CHtml::activeTextField($model, 'width', array('class' => 'form-control input-large'));
?>
				</div>
			</div>
		</div>
		<div class="form-actions">
			<?php 
echo CHtml::submitButton($model->isNewRecord ? Yii::t('app', 'Сохранить') : Yii::t('app', 'Изменить'), array('class' => 'btn green', 'name' => 'btn_send'));
?>
            <?php 
echo CHtml::link(Yii::t('app', 'Назад'), $this->createUrl('active'), array('class' => 'btn grey'));
?>
Exemplo n.º 8
0
<?php 
echo CHtml::beginForm();
?>

	<p class="note"><?php 
echo UserModule::t('Fields with <span class="required">*</span> are required.');
?>
</p>
	<?php 
echo CHtml::errorSummary($form);
?>
	
	<div class="row">
	<?php 
echo CHtml::activeLabelEx($form, 'password');
?>
	<?php 
echo CHtml::activePasswordField($form, 'password');
?>
	<p class="hint">
	<?php 
echo UserModule::t("Minimal password length 4 symbols.");
?>
	</p>
	</div>
	
	<div class="row">
	<?php 
echo CHtml::activeLabelEx($form, 'verifyPassword');
?>
	<?php 
Exemplo n.º 9
0
		<?php 
echo CHtml::activeTextField($post, 'title', array('size' => 65, 'maxlength' => 128));
?>
	</div>
	<div class="row">
		<?php 
echo CHtml::activeLabelEx($post, 'categoryId');
?>
		<?php 
$categories = Category::getListData();
echo CHtml::activeDropDownList($post, 'categoryId', CHtml::listData($categories, 'id', 'name'));
?>
	</div>
	<div class="row">
				<?php 
echo CHtml::activeLabelEx($post, 'publishTime');
?>
				<?php 
$post->publishTime = date('Y-m-d H:s', $post->publishTime == null ? time() : $post->publishTime);
//specific for my97DatePicker
$this->widget('application.extensions.my97DatePicker.JMy97DatePicker', array('model' => $post, 'attribute' => 'publishTime', 'options' => array('dateFmt' => Yii::app()->params['dateformatpicker'])));
?>
	</div>
	<div class="row">
		<?php 
echo CHtml::activeLabel($post, 'content');
?>

		<?php 
// Editor
$this->widget('application.extensions.fckeditor.FCKEditorWidget', array("model" => $post, "attribute" => 'content', "height" => '400px', "width" => '100%', "toolbarSet" => 'Default', "fckeditor" => Yii::app()->basePath . "/../js/fckeditor/fckeditor.php", "fckBasePath" => Yii::app()->baseUrl . "/js/fckeditor/", "config" => array("EditorAreaCSS" => Yii::app()->baseUrl . '/css/index.css')));
Exemplo n.º 10
0
							
							<?php 
echo CHtml::activeTextField($model, 'break_out', array('class' => 'validate[required] form-control timepicker24', 'disabled' => 'true', 'id' => 'break_out', 'value' => '00:00:00'));
?>
							
							<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
						</div>
						<?php 
echo CHtml::error($model, 'break_out');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
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');
Exemplo n.º 11
0
       <?php 
echo $form->textFieldRow($model, 'email', array('class' => 'span5', 'maxlength' => 128));
?>
    
    
    
   <?php 
echo $form->textAreaRow($model, 'content', array('rows' => 6, 'cols' => 50, 'class' => 'span8'));
?>

        <?php 
if (extension_loaded('gd')) {
    ?>
        <div>
                <?php 
    echo CHtml::activeLabelEx($model, 'Kode Verifikasi');
    ?>
            <div>
                <?php 
    echo $form->textFieldRow($model, 'verifyCode', array('class' => 'input-small'));
    ?>
                <?php 
    $this->widget('CCaptcha');
    ?>
            </div>
            <div class="hint">Ketik tulisan yang ada pada gambar.</div>
        </div>
        <?php 
}
?>
Exemplo n.º 12
0
 /**
  * Generates an active form row.
  * @param string $type the input type.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $htmlOptions additional HTML attributes.
  * @param array $data data for multiple select inputs.
  * @return string the generated control group.
  */
 public static function activeControlGroup($type, $model, $attribute, $htmlOptions = array(), $data = array())
 {
     $color = TbArray::popValue('color', $htmlOptions);
     $groupOptions = TbArray::popValue('groupOptions', $htmlOptions, array());
     $controlOptions = TbArray::popValue('controlOptions', $htmlOptions, array());
     $label = TbArray::popValue('label', $htmlOptions);
     $labelOptions = TbArray::popValue('labelOptions', $htmlOptions, array());
     if (in_array($type, array(self::INPUT_TYPE_CHECKBOX, self::INPUT_TYPE_RADIOBUTTON))) {
         $htmlOptions['label'] = isset($label) ? $label : $model->getAttributeLabel($attribute);
         $htmlOptions['labelOptions'] = $labelOptions;
         $label = false;
     }
     if (isset($label) && $label !== false) {
         $labelOptions['label'] = $label;
     }
     $help = TbArray::popValue('help', $htmlOptions, '');
     $helpOptions = TbArray::popValue('helpOptions', $htmlOptions, array());
     if (!empty($help)) {
         $help = self::inputHelp($help, $helpOptions);
     }
     $error = TbArray::popValue('error', $htmlOptions, '');
     $input = isset($htmlOptions['input']) ? $htmlOptions['input'] : self::createActiveInput($type, $model, $attribute, $htmlOptions, $data);
     self::addCssClass('control-group', $groupOptions);
     if (!empty($color)) {
         self::addCssClass($color, $groupOptions);
     }
     self::addCssClass('control-label', $labelOptions);
     $output = self::openTag('div', $groupOptions);
     if ($label !== false) {
         $output .= parent::activeLabelEx($model, $attribute, $labelOptions);
     }
     $output .= self::controls($input . $error . $help, $controlOptions);
     $output .= '</div>';
     return $output;
 }
Exemplo n.º 13
0
?>
	<div class="row">
		<?php 
echo CHtml::activeLabelEx($model, 'username');
?>
		<?php 
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>
Exemplo n.º 14
0
<div class="simple">
<?php 
echo CHtml::activeLabelEx($model, 'desc', array('class' => 'help', 'title' => Yii::t('lazy8', 'contexthelp.desc'), 'onclick' => 'alert(this.title)'));
echo CHtml::activeTextField($model, 'desc', array('size' => 35, 'maxlength' => 255));
?>
</div>

<div class="simple">
<?php 
echo CHtml::activeLabelEx($model, 'changedBy', array('class' => 'help', 'title' => Yii::t('lazy8', 'contexthelp.changedBy'), 'onclick' => 'alert(this.title)'));
echo CHtml::label($model->changedBy, false);
?>
</div>
<div class="simple">
<?php 
echo CHtml::activeLabelEx($model, 'dateChanged', array('class' => 'help', 'title' => Yii::t('lazy8', 'contexthelp.dateChanged'), 'onclick' => 'alert(this.title)'));
echo CHtml::label(User::getDateFormatted($model->dateChanged, $cLoc, $dateformatter), false);
?>
</div>

<div class="action">
<?php 
echo CHtml::submitButton($update ? Yii::t('lazy8', 'Save') : Yii::t('lazy8', 'Create'), array('title' => $update ? Yii::t('lazy8', 'contexthelp.Save') : Yii::t('lazy8', 'contexthelp.Create')));
?>
</div>

<?php 
echo CHtml::endForm();
?>

</div><!-- yiiForm -->
Exemplo n.º 15
0
function getFieldsCheckbox($model, $fields, $setFields = array(), $ulId = 'tree')
{
    $cs = Yii::app()->getClientScript();
    $cs->registerCoreScript('jquery');
    $css = '
			/* Catalog Tree */
			#tree {
	    		list-style: none;
				padding-left:1em;
	    	}
			#tree ul {
	    		list-style: none;
				padding-left: 2em;
	    	}
			#tree input {
				margin-right: .5em;
			}
			div.form li label {
				display:inline;
			}
		';
    $js = '
			$(document).ready(function(){
				$("#check_all").click(function(){
					$("#tree input").attr("checked", "checked");
					return false;
				});
				$("#uncheck_all").click(function(){
					$("#tree input").removeAttr("checked");
					return false;
				});
    			
			});
		';
    $cs->registerCss(__CLASS__ . '#form', $css);
    $cs->registerScript(__CLASS__ . '#form', $js);
    $content = "<div class=\"row fields\"><p><a href=\"#\" id=\"check_all\">" . CartModule::t('Check All') . "</a> | <a href=\"#\" id=\"uncheck_all\">" . CartModule::t('Uncheck All') . "</a></p><ul id=\"{$ulId}\">";
    //echo '<pre>'; print_r($model); die();
    if (isset($_POST[get_class($model)]['fields'])) {
        $setFields = $_POST[get_class($model)]['fields'];
    } elseif (count($setFields)) {
        $new = array();
        foreach ($setFields as $item) {
            $new[$item->id] = 1;
        }
        $setFields = $new;
    }
    foreach ($fields as $item) {
        $htmlOptions = array();
        if (count($setFields)) {
            if (isset($setFields[$item->id]) && $setFields[$item->id]) {
                $htmlOptions['checked'] = 'checked';
            }
        }
        /*
        		$htmlOptions['value'] = $item->id;
        		
            	if ($model->isNewRecord) {
        			if (isset($setCat[$item->id])&&$setCat[$item->id]) 
        				$htmlOptions['checked'] = 'checked';
            	} else {
        			if (isset($setCat[$item->id]->id))
        				$htmlOptions['checked'] = 'checked';
        		}//*/
        $content .= '<li>' . CHtml::activeCheckBox($model, "fields[" . $item->id . "]", $htmlOptions) . '' . CHtml::activeLabelEx($model, "fields[" . $item->id . "]", array('label' => $item->title)) . ' </li>';
    }
    $content .= '</ul></div>';
    return $content;
}
Exemplo n.º 16
0
<ul>
	<li><span><?php 
        echo CHtml::activeLabelEx($model, 'total_floors');
        ?>
</span> <?php 
        echo CHtml::activeDropdownList($model, 'total_floors', $total_floors, array('empty' => 'Select', 'class' => 'slctbox'));
        ?>
	</li>
	<li class="error_message"><?php 
        echo CHtml::error($model, 'total_floors');
        ?>
</li>
</ul>
<ul>
	<li><span><?php 
        echo CHtml::activeLabelEx($model, 'description');
        ?>
</span> <?php 
        echo CHtml::activeTextArea($model, 'description', array('class' => 'txtarea'));
        ?>
	</li>
	<li class="error_message"><?php 
        echo CHtml::error($model, 'description');
        ?>
</li>
</ul>
</fieldset>
<fieldset><legend>Amenities</legend>
<ul>
	<li><span><label for="Property_description" class="required">House
	Amenities <span class="required"></span></label></span> 
Exemplo n.º 17
0
 /**
  * Renders an HTML label for a model attribute.
  * This method is a wrapper of {@link CHtml::activeLabelEx}.
  * Please check {@link CHtml::activeLabelEx} for detailed information
  * about the parameters for this method.
  * @param CModel $model the data model
  * @param string $attribute the attribute
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated label tag
  */
 public function labelEx($model, $attribute, $htmlOptions = array())
 {
     return CHtml::activeLabelEx($model, $attribute, $htmlOptions);
 }
Exemplo n.º 18
0
<div class="simple">
	<?php 
echo $index . CHtml::activeLabelEx($model, "company_organization");
?>
	<?php 
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));
?>
Exemplo n.º 19
0
}
?>

	<div class="row">
	<?php 
echo CHtml::activeLabelEx($model, 'log_profile_visits');
echo CHtml::activeDropDownList($model, 'log_profile_visits', array('0' => Yum::t('Do not show the owner of a profile when i visit him'), '1' => Yum::t('Show the owner when i visit his profile')));
?>
	</div>

<?php 
if (Yum::hasModule('role')) {
    ?>
	<div class="row">
	<?php 
    echo CHtml::activeLabelEx($model, 'appear_in_search');
    echo CHtml::activeDropDownList($model, 'appear_in_search', array('0' => Yum::t('Do not appear in search'), '1' => Yum::t('Appear in search')));
    ?>
	</div>
<?php 
}
?>

<div class="row">
<?php 
echo $form->labelEx($model, 'ignore_users');
echo $form->textField($model, 'ignore_users', array('size' => 100));
echo $form->error($model, 'ignore_users');
?>
<div class="hint">
<p> <?php 
Exemplo n.º 20
0
          </div>

          
     <fieldset>
          <legend>UserMessage</legend>

          <div id='user_message-grid' class='formgrid'> 
               <table id='user_message'>
                    <!--desplay headdings of grid-->
                    <tbody class='user_message'>
                         <?php 
$user_messageMod = new UserMessage();
echo '<tr>';
echo '<td>' . CHtml::activeLabelEx($user_messageMod, 'user_id') . '</td>';
echo '<td>' . CHtml::activeLabelEx($user_messageMod, 'message_read') . '</td>';
echo '<td>' . CHtml::activeLabelEx($user_messageMod, 'created') . '</td>';
echo '</tr>';
?>
                    </tbody>
                    <!--~~~~~~~~~~~~~~~~~~~~~~~-->
                    <?php 
$cnt = 0;
foreach ($user_message as $detail) {
    echo $this->renderPartial('_user_message', array('model' => $detail, 'cnt' => $cnt));
    $cnt++;
}
//add subform for new one
//$user_messageNew = new UserMessage();
//echo $this->renderPartial('_user_message', array('model' => $user_messageNew, 'cnt' => $cnt));
?>
               </table>
Exemplo n.º 21
0
echo $form->labelEx($model, 'email');
?>
</td>
                                    <td>
                                        <?php 
echo $form->textField($model, 'email');
?>
                                        <?php 
echo $form->error($model, 'email');
?>
                                    </td>
                                </tr>

                                <tr>
                                    <td><?php 
echo CHtml::activeLabelEx($model, 'verifiedCode');
?>
</td>
                                    <td>                                    
                                        <?php 
$this->widget('CCaptcha', array('buttonType' => 'button'));
?>
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>
                                        <?php 
echo CHtml::activeTextField($model, 'verifiedCode');
?>
Exemplo n.º 22
0
?>

<? if($activateFromWeb): ?>
<div class="form">
<? echo CHtml::beginForm(array('registration/activation'),'GET',array()); ?> 

<div id="activatiion_code">
<div class="row">
<? echo Yii::t("UserModule.user", "Enter the activation code you recieved below."); ?>
</div>
<div class="row">
<? if(isset($form->email)){ 
echo CHtml::hiddenField('email',$form->email);  
 }else{ 
	echo CHtml::activeLabelEx($user,'email');
	echo CHtml::textField('email',$form->email);
		}
?>

<? echo CHtml::activeLabelEx($user,'activationKey'); ?>
<? echo CHtml::textField('activationKey'); //fixme ?> 
</div>
<div class="row_submit">
<? echo CHtml::submitButton(Yii::t("UserModule.user", "Activate")); ?>
</div>
</div>
<? echo CHtml::endForm(); ?>
</div> <!--form -->
<? endif;?>

<? echo $this->renderPartial('/user/_resend_activation_partial', array('user'=>$user,'form'=>$form)); ?>
Exemplo n.º 23
0
        <div class="form-group">
            <?php 
echo $form->labelEx($model, 'message', array('class' => 'control-label col-sm-2'));
?>
            <div class="col-sm-10">
                <?php 
echo $form->textArea($model, 'message', array('rows' => 6, 'cols' => 50));
?>
            </div>
        </div>

        <? if (CCaptcha::checkRequirements() && Yii::app()->user->isGuest): ?>

            <?php 
echo CHtml::activeLabelEx($model, 'verifyCode', array('class' => 'control-label col-sm-2'));
?>
            <div class="col-sm-10">
                <?php 
echo CHtml::activeTextField($model, 'verifyCode');
?>


                <div style="margin-left: 150px;"><? $this->widget('CCaptcha', array('buttonLabel' => 'Обновить')) ?>
                </div>

            </div>

        <? endif ?>

Exemplo n.º 24
0
<?php 
if (Yum::module()->loginType & UserModule::LOGIN_BY_USERNAME) {
    echo CHtml::activeLabelEx($model, 'username');
}
if (Yum::module()->loginType & UserModule::LOGIN_BY_EMAIL) {
    printf('<label for="YumUserLogin_username">%s <span class="required">*</span></label>', Yum::t('E-Mail address'));
}
?>

    <?php 
echo CHtml::activeTextField($model, 'username');
?>

    <?php 
echo CHtml::activeLabelEx($model, 'password');
?>
    <?php 
echo CHtml::activePasswordField($model, 'password');
?>


<?php 
if ($model->scenario == 'captcha' && CCaptcha::checkRequirements()) {
    ?>
    <?php 
    echo CHtml::activeLabel($model, 'verifyCode');
    ?>
    <?php 
    $this->widget('CCaptcha');
    ?>
Exemplo n.º 25
0
?>
		<?php 
echo CHtml::activeTextField($model, 'position');
?>
		<?php 
echo CHtml::error($model, 'position');
?>
		<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>
Exemplo n.º 26
0
						<?php 
echo CHtml::activeCheckBox($model, 'group_close', array('class' => 'form-control icheckbox'));
?>
						<br /><span class="subtip"><?php 
echo at("If you've entered a group title for a setting you may close that opened group by checking this checkbox to close it.");
?>
</span>
						<?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'));*/
Exemplo n.º 27
0
		<?php 
echo CHtml::beginForm();
?>
        <div class="row">
            <div class="span4"><?php 
echo CHtml::activeLabelEx($model, 'Active:');
?>
</div>
            <div class="span5"><?php 
echo '<div class="onoff" id="' . $model->id . '"></div>';
//Create On/Off
echo CHtml::activeHiddenField($model, "active");
?>
</div>
            <div class="span3"><?php 
echo CHtml::activeLabelEx($model, 'Make this sidebar visible', array('class' => 'helpertext'));
?>
</div>
        </div>

        <p class="pull-right">
			<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'label' => 'Save', 'type' => 'primary', 'size' => 'large'));
?>
        </p>
		<?php 
echo CHtml::endForm();
?>
    </div>

</div>
Exemplo n.º 28
0
	<div class="row">
		<?php 
echo $form->labelEx($model, 'ALAMAT');
?>
		<?php 
echo $form->textField($model, 'ALAMAT', array('size' => 30, 'maxlength' => 30));
?>
		<?php 
echo $form->error($model, 'ALAMAT');
?>
	</div>


	<div class="row">
		<?php 
echo CHtml::activeLabelEx($model, 'Tanggal Masuk Kerja');
?>
		<?php 
echo CHtml::activeTextField($model, 'TGL_MASUK_KERJA', array("id" => "TGL_MASUK_KERJA"));
?>
		<?php 
$this->widget('application.extensions.calendar.SCalendar', array('inputField' => 'TGL_MASUK_KERJA', 'ifFormat' => '%Y-%m-%d'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'PENEMPATAN');
?>
		<?php 
echo $form->textField($model, 'PENEMPATAN', array('size' => 25, 'maxlength' => 25));
Exemplo n.º 29
0
Arquivo: login.php Projeto: reubsc/sds
		<p class="hint">
		<?php 
echo CHtml::link(Yii::t("UserModule.user", "Registration"), Yii::app()->user->registrationUrl);
?>
 | <?php 
echo CHtml::link(Yii::t("UserModule.user", "Lost Password?"), Yii::app()->user->recoveryUrl);
?>
		</p>
	</div>
	
	<div class="row rememberMe">
		<?php 
echo CHtml::activeCheckBox($model, 'rememberMe');
?>
		<?php 
echo CHtml::activeLabelEx($model, 'rememberMe');
?>
	</div>

	<div class="row submit">
		<?php 
echo CHtml::submitButton(Yii::t("UserModule.user", "Login"));
?>
	</div>
	
<?php 
echo CHtml::endForm();
?>
</div><!-- form -->

Exemplo n.º 30
0
					<?php 
echo CHtml::activeLabelEx($salary, 'level_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
echo CHtml::activeDropDownList($salary, 'level_id', CHtml::listData(ReferenceLevels::model()->findAll(), 'id', 'level'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select', 'id' => 'field_level_id'));
?>
						<?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'));*/