Example #1
0
<div class="stats-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'deck_id')->widget(Chosen::className(), ['items' => $deck_options, 'disableSearch' => 5, 'clientOptions' => ['search_contains' => true, 'single_backstroke_delete' => false]]);
?>
    <?php 
echo $form->field($model, 'is_win')->checkbox();
?>
    <?php 
echo $form->field($model, 'deck_types_id')->widget(Chosen::className(), ['items' => $deck_type_options, 'disableSearch' => 5, 'clientOptions' => ['search_contains' => true, 'single_backstroke_delete' => false]]);
?>
    <?php 
echo $form->field($model, 'classes_id')->widget(Chosen::className(), ['items' => $classes_options, 'disableSearch' => 5, 'clientOptions' => ['search_contains' => true, 'single_backstroke_delete' => false]]);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
            echo $form->field($model, $attr)->widget(FileAPI::className(), isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_TEXT:
            echo $form->field($model, $attr)->textarea(isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_DATE:
            echo $form->field($model, $attr)->widget(DateTimePicker::classname(), isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_BOOLEAN:
            echo $form->field($model, $attr)->checkbox();
            break;
        case Content::ATTR_TYPE_DROPDOWN:
            echo $form->field($model, $attr)->dropDownList(isset($value['items']) ? $value['items'] : [], isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_MULTIPLE_SELECT:
            echo $form->field($model, $attr)->widget(Chosen::className(), isset($value['config']) ? $value['config'] : []);
            break;
        default:
            break;
    }
}
if ($titleAttribute != null && $urlAttribute != null) {
    $this->registerJs('
             $(document).ready(function(){
                    $("#' . Html::getInputId($model, $titleAttribute) . '").syncTranslit({destination: "' . Html::getInputId($model, $urlAttribute) . '"});
                    $("#' . Html::getInputId($model, $urlAttribute) . '").syncTranslit({destination: "' . Html::getInputId($model, $urlAttribute) . '"});
                });
                $("span.attached-button-chain").on("click", function () {
                    if ($("#' . Html::getInputId($model, $urlAttribute) . '").attr("readonly")) {
                        $("#' . Html::getInputId($model, $urlAttribute) . '").attr("readonly", false);
                    } else {
Example #3
0
<div class="bookings-form">

    <?php 
$form = ActiveForm::begin(['enableClientValidation' => true]);
?>
    
    <div class="col-lg-12">
        
        <h3>add customer</h3>
        
        <div class="row">
            <div class="col-lg-3 col-md-3">

                <?php 
echo $form->field($model, 'idCustomer')->widget(Chosen::className(), ['placeholder' => 'Choose Customer', 'items' => $customers, 'allowDeselect' => false, 'disableSearch' => false, 'clientOptions' => ['search_contains' => true, 'max_selected_options' => 1]])->label(false);
?>
            </div>
            <div class="col-lg-9 col-md-9 customer-details">
                
            </div>
        </div>
        
        <h3>add item</h3>
        <?php 
echo Html::hiddenInput('added-items-list', '', ['id' => 'added-items-list']);
?>
        <div class="row">
            <div class="col-lg-6">
                <div class="form-group field-bookings-deliverydate required">
                    <div class='input-group date required' id='datepicker-delivery'>
<?php 
$form = ActiveForm::begin(['id' => 'form-category-update', 'options' => ['enctype' => 'multipart/form-data']]);
?>
<div class="box">
    <div class="box-body">
        <div class="row">
            <div class="col-xs-6">
                <?php 
echo $form->field($model, 'title');
?>
            </div>

            <div class="col-xs-6">
                <?php 
echo $form->field($model, 'parent')->widget(Chosen::className(), ['placeholder' => 'Выберите родителя', 'items' => Category::getAllToList(), 'multiple' => false]);
?>
            </div>
        </div>

        <?php 
echo $form->field($model, 'description')->widget(imperaviWidget::className());
?>
    </div>
    <div class="box-footer text-right">
        <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'name' => 'save-button']);
?>
    </div>
</div>
<?php 
Example #5
0
echo $form->field($model, 'parent_deck_id')->widget(Chosen::className(), ['items' => $deck_options, 'disableSearch' => 5, 'clientOptions' => ['search_contains' => true, 'single_backstroke_delete' => false]]);
?>

    <?php 
echo $form->field($model, 'description')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'type')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'owner_id')->textInput();
?>

    <?php 
echo $form->field($model, 'cards')->widget(Chosen::className(), ['items' => $card_options, 'multiple' => true, 'disableSearch' => 5, 'clientOptions' => ['search_contains' => true, 'single_backstroke_delete' => false, 'max_selected_options' => 30]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Example #6
0
?>

			<?php 
echo $form->field($model, 'nama')->textInput(['maxlength' => 255]);
?>

			<?php 
echo $form->field($model, 'hp')->textInput(['maxlength' => 255]);
?>

			<?php 
echo $form->field($model, 'email')->input('email');
?>

			<?php 
echo $form->field($model, 'universitas')->widget(Chosen::className(), ["items" => Yii::$app->params['universitas'], "options" => ["id" => "universitas"]]);
?>

			<?php 
echo $form->field($model, 'jurusan')->textInput(['maxlength' => 255]);
?>

			<?php 
echo $form->field($model, 'npm')->textInput(['maxlength' => 255, 'id' => 'npm']);
?>

		</div>
	</div>
	<div class="row">
		<div class="col-lg-offset-4 col-lg-8">
			<?php