// echo Select2::widget([ // 'name' => 'color_1', // 'options' => ['placeholder' => 'Select a color ...'], // 'pluginOptions' => [ // 'tags' => ["red", "green", "blue", "orange", "white", "black", "purple", "cyan", "teal"], // 'maximumInputLength' => 10 // ], // ]); } elseif ($child->type == 'redactor') { $options = []; $arrayOptions = explode('|', $child->store_range); foreach ($arrayOptions as $option) { $options[$option] = $option; } \itzen\setting\RedactorPlugins::register($this); $str .= '<div class="row"><div class="col-lg-8">' . \yii\imperavi\Widget::widget(['id' => \yii\helpers\Inflector::slug($child->code), 'attribute' => "Setting[{$child->code}]", 'value' => $child->value, 'plugins' => ['fullscreen', 'imagemanager', 'table', 'fontsize', 'fontcolor', 'customColors'], 'options' => ['minHeight' => 400, 'maxHeight' => 400, 'buttonSource' => true, 'convertDivs' => false, 'removeEmptyTags' => false, 'replaceDivs' => false, 'imageUpload' => Yii::$app->urlManager->createUrl(['/file-storage/upload-imperavi']), 'imageManagerJson' => '/file-storage/index-json', 'clipboardUpload' => true, 'clipboardUploadUrl' => Yii::$app->urlManager->createUrl(['/file-storage/upload-imperavi'])]]) . '</div>'; $str .= '<div class="col-lg-4"><div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">' . Module::t('setting', 'Clips') . '</h3> </div> <div class="panel-body">' . Html::dropDownList("clips", '', $options, ["class" => "form-control insert-clip " . \yii\helpers\Inflector::slug($child->code)]) . Html::button(Module::t('setting', 'Insert clip'), ["class" => "form-control insert-clip-btn", 'data-redactor-id' => \yii\helpers\Inflector::slug($child->code)]) . '</div></div> </div></div>'; } $str .= '</div></div>'; } $item['content'] = $str; array_push($items, $item); } ?> <?php
<!-- Confirmation Request Modal --> <div class="modal fade" id="confirmation-check"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Send Confirmation Request To <span class="num-people"></span> Person(s)</h4> </div> <div class="modal-body"> <div class="form-group"> <label for="message" class="control-label">Message:</label> <?php echo \yii\imperavi\Widget::widget(['attribute' => 'confirmation-message', 'value' => $this->render('_confirmation-check', ['model' => $model]), 'options' => ['minHeight' => 300]]); ?> </div> <div class="form-group"> <label for="message" class="control-label">Attachment:</label> <input type="file" name="confirmation-attachment" class="form-control"> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Send Confirmation Request</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal -->
<?php /** * Created with love. * User: BenasPaulikas * Date: 2016-03-30 * Time: 21:59 */ use yii\helpers\Html; use yii\imperavi\Widget; use yii\widgets\ActiveForm; /* @var $model benaspaulikas\forum\models\Post */ $form = ActiveForm::begin(); echo $form->errorSummary($model); if (!isset($comment)) { echo $form->field($model, 'subject')->textInput(['maxlength' => 100]); } $buttons = ['formatting', 'bold', 'italic', 'deleted', 'link', 'orderedlist', 'paragraph']; echo Widget::widget(['model' => $model, 'attribute' => 'content', 'options' => ['imageUpload' => false, 'buttons' => $buttons, 'formatting' => ['p', 'blockquote', 'pre']]]); echo Html::submitButton($model->isNewRecord ? Yii::t('app', isset($comment) ? 'Reply' : 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-u' : 'btn btn-u']); ActiveForm::end();
?> <div class="form-group field-setting-<?php echo $index; ?> -value"> <label class="control-label col-sm-4" for="setting-<?php echo $index; ?> -value"> <?php echo $setting->defineEncoded(); ?> </label> <div class="col-sm-8"> <?php echo ImperaviWidget::widget(['attribute' => "Setting[{$index}][value]", 'value' => $setting->value, 'options' => ['buttons' => $setting->redactorOptions(), 'buttonSource' => true, 'minHeight' => 300, 'autoresize' => true, 'imageUpload' => Yii::$app->urlManagerFrontend->createUrl(['media/default/redactor-upload', 'content_id' => $setting->id, 'content_type' => $setting->className()]), 'focus' => true, 'imageManagerJson' => Yii::$app->urlManagerBackend->createUrl(['media/default/list-media', 'content_id' => $setting->id, 'content_type' => $setting->className()])], 'plugins' => []]); ?> </div> </div> <?php } else { if ($setting->type == Setting::TYPE_DROP_DOWN) { echo $form->field($setting, "[{$index}]value")->dropDownList($setting->dropDownOptions())->label($setting->defineEncoded()); } else { echo $form->field($setting, "[{$index}]value")->label($setting->defineEncoded()); } } } } ?> </div>