コード例 #1
0
ファイル: _form.php プロジェクト: czechcamus/dasport
?>

		<?php 
echo $form->field($model, 'date_from')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE, 'language' => Yii::$app->language]);
?>

		<?php 
echo $form->field($model, 'date_to')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE, 'language' => Yii::$app->language]);
?>

		<?php 
echo $form->field($model, 'time_from')->widget(TimePicker::className(), ['pluginOptions' => ['defaultTime' => false, 'showSeconds' => false, 'showMeridian' => false], 'options' => ['class' => 'form-control']]);
?>

		<?php 
echo $form->field($model, 'time_to')->widget(TimePicker::className(), ['pluginOptions' => ['defaultTime' => false, 'showSeconds' => false, 'showMeridian' => false], 'options' => ['class' => 'form-control']]);
?>

		<?php 
echo $form->field($model, 'hour_length')->widget(Spinner::className());
?>

		<div class="form-group">
			<?php 
echo Html::submitButton($actionId != 'update' ? Module::t('res', 'Create') : Module::t('res', 'Update'), ['class' => $actionId == 'create' ? 'btn btn-success' : 'btn btn-primary']);
?>
		</div>

		<?php 
ActiveForm::end();
?>
コード例 #2
0
ファイル: _form.php プロジェクト: altair141/videoClub
?>

    <?php 
echo $form->field($model, 'tipo_hora_id')->dropDownList(ArrayHelper::map(TipoHora::find()->all(), 'id', 'nombre'), ['prompt' => 'Seleccionar Tipo de Hora', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'profesional_id')->dropDownList(ArrayHelper::map(Profesional::find()->all(), 'id', 'Nombres'), ['prompt' => 'Seleccionar Profesional', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'administrador_id')->dropDownList(ArrayHelper::map(Administrador::find()->all(), 'id', 'Nombres'), ['prompt' => 'Seleccionar Administrador', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'hora_inicio')->widget(TimePicker::className(), ['pluginOptions' => ['format' => 'HH:MM', 'showMeridian' => false, 'minuteStep' => 1], 'options' => ['style' => 'width:260px'], 'addonOptions' => ['asButton' => true, 'inline-addon' => true]]);
?>

    <?php 
echo $form->field($model, 'tiempo_periodo')->textInput(['style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'fecha')->widget(DatePicker::className(), ['removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'options' => ['style' => 'width:260px']]);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
コード例 #3
0
ファイル: _form.php プロジェクト: shubnikofff/teleport
    <div class="row">

        <?php 
echo $form->field($model, 'dateInput', ['enableAjaxValidation' => true, 'options' => ['class' => 'col-lg-3 vks-date-time']])->widget(DatePicker::className(), ['type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'startDate' => '0d']]);
?>

        <?php 
$timepickerOptions = ['pluginOptions' => ['showMeridian' => false]];
?>

        <?php 
echo $form->field($model, 'beginTimeInput', ['enableAjaxValidation' => true, 'options' => ['class' => 'col-lg-2 vks-date-time']])->widget(TimePicker::className(), $timepickerOptions);
?>

        <?php 
echo $form->field($model, 'endTimeInput', ['enableAjaxValidation' => true, 'options' => ['class' => 'col-lg-2 vks-date-time']])->widget(TimePicker::className(), $timepickerOptions);
?>

    </div>

    <small class="help-block"><span class="glyphicon glyphicon-info-sign"></span> Укажите дату не
        ранее <?php 
echo Yii::$app->formatter->asDate(time(), 'long');
?>
 и не
        позднее <?php 
echo Yii::$app->formatter->asDate(strtotime("+1 week"), 'long');
?>
        Время должно быть в интервале c <?php 
echo MinuteFormatter::asString(Yii::$app->params['vks.minTime']);
?>
コード例 #4
0
ファイル: slots.php プロジェクト: bth2008/rferu
?>
) </h1>
    </div>
    <div class="row">
        <?php 
echo \yii\grid\GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-striped'], 'layout' => '{items}', 'columns' => [['attribute' => 'timeslot', 'format' => 'html', 'value' => function ($data) {
    return "<i class='fa fa-clock-o'></i><b> {$data->timeslot}</b>";
}], ['attribute' => 'vid', 'format' => 'html', 'header' => 'Info', 'value' => function ($data) {
    return $data->vid ? \yii\helpers\Html::a('Booked by ' . $data->vid, \yii\helpers\Url::to(['/booking/showslotinfo/', 'id' => $data->id]), ['class' => 'btn btn-danger']) : \yii\helpers\Html::a('Book', \yii\helpers\Url::to(['/booking/bookslot', 'id' => $data->id]), ['class' => 'btn btn-success']);
}], ['visible' => !Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin, 'header' => 'Admin', 'class' => \yii\grid\ActionColumn::className(), 'template' => '{delete}', 'buttons' => ['delete' => function ($url, $model, $key) {
    return \yii\bootstrap\Html::a("<i class='fa fa-trash'></i>", \yii\helpers\Url::to('/booking/deleteslot/' . $model->id));
}]]]]);
?>
    </div>
    <?php 
if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin) {
    ?>
    <div class="row">
        <?php 
    $form = \kartik\form\ActiveForm::begin(['type' => 'inline']);
    echo $form->field($model, 'timeslot')->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false]]);
    echo " ";
    echo \yii\bootstrap\Html::submitButton('<i class="fa fa-check"></i>Add', ['class' => 'btn btn-success btn-sm']);
    \kartik\form\ActiveForm::end();
    ?>
    </div>
    <?php 
}
?>
</div>
コード例 #5
0
ファイル: _form.php プロジェクト: noeliovando/yii2advance
?>
        </div>
        <div class="col-lg-6">

            <?php 
echo $form->field($model, 'hora_ini')->widget(TimePicker::className(['readonly' => true]), []);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-6">

        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'hora_fin')->widget(TimePicker::className(), []);
?>
        </div>
    </div>

    <?php 
// $form->field($model, 'HH')->textInput(['id'=>'HH'])
?>

    <?php 
echo $form->field($model, 'id_status')->dropDownList($model->getStatus());
?>

    <?php 
echo $form->field($model, 'detalle')->textarea(['rows' => 6]);
?>
コード例 #6
0
<div class="bitacora-tiempo-form">

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

    <?php 
echo $form->field($model, 'fecha')->widget(\yii\jui\DatePicker::className(), ['dateFormat' => 'dd-MM-yyyy', 'value' => date('d/m/Y'), 'options' => ['style' => 'position: relative; z-index: 999', 'class' => 'form-control']]);
?>

    <?php 
echo $form->field($model, 'hora_inicio')->widget(\kartik\time\TimePicker::className(), ['pluginOptions' => ['minuteStep' => 1]]);
?>

    <?php 
echo $form->field($model, 'hora_final')->widget(\kartik\time\TimePicker::className(), ['pluginOptions' => ['minuteStep' => 1]]);
?>

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

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

    <?php 
$proyectos = ArrayHelper::map(Proyecto::find()->where(['activo' => 1])->orderBy('nombre')->all(), 'id', 'nombre');
echo $form->field($model, 'id_proyecto')->widget(\kartik\select2\Select2::className(), ['data' => $proyectos, 'language' => 'es', 'options' => ['placeholder' => 'Seleccione un proyecto...'], 'pluginOptions' => ['allowClear' => true]]);
?>
コード例 #7
0
ファイル: _form.php プロジェクト: jslight/helpdesk
?>
        <p>
            <?php 
echo $form->field($model, 'password')->passwordInput(['maxlength' => true]);
?>

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

            <?php 
echo $form->field($model, 'startTime')->widget(\kartik\time\TimePicker::className());
?>

            <?php 
echo $form->field($model, 'endTime')->widget(\kartik\time\TimePicker::className());
?>

            <?php 
echo $form->field($model, 'roles')->checkboxList($model::AllRoles());
?>
        </p>

        <div class="hide">
            <?php 
echo $form->field($model, 'contact_id')->hiddenInput();
?>
        </div>
        <?php 
$this->endBlock();
?>