Exemplo n.º 1
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     if ($this->hasModel()) {
         if ($this->form) {
             echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         }
     } else {
         echo CHtml::textField($name, $this->attribute, $this->htmlOptions);
     }
     $this->registerClientScript($id);
 }
Exemplo n.º 2
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     // Add a class of no-user-select to widget
     $this->htmlOptions['class'] = empty($this->htmlOptions['class']) ? 'no-user-select' : 'no-user-select ' . $this->htmlOptions['class'];
     if ($this->hasModel()) {
         if ($this->form) {
             echo $this->form->textField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
         }
     } else {
         echo CHtml::textField($name, $this->value, $this->htmlOptions);
     }
     $this->registerClientScript($id);
 }
Exemplo n.º 3
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.º 4
0
    echo $form->dropDownList($model, 'StatusID', CHtml::listData(Personrequeststatustypes::model()->findAll(), "idPersonRequestStatusType", "PersonRequestStatusTypeName"), array('empty' => "", 'class' => "span12", 'disabled' => $access));
    ?>

            </div>
        <?php 
}
?>
        <?php 
if (Yii::app()->user->checkAccess("showSpecEdboID")) {
    ?>
            <div class="span2">
                <?php 
    echo $form->labelEx($model, 'edboID');
    ?>
                <?php 
    echo $form->textField($model, 'edboID', array('class' => "span12"));
    ?>
                <?php 
    //echo $form->error($model,'AdditionalBall');
    ?>
            </div>
        <?php 
}
?>
    </div>
    <hr>
    <!--     <div class="row-fluid">
                <div class="span12">
    <?php 
//echo $form->labelEx($model,'GraduatedSpeciality');
?>
Exemplo n.º 5
0
                        <?php 
    echo $form->dropDownList($model, 'BasePaymentTypeID', CHtml::listData(Personeducationpaymenttypes::model()->findAll(), 'idEducationPaymentTypes', 'EducationPaymentTypesName'), array('empty' => '', 'class' => "span12"));
    ?>
                    </div>
                <?php 
}
?>
                <?php 
if (Yii::app()->user->checkAccess("showSpecEdboID")) {
    ?>
                    <div class="span2">
                        <?php 
    echo $form->labelEx($model, 'edboID');
    ?>
                        <?php 
    echo $form->textField($model, 'edboID', array('class' => "span12"));
    ?>
                        <?php 
    //echo $form->error($model,'AdditionalBall');
    ?>
                    </div>
                <?php 
}
?>

                <?php 
if (Yii::app()->user->checkAccess("showSpecStatus")) {
    ?>
                    <?php 
    $access = Yii::app()->user->checkAccess("editSpecStatus") ? "" : "disabled";
    ?>
Exemplo n.º 6
0
        <?php 
echo $form->labelEx($model, 'QualificationID');
?>
        <?php 
echo $form->dropDownList($model, 'QualificationID', CHtml::listData(Qualifications::model()->findAll(), 'idQualification', 'QualificationName'), array('class' => "span12", 'id' => "QualificationID"));
?>
        <?php 
//echo $form->error($model,'QualificationID');
?>
    </div>
     <div class="span2">
        <?php 
echo $form->labelEx($model, 'Data');
?>
        <?php 
echo $form->textField($model, 'Data', array('class' => "span12 datepicker", 'id' => "QualificationID"));
?>
        <?php 
//echo $form->error($model,'QualificationID');
?>
    </div>
</div>
<b>На що буде змінено:</b>
<hr />
<div class="row-fluid">
<div class="span4">
        <?php 
echo $form->labelEx($model, 'NewStatusID');
?>
        <?php 
echo $form->dropDownList($model, 'NewStatusID', CHtml::listData(Personrequeststatustypes::model()->findAll(), "idPersonRequestStatusType", "PersonRequestStatusTypeName"), array('empty' => "", 'class' => "span12"));
Exemplo n.º 7
0
echo $form->radioButtonListInlineRow($model, 'isHigherEducation', array(0 => 'не отримую', 1 => 'отримую', 2 => "є", 3 => 'немає'));
?>
  
                    <?php 
// Информация о высшем образовании персоны. echo $model->getAttributeLabel("isNeedHostel");
?>
                </label>
                
            </div>
            
            <div class="span1">
                    <?php 
echo $form->labelEx($model, 'edboID');
?>
                    <?php 
echo $form->textField($model, 'edboID', array('class' => "span12"));
?>
                    <?php 
//echo $form->error($model,'AdditionalBall');
?>
            </div>
            <?php 
//endif;
?>
        </div>
    <hr>
        <div class="row-fluid">
            <div class="span5">
		<?php 
echo $form->labelEx($model, 'EntrantDocumentID');
?>
Exemplo n.º 8
0
                <?php 
//echo $form->errorSummary($model)
?>
            </div>
        </div>-->
            
        <div class="row-fluid">
            <div class ="span9">
            <div class="row-fluid">
                <div class ="span4">
                <?php 
echo $form->labelEx($model, 'LastName');
//,array('class'=>'span3'));
?>
                <?php 
echo $form->textField($model, 'LastName', array('id' => "LastName", 'class' => 'span12', 'maxlength' => 50));
?>
                <?php 
//echo $form->error($model,'LastName');
?>
        
                </div>
                <div class ="span4">
                <?php 
echo $form->labelEx($model, 'FirstName');
//,array('class'=>'span3'));
?>
                <?php 
echo $form->textField($model, 'FirstName', array('id' => "FirstName", 'class' => 'span12', 'maxlength' => 50));
?>
                <?php