Example #1
0
    }
    
    $mobile_form = '';
    if(is_array($model->venueMap) && count($model->venueMap)){
        foreach($model->venueMap as $mapmodel){
            $mobile_form .= $form->field($mapmodel->venueMap, 'mobile')->textInput(['maxlength' => 255,'name'=>$model->formName().'[mobile][]']);
        }
    }else{
       $mobile_form = $form->field($map, 'mobile')->textInput(['maxlength' => 255,'name'=>$model->formName().'[mobile][]']);
    }
    //*/
//echo "<pre>";
//
//
// var_dump($model);
echo Collapse::widget(['box' => true, 'items' => ['Basic Details' => ['content' => implode("\n", [$form->field($model, 'venueType')->dropDownList(ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\VenueType::find()->andWhere(['status' => 1])->All(), 'Id', 'name'))), $form->field($model, 'name')->textInput(['maxlength' => 255])]), 'contentOptions' => ['class' => 'in'], 'options' => ['class' => 'box-primary']], 'Contact Details' => ['content' => implode("\n", [$form->field($model, 'contactName')->textInput(['maxlength' => 255]), $form->field($model, 'email')->textInput(['maxlength' => 255]), is_array($model->venueMap) && count($model->venueMap) ? $form->field($model->venueMap[0], 'phone', ['selectors' => ['input' => '.multiphone']])->widget(DynamicField::className(), ['name' => $model->formName() . '[phone][]', 'options' => ['class' => 'multiphone', 'model' => $map, 'models' => $model->venueMap]]) : $form->field($map, 'phone', ['selectors' => ['input' => '.multiphone']])->widget(DynamicField::className(), ['name' => $model->formName() . '[phone][]', 'options' => ['class' => 'multiphone']]), is_array($model->venueMap) && count($model->venueMap) ? $form->field($model->venueMap[0], 'mobile', ['selectors' => ['input' => '.multimobile']])->widget(DynamicField::className(), ['name' => $model->formName() . '[mobile][]', 'options' => ['class' => 'multimobile', 'model' => $map, 'models' => $model->venueMap]]) : $form->field($map, 'mobile', ['selectors' => ['input' => '.multimobile']])->widget(DynamicField::className(), ['name' => $model->formName() . '[mobile][]', 'options' => ['class' => 'multimobile']]), $form->field($model, 'tollfree')->textInput(['maxlength' => 15])]), 'options' => ['class' => 'box-success']], 'Location Details' => ['content' => implode("\n", [$form->field($model, 'cityId')->dropDownList(ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\City::find()->andWhere(['status' => 1])->All(), 'Id', 'name'))), $form->field($model, 'zoneId')->widget(DepDrop::classname(), ['options' => ['id' => strtolower($model->formName()) . '-zoneid'], 'data' => ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\Zone::find()->andWhere(['status' => 1, 'cityId' => $model->cityId])->All(), 'Id', 'name')), 'type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => [strtolower($model->formName()) . '-cityid'], 'placeholder' => 'Select Zone', 'url' => Url::to(['/zone/zone/autosuggest'])]]), $form->field($model, 'localityId')->widget(DepDrop::classname(), ['options' => ['id' => 'venue-localityid'], 'data' => ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\Locality::find()->andWhere(['status' => 1, 'cityId' => $model->cityId])->All(), 'Id', 'name')), 'type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => [strtolower($model->formName()) . '-cityid', strtolower($model->formName()) . '-zoneid'], 'placeholder' => 'Select Locality', 'url' => Url::to(['/locality/locality/autosuggest'])]]), $form->field($model, 'address')->textInput(['maxlength' => 255]), $form->field($model, 'landmark')->textInput(['maxlength' => 255]), $form->field($model, 'gpsLat')->textInput(), $form->field($model, 'gpsLong')->textInput()]), 'options' => ['class' => 'box-danger']], 'More Details' => ['content' => implode("\n", [$form->field($model, 'description')->textarea(['rows' => 6]), $form->field($model, 'facility')->listBox(ArrayHelper::merge([0 => 'Select'], ArrayHelper::map(\common\models\Features::find()->andWhere(['status' => 1, 'flag' => 1])->All(), 'Id', 'name')), ['id' => 'facility', 'multiple' => 'multiple']), $form->field($model, 'url')->textInput(['maxlength' => 100, 'placeholder' => 'Type a valid url ex: http://timescity.com']), $form->field($model, 'facebookUrl')->textInput(['maxlength' => 100, 'placeholder' => 'Type a valid url ex: http://facebook.com']), $form->field($model, 'seatType')->textInput(['maxlength' => 100]), $form->field($model, 'capacity')->textInput(), $form->field($model, 'reservationInfo')->textInput(['maxlength' => 100]), $form->field($model, 'startTime')->textInput(), $form->field($model, 'endTime')->textInput(), $model->multipleFormField('tag', $model->getTagData())]), 'options' => ['class' => 'box-info']], 'Images' => ['content' => MediaUpload::widget(['data' => $model->media['images'], 'previewurl' => yii::$app->params['imagepreviewurl'], 'path' => 'venue', 'options' => ['addRemoveLinks' => true, 'inputparam' => $model->formName() . '[media][]']]), 'options' => ['class' => 'box-info']]]]);
echo WorkflowButtons::widget(['view' => $this, 'model' => $model]);
Column::end();
Row::end();
?>

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

    <?= $form->field($model, 'cityId')->textInput() ?>

    <?= $form->field($model, 'zoneId')->textInput() ?>

    <?= $form->field($model, 'localityId')->textInput() ?>
Example #2
0
    <?php 
// $form->field($model, 'ip')->textInput(['maxlength' => 100])
?>
    
    <p><h4 class="box-title">Images</h4></p>
     
         <?php 
echo MediaUpload::widget(['data' => $model->media['images'], 'previewurl' => yii::$app->params['imagepreviewurl'], 'path' => $model->imagePath, 'options' => ['addRemoveLinks' => true, 'inputparam' => $model->formName() . '[media][]']]);
?>
     <p>&nbsp;</p>
     
     <p><h4 class="box-title">Menus</h4></p>
     
         <?php 
echo MediaUpload::widget(['data' => $model->media['menus'], 'previewurl' => yii::$app->params['imagepreviewurl'], 'path' => $model->menuimagePath, 'options' => ['addRemoveLinks' => true, 'inputparam' => $model->formName() . '[menu][]']]);
?>
     <p>&nbsp;</p>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        &nbsp;&nbsp;<?php 
echo Html::resetButton('Reset', ['class' => 'btn  btn-default']);
?>
        &nbsp;&nbsp;<?php 
echo Html::a('Back', '/chaincitymap', ['class' => 'btn  btn-default']);
?>
    </div>
    <?php 
Example #3
0
use yii\adminUi\widget\Collapse;
use yii\adminUi\widget\Box;
use yii\adminUi\widget\Column;
use yii\adminUi\widget\Row;
use yii\adminUi\widget\ButtonGroup;
use yii\adminUi\widget\Button;
use common\modules\media\widgets\MediaUpload;
use common\modules\media\widgets\EmbedUpload;
/* @var $this yii\web\View */
/* @var $model common\models\Asset */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="asset-form">
    <?php 
$mediaupload = MediaUpload::widget(['options' => ['addRemoveLinks' => true]]);
$embedupload = EmbedUpload::widget();
Row::begin();
Column::begin(['grid' => [['type' => Column::TYPE_DESKTOP, 'size' => Column::SIZE_FULL]]]);
echo ButtonGroup::widget(['buttons' => [Button::widget(['label' => 'Media Upload', 'options' => ['class' => 'btn-primary btn-lg col-xs-6 col-sm-6 col-md-6 col-lg-6', 'data-toggle' => "collapse", 'data-target' => '#media-upload', 'data-parent' => "#media-upload-wrapper"]]), Button::widget(['label' => 'Embed Media Upload', 'options' => ['class' => 'btn-info btn-lg col-xs-6 col-sm-6 col-md-6 col-lg-6', 'data-toggle' => "collapse", 'data-target' => '#embed-upload', 'data-parent' => "#media-upload-wrapper"]])], 'options' => ['class' => 'col-md-12']]);
Column::end();
Row::end();
Row::begin();
Column::begin(['grid' => [['type' => Column::TYPE_DESKTOP, 'size' => Column::SIZE_FULL]]]);
echo Collapse::widget(['box' => false, 'header' => false, 'options' => ['id' => 'media-upload-wrapper'], 'items' => [['content' => $mediaupload, 'contentOptions' => ['id' => 'media-upload']], ['content' => $embedupload, 'contentOptions' => ['id' => 'embed-upload']]]]);
Column::end();
Row::end();
/*
    echo MediaUpload::widget([
        'options' => [
            'addRemoveLinks' => true,