public function caracteristicas() { // en general $data['tipos_local'] = TipoLocal::all(); $data['capacidades_local'] = CapacidadLocal::all(); $data['tipos_evento'] = TipoEvento::all(); $data['caracteristicas_local'] = CaracteristicaLocal::all(); $data['servicios_extra'] = ServicioExtra::all(); //particular de cada cliente return view('admin.caracteristicas', compact('data')); }
<div class="perfil-evento-form"> <?php $form = ActiveForm::begin(['enableAjaxValidation' => true]); ?> <?php echo $form->field($model, 'NAME_EVENT')->textInput(['maxlength' => true]); ?> <!-- <?php echo $form->field($model, 'TYPE_EVENT')->textInput(['maxlength' => true]); ?> --> <?php echo $form->field($model, 'TYPE_EVENT')->widget(Select2::classname(), ['data' => ArrayHelper::map(TipoEvento::find()->all(), 'TYPE_EVENT', 'TYPE_EVENT'), 'language' => 'en', 'options' => ['placeholder' => 'Selecciona el Tipo de Evento'], 'pluginOptions' => ['allowClear' => true]]); ?> <!-- <?php echo $form->field($model, 'DATE_EVENT')->textInput(); ?> --> <?php echo $form->field($model, 'DATE_EVENT')->widget(DatePicker::className(), ['inline' => false, 'language' => 'es', 'options' => ['placeholder' => 'AÑO - MES - DIA'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']]); ?> <?php echo $form->field($model, 'STATUS_EVENT')->widget(Select2::classname(), ['data' => ArrayHelper::map(EstadoEvento::find()->all(), 'STATUS_EVENT', 'STATUS_EVENT'), 'language' => 'en', 'options' => ['placeholder' => 'Selecciona el Estado del Evento'], 'pluginOptions' => ['allowClear' => false]]);
/** * @return \yii\db\ActiveQuery */ public function getTYPEEVENT() { return $this->hasOne(TipoEvento::className(), ['TYPE_EVENT' => 'TYPE_EVENT']); }