Beispiel #1
0
                <div class="">
                    <?php 
$this->beginBlock('main');
?>

                    <p>
                        <input type="tel" hidden /> <!-- disable chrome autofill -->
                        <?php 
echo $form->field($model, 'password')->passwordInput(['maxlength' => true, 'autocomplete' => "off"]);
?>
                        <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
                        <?php 
echo $form->field($model, 'photo_url')->widget(\kartik\widgets\FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['allowedFileExtensions' => ['jpg', 'png', 'jpeg', 'gif', 'bmp'], 'maxFileSize' => 250]]);
?>
                        <?php 
if ($model->photo_url != null) {
    ?>
                            <div class="form-group">
                                <div class="col-sm-6 col-sm-offset-3">
                                    <?php 
    echo Html::img(["uploads/" . $model->photo_url], ["width" => "150px"]);
    ?>
                                </div>
                            </div>
                            <?php 
}
?>
                    </p>
Beispiel #2
0
echo $form->field($model, 'notifications')->checkbox();
?>

                    <div class = 'form-group field-old_avatar'>
                        <div class = "row">
                            <div class="col-xs-12">
                                <label class="control-label" for="old_avatar">Ваш аватар</label>
                            </div>
                        </div>
                        <?php 
echo Html::img($model->fileUrl, ['id' => 'old_avatar', 'width' => 100]);
?>
                    </div>

                    <?php 
echo $form->field($model, 'avatar')->widget(FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['showRemove' => false, 'showUpload' => false]]);
?>

                    <h3>Смена пароля</h3>

                    <?php 
echo $form->field($model, 'password', ['options' => ['class' => 'form-group has-feedback']])->passwordInput(['placeholder' => 'Новый пароль'])->label(false);
?>

                    <?php 
echo $form->field($model, 'password_repeat', ['options' => ['class' => 'form-group has-feedback']])->passwordInput(['placeholder' => 'Повторите пароль'])->label(false);
?>

                    <div class="form-group">
                        <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary', 'name' => 'contact-button']);
Beispiel #3
0
use vova07\imperavi\Widget as Imperavi;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Slide */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="slide-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'image')->widget(FileInput::className(), ['options' => ['accept' => 'image/jpeg'], 'pluginOptions' => ['showUpload' => false, 'browseLabel' => Yii::t('backend/slide', 'Browse'), 'removeLabel' => Yii::t('backend/slide', 'Delete'), 'removeClass' => 'btn btn-danger', 'initialPreview' => $model->isNewRecord ? false : [Html::img(Yii::$app->urlManagerFrontEnd->baseUrl . '/uploads/slide/' . $model->id . '.jpg', ['class' => 'file-preview-image'])]]]);
?>

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

    <?php 
echo $form->field($model, 'body')->widget(Imperavi::className(), ['settings' => ['minHeight' => 200, 'plugins' => ['fontsize', 'fontfamily', 'fontcolor'], 'buttons' => ['html', 'formatting', 'bold', 'italic', 'deleted', 'link']]]);
?>

    <?php 
echo $form->field($model, 'sortOrder')->input('number')->hint(Yii::t('backend/slide', 'If empty it will be generated automatically'));
?>

    <div class="form-group">
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
 * @var yii\web\View $this
 * @var common\models\SliderImage $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="slider-image-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>
Beispiel #5
0
echo $form->field($model, 'ciudad')->textInput(['maxlength' => true]);
?>

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

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

    <?php 
echo $form->field($model, 'telefono')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'image')->widget(FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['initialPreview' => [Html::img('@web/uploads/' . $model->firma, ['class' => 'file-preview-image', 'alt' => 'The Moon', 'title' => 'The Moon'])]]]);
?>


    <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>
		<?php 
echo $form->field($model, 'status')->dropDownList([Category::ENABLE => Yii::t('app', 'Enable'), Category::DISABLE => Yii::t('app', 'Disable')]);
?>

	</div>
</div>


    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>

<div class="row">
	<div class="col-sm-6">
	    <?php 
echo $form->field($model, 'imageFile')->widget(FileInput::className());
?>

	    <?php 
echo $form->field($model, 'parent', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-heart"></i>']]])->widget(Select2::className(), ['data' => [null => Yii::t('shop', '-- Select parent Category --')] + Category::CategoryOptions()]);
?>

	</div>
</div>



    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('shop', 'Create') : Yii::t('shop', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
Beispiel #7
0
<div class="shop-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

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

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

    <?php 
echo $form->field($model, 'imageFile')->widget(FileInput::className(), ['options' => ['multiple' => true]]);
?>

    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>

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

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

    <div class="form-group">
Beispiel #8
0
?>

<div class="gallery-record-form">

    <?php 
$form = ActiveForm::begin(['id' => 'gallery-record-form', 'full' => true, 'options' => array('enctype' => 'multipart/form-data')]);
?>

    <?php 
echo Html::activeHiddenInput($model, 'module', ['value' => 'gallery']);
?>
    <?php 
echo Html::activeHiddenInput($model, 'model', ['value' => 'GalleryRecord']);
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true, 'enableAjaxValidation' => true]);
?>
    <?php 
echo $form->field($model, 'file')->widget(\kartik\widgets\FileInput::className(), ['options' => ['accept' => 'image/*']]);
?>

    <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('gallery', 'Create') : Yii::t('gallery', 'Update'), ['class' => 'btn btn-block']);
?>

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

</div>
Beispiel #9
0
    $images[] = Html::img(Yii::$app->urlManagerFrontEnd->baseUrl . '/uploads/product/' . $model->id . '/' . $image->id . '.jpg', ['class' => 'file-preview-image']);
}
?>

<div class="product-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'image')->widget(FileInput::className(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['showUpload' => false, 'browseLabel' => Yii::t('backend/product', 'Browse'), 'removeLabel' => Yii::t('backend/product', 'Delete'), 'removeClass' => 'btn btn-danger', 'initialPreview' => $model->isNewRecord ? false : [Html::img($model->getMainImage('urlManagerFrontEnd'), ['class' => 'file-preview-image'])]]]);
?>

    <?php 
echo $form->field($model, 'images[]')->widget(FileInput::className(), ['options' => ['accept' => 'image/*', 'multiple' => true], 'pluginOptions' => ['maxFileCount' => 10, 'showUpload' => false, 'browseLabel' => Yii::t('backend/product', 'Browse'), 'removeLabel' => Yii::t('backend/product', 'Delete'), 'removeClass' => 'btn btn-danger', 'initialPreview' => $images]]);
?>

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

    <?php 
echo $form->field($model, 'price', ['addon' => ['prepend' => ['content' => Yii::$app->formatter->currencyCode]]])->input('number');
?>

    <?php 
echo $form->field($model, 'description')->widget(Imperavi::className(), ['settings' => ['minHeight' => 200, 'plugins' => ['table', 'video', 'fontsize', 'fontfamily', 'fontcolor']]]);
?>

    <?php