Example #1
0
$form = ActiveForm::begin(['id' => 'articulo', "enableClientValidation" => false, 'enableAjaxValidation' => false, 'validateOnChange' => false, 'options' => ['validateOnSubmit' => true, 'enctype' => 'multipart/form-data', 'class' => 'enviarForm form', 'role' => 'form'], 'fieldConfig' => ['template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}", 'hintOptions' => ['tag' => 'span'], 'errorOptions' => ['tag' => 'span'], 'horizontalCssClasses' => ['label' => 'col-sm-3', 'offset' => 'col-sm-offset-3', 'wrapper' => 'col-sm-9', 'error' => 'error-block', 'hint' => 'help-block']]]);
?>
    <!-- BEGIN CONTENIDO -->
    <div class="row">
        <div class="col-md-12">
            <div class="card-box">

                <?php 
echo Html::activeHiddenInput($model, 'idarticulo');
?>

                    <div class="row">
                        <div class="col-xs-12">

                            <?php 
echo DropZone::widget(['subirUrl' => Yii::$app->urlManager->createUrl('addimagenes'), 'eliminarUrl' => Yii::$app->urlManager->createUrl('delimagenes'), 'textoContenedor' => 'Arrastra aquí tus fotos. Puedes subir varias a la vez', 'iconContenedor' => 'zmdi zmdi-image', 'initImagenes' => $listadoImagenes, 'initImagenPrincipal' => $ImagenPrincipal, 'maxImagenes' => 4, 'options' => ['maxFilesize' => '2']]);
?>
                            <!-- fin imagenes -->
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <?php 
echo $form->field($model, 'nombre')->textInput(['class' => $inputClase . ' validar', 'autocomplete' => 'off'])->label('¿Qué vendes?');
?>
                            <?php 
echo $form->field($model, 'descripcion')->textarea(['class' => 'editor validar'])->label('¿Cómo es?');
?>
                        </div>
                    </div>
Example #2
0
                        <div class="col-xs-5">
                            <?php 
echo $form->field($model, 'precio', $inputOpciones)->textInput(['class' => $inputClase, 'autocomplete' => 'off']);
?>
                        </div>
                        <div class="col-xs-7"></div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <span class="opacity-50"><?php 
echo $model->getAttributeLabel('imagenes');
?>
</span>
                            <?php 
echo DropZone::widget(['subirUrl' => Url::toRoute(['articulos/addimagenes']), 'eliminarUrl' => Url::toRoute(['articulos/delimagenes']), 'textoContenedor' => 'Arrastra aquí tus fotos. Puedes subir varias a la vez', 'initImagenes' => $listadoImagenes, 'initImagenPrincipal' => $ImagenPrincipal, 'maxImagenes' => 4, 'options' => ['maxFilesize' => '2']]);
?>
                            <!-- fin imagenes -->
                          </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">


                        </div>
                    </div>

                    <?php 
// $form->field($model, 'categoria')->dropDownList( $categorias->listado(), ['prompt' => '','class' => 'form-control'])
?>