Example #1
0
 public function run()
 {
     /*$themeClass = THEME_ASSET;
       $theme = new $themeClass();
       $baseUrl = \Yii::getAlias($theme->baseUrl);
       $content = '<style type="text/css">';
       foreach($theme->css as $k=>$css)
       {
           if(!preg_match('#^(http|https)#',$css))
               $content .= '@import "'.$baseUrl.'/'.$css.'";'."\r\n";
       }
       $content .= '</style>';
       echo $content;*/
     parent::run();
 }
Example #2
0
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->errorSummary($model);
?>

    <?php 
$language_items = [];
$redactorClientOptions = ['imageManagerJson' => ['/redactor/upload/image-json'], 'imageUpload' => ['/redactor/upload/image'], 'fileUpload' => ['/redactor/upload/file'], 'lang' => Yii::$app->language, 'plugins' => ['clips', 'fontcolor', 'imagemanager']];
foreach ($languages as $key => $language) {
    $field = $form->field($model, "title_{$language->url}")->textInput(['maxlength' => true])->label('Title');
    $field_description = $form->field($model, "description_{$language->url}")->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => $redactorClientOptions]);
    if ($languageDefault->url == $language->url) {
        $field = $form->field($model, "title")->textInput(['maxlength' => true]);
        $field_description = $form->field($model, 'description')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => $redactorClientOptions]);
    }
    $language_items[] = ['label' => Yii::t('backend', $language->name), 'content' => "<p>{$field} {$field_description}</p>", 'active' => $key == 0];
}
echo Tabs::widget(['items' => $language_items]);
?>
    <?php 
echo $form->field($model, 'file')->widget(FileInput::classname(), ['options' => ['multiple' => false, 'accept' => 'pdf/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false]])->label(Yii::t('backend', 'Video File'));
?>
    
    <?php 
echo $form->field($model, 'external_url')->textInput(['maxlength' => true]);
?>
    <?php 
$localFileExists = file_exists($model->getUploadedFilePath('file'));
?>
Example #3
0
?>

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

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

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

    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 6])->widget(\yii\redactor\widgets\Redactor::className());
?>

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

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

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

    <?php 
Example #4
0
?>

            <?php 
echo $form->field($model, 'name')->label('Название');
?>

            <?php 
echo $form->field($model, 'slug')->label('Путь к ссылке');
?>

            <?php 
echo $form->field($model, 'text_short')->textarea()->label('Анонс')->widget(Redactor::className());
?>

            <?php 
echo $form->field($model, 'text_bb')->textarea()->label('Текст новости')->widget(Redactor::className());
?>

            <?php 
echo $form->field($model, 'status')->checkbox()->label('Опубликовать сразу');
?>

            <div class="form-group">
                <?php 
echo Html::submitButton('Обновить', ['class' => 'btn btn-primary', 'name' => 'edit-button']);
?>
            </div>

         <?php 
ActiveForm::end();
?>
Example #5
0
        ?>
				</div>
			<?php 
    }
    ?>
			<?php 
    echo $form->field($model, 'count_completeness')->dropdownList(Visits::getCountCompletenessOptions());
    ?>
			<?php 
    echo $form->field($model, 'blur')->dropDownList(Projects::getBlurOptions());
    ?>
			<?php 
    echo $form->field($model, 'embargo')->widget(DatePicker::className(), ['type' => 1, 'options' => ['placeholder' => Yii::t('app', 'Selecteer datum')], 'pluginOptions' => ['format' => 'dd-mm-yyyy', 'todayHighlight' => true, 'autoclose' => true, 'weekStart' => 1]]);
    ?>
	    	<?php 
    echo $form->field($model, 'remarks')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['buttons' => ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'link', 'alignment', 'horizontalrule']]]);
    ?>
	    	<div class="form-group">
	            <?php 
    echo Html::submitButton(Yii::t('app', 'Opslaan'), ['class' => 'btn btn-primary pull-right']);
    ?>
	        </div>
	    <?php 
    ActiveForm::end();
    ?>
	    <?php 
    View::beginJs();
    ?>
			<script>
				/* If visits-checked-all equals FALSE then fetch boxes */
				if($('input[name="Visits[checked_all]"]:checked').val() == 0)
Example #6
0
	</div>
</div>
<div class="modal-dialog modal-dialog-block" role="document">
	<div class="modal-content">
		<div class="modal-body">
			<h1>喵呜评论</h1>
			<div class="component component-comment">
				<div class="media">
					<div class="media-left">
						<a href="#">
							<img class="media-object comment-avatar img-circle" src="http://www.atool.org/placeholder.png?size=64x64&text=头像"/>
						</a>
					</div>
					<div class="media-body">
						<h4 class="media-heading comment-name">闭眼虾米</h4>
						喵呜机真是不错~
					</div>
				</div>
				<?php 
$form = ActiveFormPlus::begin();
?>
					<?php 
echo $form->field($model, 'username')->widget(\yii\redactor\widgets\Redactor::className());
?>
				<?php 
ActiveFormPlus::end();
?>
			</div>
		</div>
	</div>
</div>
Example #7
0
?>
    </div>
    <div class="col-md-12">
    <?php 
echo $form->field($Setting, 'key')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>
    </div>
    <div class="col-md-12">
    <?php 
echo $form->field($Setting_ru, 'index')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['imageUpload' => \yii\helpers\Url::to(['/redactor/upload/image'])]]);
?>
    
    </div>
    <div class="col-md-12">
    <?php 
echo $form->field($Setting_en, 'index')->widget(\yii\redactor\widgets\Redactor::className());
?>
 
    </div>
    <div class="col-md-12">
    <div class="form-group">
        <?php 
echo Html::submitButton($Setting->isNewRecord ? 'Создать' : 'Сохранить', ['class' => $Setting->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
    </div>
    <?php 
ActiveForm::end();
?>

</div>
Example #8
0
?>

        <?php 
echo $form->field($mip_en, 'company_name')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>

        <?php 
echo $form->field($mip_en, 'description')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>

        <?php 
echo $form->field($mip_en, 'content')->textarea(['rows' => 6, 'class' => 'ntSaveForms form-control']);
?>

        <?php 
echo $form->field($mip_en, 'page')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['imageUpload' => \yii\helpers\Url::to(['/redactor/upload/image']), 'minHeight' => 500]]);
?>
 
    </div>

    <div class="col-md-12">
        <?php 
echo $form->field($mip, 'phone')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>
    </div>
    <div class="col-md-12">
        <?php 
echo $form->field($mip, 'email')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>
    </div>
    <div class="col-md-12">
Example #9
0
<div class="article-form">

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

    <?php 
echo $form->field($model, 'parent_id')->dropDownList(ArrayHelper::map(Article::find()->all(), 'id', 'title'), ['prompt' => 'Корень']);
?>
    
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'text')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['lang' => 'ru', 'plugins' => ['fontcolor', 'imagemanager']]]);
?>
    
    <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>
Example #10
0
$params = ['prompt' => 'Укажите тип новости'];
?>

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

    <?php 
echo $form->field($model, 'type')->dropDownList($items, $params);
?>
    



    <?php 
echo $form->field($model, 'description', ['options' => ['id' => 'ello']])->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['lang' => 'ru', 'plugins' => ['clips', 'fontcolor', 'imagemanager']]]);
?>

    <script>
    $(document).ready(function(){

      $("#ello1").on("click",function(){


        var a;
        var bs;
        // if($("#ello1").val() == "") bs = true;
        // var b = $.trim($(".redactor-editor".val()));
        // a = b.substr(0,100);

        // if(bs == true){
Example #11
0
?>

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

    <?php 
echo $form->field($model, 'status')->dropDownList([Yii::t('app', 'No'), Yii::t('app', 'Yes')]);
?>

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

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

    <?php 
if (!$model->isNewRecord) {
    echo $form->field($model, 'related');
}
?>

    <div class="form-group form-buttons">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Cancel'), Url::to(['list', 'node' => $model->category_id]));
?>
Example #12
0
?>

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

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

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

    <?php 
echo $form->field($model, 'description')->widget(\yii\redactor\widgets\Redactor::className());
?>

    <?php 
echo $form->field($model, 'color')->widget(ColorInput::classname(), ['options' => ['placeholder' => 'เลือกสีประจำห้อง']]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(['Y' => 'Y', 'N' => 'N'], ['prompt' => 'สถานะห้อง']);
?>

    <?php 
echo $form->field($model, 'room_img[]')->fileInput(['multiple' => true]);
?>
    <div class="well">
      <?php 
Example #13
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="status-form">

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

	<div class="row">
		<div class="col-md-8">
			<?php 
//= $form->field($model, 'message')->textarea(['rows' => 6])
?>
			<?php 
echo $form->field($model, 'message')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['imageManagerJson' => ['/redactor/upload/image-json'], 'imageUpload' => ['/redactor/upload/image'], 'fileUpload' => ['/redactor/upload/file'], 'plugins' => ['clips', 'fontcolor', 'imagemanager']]]);
?>
		</div>
		<div class="col-md-4">
		  <p>Ostane: <span id="counter2">0</span></p>
		</div>
	</div>
	
	<?php 
echo $form->field($model, 'permissions')->dropDownList($model->getPermissions(), ['prompt' => Yii::t('app', '- Choose Your Permissions -')]);
?>
			 
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
Example #14
0
echo $form->field($uploadForm, 'image', ['labelOptions' => ['label' => '公司logo']])->fileInput();
?>
    
	<?php 
if ($model->pic) {
    echo Html::img('/' . $model->pic, ['style' => 'width:300px']);
}
?>
	</div>
	
    <?php 
echo $form->field($model, 'from')->textInput(['maxlength' => true, 'placeholder' => '正晖资本']);
?>

    <?php 
echo $form->field($model, 'content')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['lang' => 'zh_cn', 'plugins' => ['bufferbuttons', 'fontcolor', 'imagemanager']]]);
?>


	<?php 
echo $form->field($model, 'type')->dropDownList([1 => '公司新闻', 2 => '行业资讯', 3 => '基金公告', 4 => '投资案例']);
?>

    <div class="form-group">
		<?php 
echo $model->isNewRecord ? '' : Html::resetButton('重置', ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
		<?php 
Example #15
0
 public function init()
 {
     list($this->clientOptions['lang']) = explode('-', \Yii::$app->language);
     parent::init();
 }
Example #16
0
?>

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

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

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

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

    <div class="form-group form-buttons">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a(Yii::t('app', 'Cancel'), Url::to(['list']));
?>
    </div>

    <?php 
ActiveForm::end();
?>
</div>
Example #17
0
                        <?php 
echo $form->field($model, 'subject');
?>
                    </div>
                    <div class="col-md-6">
                        <?php 
echo $form->field($model, 'email');
?>

                        <?php 
echo $form->field($model, 'website');
?>
                    </div>
                    <div class="col-md-12">
                        <?php 
echo $form->field($model, 'body', ['horizontalCssClasses' => ['label' => 'col-sm-2', 'offset' => 'col-sm-offset-2', 'wrapper' => 'col-sm-10', 'error' => 'col-sm-10', 'hint' => 'col-sm-10']])->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['buttons' => ['format', 'bold', 'italic', 'deleted', 'lists', 'image', 'file', 'link', 'horizontalrule'], 'plugins' => ['textdirection']]]);
?>

                        <?php 
echo $form->field($model, 'captcha', ['horizontalCssClasses' => ['label' => 'col-sm-2', 'offset' => 'col-sm-offset-2', 'wrapper' => 'col-sm-10', 'error' => 'col-sm-10', 'hint' => 'col-sm-10']])->label(false)->widget('Zelenin\\yii\\widgets\\Recaptcha\\widgets\\Recaptcha', ['clientOptions' => ['data-sitekey' => '6LfU0xMTAAAAAPa-B0U6o-WWwgGhMnyrVr7bPiFm']]);
?>

                        <div class="form-group">
                            <?php 
echo Html::submitButton('Submit', ['class' => 'buton b_asset buton-2 buton-mini pull-right', 'name' => 'contact-button']);
?>
                        </div>
                    </div>

                    <?php 
ActiveForm::end();
Example #18
0
<?php

/**
 * @var Category $node
 * @var ActiveForm $form
 */
use app\models\Category;
use app\modules\file\ImageSelector;
use kartik\form\ActiveForm;
use yii\bootstrap\Html;
use yii\helpers\Url;
use yii\redactor\widgets\Redactor;
echo $form->field($node, 'slug')->textInput(['readonly' => true]);
echo $form->field($node, 'image')->widget(ImageSelector::className());
echo $form->field($node, 'status')->dropDownList([Yii::t('app', 'No'), Yii::t('app', 'Yes')]);
echo $form->field($node, 'announce')->widget(Redactor::className());
if ($node->isLeaf() && !$node->isNewRecord) {
    echo Html::a(Yii::t('app', 'View products'), Url::to(['/admin/product/list', 'node' => $node->id]), ['class' => 'btn btn-success']);
}
Example #19
0
?>

<div class="content-form">

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

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

    <?php 
foreach (Yii::$app->urlManager->languages as $language => $details) {
    echo $form->field($model->translate($language), "[{$language}]name")->textInput();
    echo $form->field($model->translate($language), "[{$language}]content")->widget(Redactor::classname(), ['clientOptions' => ['plugins' => ['clips', 'fontcolor', 'imagemanager', 'fullscreen'], 'replaceDivs' => false]]);
}
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(Content::getStatuses());
?>

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

    <?php 
ActiveForm::end();
Example #20
0
?>

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

    <?php 
echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(Category::find()->all(), 'category_id', 'category_name'), ['prompt' => 'เลือกหมวดหมู่']);
?>

    <?php 
echo $form->field($model, 'description')->widget(\yii\redactor\widgets\Redactor::className());
?>

    <?php 
echo $form->field($model, 'course_detail')->widget(\yii\redactor\widgets\Redactor::className());
?>

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

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

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

    <?php 
Example #21
0
$form = ActiveForm::begin();
?>

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

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

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

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

    <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>
Example #22
0
/* @var $model app\models\News */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="news-form">

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

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

    <?php 
echo $form->field($model, 'detail')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['imageUpload' => Url::to(['/redactor/upload/image']), 'imageManagerJson' => Url::to(['/redactor/upload/image-json']), 'fileUpload' => Url::to(['/redactor/upload/file']), 'lang' => 'th', 'minHeight' => 300, 'plugins' => ['clips', 'fontcolor', 'imagemanager', 'video']]]);
?>

<?php 
echo $form->field($model, 'status')->dropDownList(['N' => 'N', 'U' => 'U'], ['prompt' => '']);
?>

    <div class="form-group">
<?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'บันทึก') : Yii::t('app', 'แก้ไข'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

<?php 
ActiveForm::end();
?>
Example #23
0
?>
    <header>
        <i class="fa fa-pencil-square-o"></i>
        <?php 
echo ucfirst(Yii::$app->controller->action->id);
?>
 Campaign: Review
    </header>
    <fieldset>
        <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

        <!--?= $form->field($model, 'contents')->widget(\yii\redactor\widgets\Redactor::className()) ?-->
        <?php 
echo $form->field($model, 'contents')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['buttons' => ['format', 'bold', 'italic', 'deleted', 'lists', 'image', 'horizontalrule', 'indent', 'outdent', 'alignment', 'orderedlist', 'unorderedlist']]]);
?>

    </fieldset>
    <footer>
        <div class="form-group">
            <?php 
echo Html::a('Manage', ['/review/index'], ['class' => 'btn btn-info', 'style' => 'color:white']);
?>
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            <?php 
if (!$model->isNewRecord) {
    ?>
            <?php 
Example #24
0
 public function redactor($options = [])
 {
     return $this->widget(Redactor::className(), ['clientOptions' => ['imageManagerJson' => ['/redactor/upload/image-json'], 'imageUpload' => ['/redactor/upload/image'], 'fileUpload' => ['/redactor/upload/file'], 'lang' => 'ru', 'plugins' => ['clips', 'fontcolor', 'imagemanager']]]);
 }
            <?php 
$form = ActiveForm::begin(['id' => 'email-form', 'options' => ['class' => ''], 'fieldConfig' => ['template' => "<div class=\"form-group has-feedback\">{label}\n{input}\n{error}</div>"]]);
?>

            <?php 
$field = $form->field($model, $model->isNewRecord ? 'title' : 'id')->label('Select a template');
$field->template = '<div class="row"><div class="col-md-3">{label}</div><div class="col-md-9">{input}</div></div>';
echo $model->isNewRecord ? $field : $field->dropDownList($model->templates, ['onchange' => 'window.location ="' . yii\helpers\Url::toRoute('/admin/emails') . '/"+$(this).val()']);
?>
            
            <?php 
echo $form->field($model, 'subject');
?>
            
            <?php 
echo $form->field($model, 'body')->widget(Redactor::className(), ['clientOptions' => ['lang' => 'en', 'plugins' => ['fontcolor']]]);
?>

            <div class="form-group text-right">
                <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => 'btn btn-primary']);
?>
            </div>
            
            <?php 
ActiveForm::end();
?>
        </div>
    </div>
</div><!-- admin-_emailTemplate -->
Example #26
0
echo $model->id;
?>
" class="btn btn-md btn-primary">View All Project Messages</a>
							</div>
						</div>
					</div>
				</div>

				<div class="col-md-6 admin-notes">
					<div class="panel panel-default">
					<div class="panel-heading"><strong>Project Notes</strong> <em>(Viewable to admins only)</em></div>
					<?php 
$form = ActiveForm::begin();
?>
					<?php 
echo \yii\redactor\widgets\Redactor::widget(['model' => $model, 'attribute' => 'admin_notes', 'clientOptions' => ['minHeight' => 200]]);
?>

						<div class="panel-body">
							<div class="form-group">
								<?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary']);
?>
							</div>
						</div>

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

					</div>
Example #27
0
                                <?php 
    }
    ?>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <?php 
    echo $form->field($model, 'subject');
    ?>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <?php 
    echo $form->field($model, 'body')->widget(Redactor::className(), ['clientOptions' => ['imageManagerJson' => ['/redactor/upload/image-json'], 'imageUpload' => ['/redactor/upload/image'], 'fileUpload' => ['/redactor/upload/file'], 'lang' => 'en', 'plugins' => ['clips', 'fontcolor', 'imagemanager']]]);
    ?>
		
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <?php 
    echo $form->field($model, 'verifyCode')->widget(Captcha::className(), ['template' => '<div class="row"><div class="col-md-12 center-blocked">{image}</div><div class="col-md-12">{input}</div></div>']);
    ?>
                            </div>
                        </div>
                        <div class="form-group text-right">
                            <?php 
    echo Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']);
    ?>
Example #28
0
    <?php 
echo $form->errorSummary($model);
?>

    <?php 
$language_items = [];
$redactorClientOptions = ['imageManagerJson' => ['/redactor/upload/image-json'], 'imageUpload' => ['/redactor/upload/image'], 'fileUpload' => ['/redactor/upload/file'], 'lang' => Yii::$app->language, 'plugins' => ['fontsize', 'bufferbuttons', 'fontcolor', 'imagemanager', 'emotions']];
foreach ($languages as $key => $language) {
    $field_title = $form->field($model, "title_{$language->url}")->textInput(['maxlength' => true])->label('Page Title');
    $field_content = $form->field($model, "content_{$language->url}")->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => $redactorClientOptions]);
    $field_content_heading = $form->field($model, "content_heading_{$language->url}")->textInput(['maxlength' => true])->label(Yii::t('backend', 'Page Heading'));
    $field_meta_keywords = $form->field($model, "meta_keywords_{$language->url}")->textarea(['rows' => 4])->label(Yii::t('backend', 'Page Keywords'));
    $field_meta_description = $form->field($model, "meta_description_{$language->url}")->textarea(['rows' => 6])->label(Yii::t('backend', 'Page Description'));
    if ($languageDefault->url == $language->url) {
        $field_title = $form->field($model, "title")->textInput(['maxlength' => true]);
        $field_content = $form->field($model, 'content')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => $redactorClientOptions]);
        $field_content_heading = $form->field($model, "content_heading")->textInput(['maxlength' => true]);
        $field_meta_keywords = $form->field($model, "meta_keywords")->textarea(['rows' => 4]);
        $field_meta_description = $form->field($model, "meta_description")->textarea(['rows' => 6]);
    }
    $language_items[] = ['label' => Yii::t('backend', $language->name), 'content' => "<p>{$field_title} {$field_content} {$field_content_heading} {$field_meta_keywords}</p>", 'active' => $language->url == Yii::$app->language];
}
echo Tabs::widget(['items' => $language_items]);
?>

    <?php 
echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(\backend\models\CmsPagesCategories::find()->all(), 'id', 'title'), ['multiple' => 'true', 'size' => 7])->label(Yii::t('backend', 'Select Categories'));
?>

    <?php 
echo $form->field($model, 'identifier')->textInput(['maxlength' => true]);
Example #29
0
    <?php 
echo $form->field($model, 'user_id')->textInput();
?>

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

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

    <?//= $form->field($model, 'content')->textarea(['rows' => 6]) ?>

    <?php 
echo $form->field($model, 'content')->widget(\yii\redactor\widgets\Redactor::className());
?>

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

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

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Example #30
0
            <div class="row">
                <div class="col-sm-3"><?php 
    echo $form->field($model, 'twilio_number')->textInput(['disabled' => 'disabled']);
    ?>
</div> <!--col-->
             </div> <!--row-->

            <?php 
}
?>


            <label>Project Overview / Description</label>
            <?php 
echo \yii\redactor\widgets\Redactor::widget(['model' => $model, 'attribute' => 'description']);
?>

            <div class="form-group">
                <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => 'btn btn-success']);
?>
            </div>

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

        </div> <!--col-->