Example #1
1
 /**
  * Render the text area input
  */
 protected function renderInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::textArea($this->name, $this->value, $this->options);
     }
     return $input;
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     $this->registerClientScript();
 }
 /**
  * @inheritdoc
  */
 public function run()
 {
     MarkdownAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
 }
 public function run()
 {
     LeptureEditorAsset::register($this->view);
     $this->registerScripts();
     $this->options['id'] = $this->id;
     if ($this->hasModel()) {
         $textarea = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $textarea = Html::textArea($this->name, $this->value, $this->options);
     }
     echo '<div class="lepture">' . $textarea . '</div>';
 }
Example #5
0
 /**
  * @return string
  */
 public function run()
 {
     $this->registerAsset();
     $this->registerCsrf();
     $this->registerPlugins();
     $this->registerLanguage();
     $this->registerClientScript();
     if ($this->hasModel()) {
         return Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         return Html::textArea($this->name, $this->value, $this->options);
     }
 }
 public function run()
 {
     EpiceditorAssets::register($this->view);
     $this->registerScripts();
     //text area should be hidden, and DIV should be shown
     $this->textareaHtmlOptions = ArrayHelper::merge($this->textareaHtmlOptions, ['style' => 'display:none']);
     $this->textareaHtmlOptions['id'] = $this->options['textarea'];
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->textareaHtmlOptions);
     } else {
         echo Html::textArea($this->name, $this->value, $this->textareaHtmlOptions);
     }
     $this->divHtmlOptions = ArrayHelper::merge($this->divHtmlOptions, ['id' => $this->options['container']]);
     echo Html::tag('div', '', $this->divHtmlOptions);
 }
Example #7
0
 public function run()
 {
     if ($this->hasModel()) {
         echo Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     if (!isset($this->options['id'])) {
         $id = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId();
     } else {
         $id = $this->options['id'];
     }
     $this->setOptions();
     $options = Json::encode($this->options);
     $this->registerEditorJs($id, $options);
 }
Example #8
0
$script = " \najax_pagination();\nfunction ajax_pagination(){\n\t\$( '.pagination a' ).bind( 'click' , function (){  \n\t\t\$.post(\$( this ).attr( 'href' )," . Json::encode($query) . ",function(data){ \n\t\t \t\$( '#" . $paginatFormId . "' ).html(data); \n\t\t \tajax_pagination();\n\t\t}); \n\t\treturn  false ; \n\t});\n}";
UI::ajax(url('comment/ajax/index'), $query, "#" . $paginatFormId, $script);
if ($top === true) {
    echo "<div id='" . $paginatFormId . "'></div>";
}
if (true === Auth::check()) {
    ?>
	<div id="<?php 
    echo $infoMessage;
    ?>
" class="alert" style="display:none"></div>
	<?php 
    $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal', 'id' => $formId), 'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge'))));
    ?>
	<?php 
    echo Html::textArea('Comment[body]', null, array('required' => 'required', 'id' => 'Comment_body'));
    ?>
	 
	<p style='margin-top:10px;'>
		<?php 
    echo Html::button(__('comment'), null, null, array('class' => 'btn'));
    ?>
	</p>

	<?php 
    ActiveForm::end();
    UI::ajaxForm($formId, "\n\t\tif(data){\n\t\t\t\$('#" . $infoMessage . "').addClass('alert-error')\n\t\t\t\t.html(data).fadeIn();\n\t\t\t\$('#" . $formId . " .btn').html('" . __('comment') . "')\n\t\t\t\t\t.removeAttr('disabled','disabled');\n\t\t\n\t\t}else{\n\t\t\t\$('#" . $infoMessage . "').removeClass('alert-error')\n\t\t\t\t\t.addClass('alert-success')\n\t\t\t\t\t.html('" . __('commit success') . "')\n\t\t\t\t\t.fadeIn();\n\t\t\t\$('#" . $formId . " .btn').html('" . __('commented') . "');\n\t\t\t" . UI::ajax(url('comment/ajax/index'), $query, "#" . $paginatFormId, $script, false) . "\n\t\t}\n\t \n\t");
    js("\$('#" . $formId . " .btn').click(function(){\n\t\t\$('#" . $formId . "').submit();\n\t\t\$(this).html('" . __('commenting') . "……');\n\t\t\$(this).attr('disabled','disabled');\n\t\treturn false;\n\t});");
} else {
    ?>
	<div class='alert alert-waring'><?php 
Example #9
0
    $html = Yii::t("app", "Order Details:");
    $html .= "<h5>" . Yii::t("app", "Cart") . " <small>" . $cm . "</small></h5>";
    if ($shipping) {
        $html .= "<h5>" . Yii::t("app", "Shipping Cost") . " <small><i>" . Html::encode($shipping->provider . ' ' . $shipping->code) . '</i> ' . Yii::t("app", "destination ") . Html::encode($shipping->city . ' (' . $shipping->area . ")") . "</small></h5>";
    }
    return $html;
}], ['attribute' => 'total', 'value' => function ($data) {
    $module = Yii::$app->getModule('yes');
    return number_format($data->total, 2, $module->currency["decimal_separator"], $module->currency["thousand_separator"]);
}, 'hAlign' => 'right', 'pageSummary' => function ($summary, $data, $widget) {
    $module = Yii::$app->getModule('yes');
    $r = 0;
    foreach ($data as $d) {
        $r += floatval(str_replace($module->currency["thousand_separator"], "", $d));
    }
    return number_format($r, 2, $module->currency["decimal_separator"], $module->currency["thousand_separator"]);
}, 'pageSummaryFunc' => 'sum'], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['data' => $searchModel->itemAlias('status'), 'options' => ['placeholder' => Yii::t('app', 'Filter by status...')], 'pluginOptions' => ['allowClear' => true]], 'value' => function ($data) {
    return $data->itemAlias('status', $data->status);
}, 'editableOptions' => function ($model, $key, $index) {
    return ['header' => Yii::t('app', 'Status'), 'size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => $model->itemAlias('status'), 'options' => ['placeholder' => Yii::t('app', 'Filter by status...')], 'pluginOptions' => ['allowClear' => false]], 'placement' => 'left', 'showButtons' => false, 'resetButton' => false, 'afterInput' => function ($form, $widget) use($model, $index) {
        echo '<div class="form-group">';
        echo Html::textArea(substr($model->className(), strrpos($model->className(), "\\") + 1) . "[" . $index . "][complete_reference]", $model->complete_reference, ["class" => "form-control", "placeholder" => Yii::t("app", "Complete Reference")]);
        echo '</div>';
    }, 'pluginEvents' => ['editableSuccess' => "function(event, val, form, data) { \n\t\t\t\t\t\t\t\t\t\t\t\t\tvar model = JSON.parse(data.data);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (m in model)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$('tr[data-key='+data.id+'] td').each(function(n,d){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (n == m) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$(d).html(model[m]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}"]];
}, 'hAlign' => 'right'], 'complete_reference', ['class' => 'kartik\\grid\\ActionColumn', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', ["view", "reference" => $model->reference], ["title" => Yii::t("yii", "View")]);
}]]]]);
?>

</div>
Example #10
0
 /**
  * Renders the export menu
  *
  * @return string
  */
 public function renderExport()
 {
     if ($this->export === false || !is_array($this->export)) {
         return '';
     }
     $formats = $this->exportConfig;
     if (empty($formats) || !is_array($formats)) {
         return '';
     }
     $title = $this->export['label'];
     $icon = $this->export['icon'];
     $options = $this->export['options'];
     $items = [];
     foreach ($formats as $format => $setting) {
         $label = empty($setting['icon']) || $setting['icon'] == '' ? $setting['label'] : '<i class="glyphicon glyphicon-' . $setting['icon'] . '"></i> ' . $setting['label'];
         $items[] = ['label' => $label, 'url' => '#', 'linkOptions' => ['class' => 'export-' . $format], 'options' => $setting['options']];
     }
     $title = $icon == '' ? $title : "<i class='glyphicon glyphicon-{$icon}'></i> {$title}";
     $action = Yii::$app->getModule('gridview')->downloadAction;
     if (!is_array($action)) {
         $action = [$action];
     }
     $frameId = $this->options['id'] . '_export';
     $form = Html::beginForm($action, 'post', ['class' => 'kv-export-form', 'style' => 'display:none', 'target' => '_blank']) . Html::textInput('export_filetype') . Html::textInput('export_filename') . Html::textArea('export_content') . '</form>';
     return ButtonDropdown::widget(['label' => $title, 'dropdown' => ['items' => $items, 'encodeLabels' => false], 'options' => $options, 'encodeLabel' => false]) . $form;
 }
Example #11
0
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    <p>
        <?php 
echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => Yii::t('app', 'Customer')]), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'containerOptions' => ['style' => 'overflow: auto'], 'caption' => Yii::t('app', 'Customer'), 'headerRowOptions' => ['class' => 'kartik-sheet-style', 'style' => 'background-color: #fdfdfd'], 'filterRowOptions' => ['class' => 'kartik-sheet-style skip-export', 'style' => 'background-color: #fdfdfd'], 'pjax' => false, 'bordered' => true, 'striped' => true, 'condensed' => true, 'responsive' => true, 'hover' => true, 'showPageSummary' => true, 'pageSummaryRowOptions' => ['class' => 'kv-page-summary', 'style' => 'background-color: #fdfdfd'], 'tableOptions' => ["style" => "margin-bottom:50px;"], 'panel' => ['type' => GridView::TYPE_DEFAULT, 'heading' => false], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => false, 'class' => 'btn btn-default', 'title' => Yii::t('app', 'Reset Grid')])], '{export}', '{toggleData}'], 'beforeHeader' => [['options' => ['class' => 'skip-export']]], 'floatHeader' => true, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], 'name', 'email:email', ['attribute' => 'phones', 'value' => function ($data) {
    return Html::encode(str_replace(",", ", ", $data->phones));
}], 'addresses:ntext', ['attribute' => 'last_time', 'value' => 'last_time', 'filterType' => GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['pluginOptions' => ['format' => 'YYYY-MM-DD HH:mm:ss', 'todayHighlight' => true, 'timePicker' => true, 'timePickerIncrement' => 15, 'opens' => 'left'], 'pluginEvents' => ["apply.daterangepicker" => 'function() {									
									$(this).change();
								}']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'last_action', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['data' => $searchModel->itemAlias('last_action'), 'options' => ['placeholder' => Yii::t('app', 'Last action...')], 'pluginOptions' => ['allowClear' => true]], 'value' => function ($data) {
    return $data->itemAlias('last_action', $data->last_action);
}, 'editableOptions' => function ($model, $key, $index) {
    return ['header' => Yii::t('app', 'Last action'), 'size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'options' => ['data' => $model->itemAlias('last_action'), 'options' => ['placeholder' => Yii::t('app', 'Last action...')], 'pluginOptions' => ['allowClear' => false]], 'placement' => 'left', 'showButtons' => false, 'resetButton' => false, 'afterInput' => function ($form, $widget) use($model, $index) {
        echo '<div class="form-group">';
        echo Html::textArea(substr($model->className(), strrpos($model->className(), "\\") + 1) . "[" . $index . "][remarks]", $model->remarks, ["class" => "form-control", "placeholder" => Yii::t("app", "Remarks")]);
        echo '</div>';
    }, 'pluginEvents' => ['editableSuccess' => "function(event, val, form, data) { \n\t\t\t\t\t\t\t\t\t\t\t\t\tvar model = JSON.parse(data.data);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (m in model)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$('tr[data-key='+data.id+'] td').each(function(n,d){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (n == m) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\$(d).html(model[m]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}"]];
}, 'hAlign' => 'right'], 'remarks', ['class' => 'kartik\\grid\\ActionColumn']]]);
?>

</div>
Example #12
0
    echo "</ul>";
} else {
    echo "<p>Нет записей</p>";
}
?>
</div>
<div class="artclCrt">
<?php 
ActiveForm::begin(['method' => 'post', 'action' => ['']]);
?>
<p>
<?php 
echo Html::textInput('name_article', null, ['class' => 'name_article']);
?>
</p>
<p>
<?php 
echo Html::textArea('body_article', '', ['class' => 'body_article']);
?>
</p>
<p class="submit_button">
<?php 
echo Html::submitButton('Создать', ['type' => 'submit', 'class' => 'btn btn-default']);
?>
</p>
<?php 
ActiveForm::end();
?>
</div>
</div>
Example #13
0
 public function run()
 {
     $input = $this->hasModel() ? Html::activeTextArea($this->model, $this->attribute, $this->options) : Html::textArea($this->name, $this->value, $this->options);
     echo $input;
     $this->registerClientScript();
 }
Example #14
0
echo $id;
?>
" class="comment_create">

    <?php 
echo Html::beginForm("#");
?>
    <?php 
echo Html::hiddenInput('contentModel', $modelName);
?>
    <?php 
echo Html::hiddenInput('contentId', $modelId);
?>

    <?php 
echo Html::textArea("message", "", array('id' => 'newCommentForm_' . $id, 'rows' => '1', 'class' => 'form-control autosize commentForm', 'placeholder' => Yii::t('CommentModule.widgets_views_form', 'Write a new comment...')));
?>

    <?php 
echo humhub\widgets\RichTextEditor::widget(['id' => 'newCommentForm_' . $id]);
?>

    <div class="comment-buttons">

    <?php 
// Creates Uploading Button
echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'comment_upload_' . $id, 'fileListFieldName' => 'fileList'));
?>

    <?php 
$jsSuccess = "function(html) {\n            \$('#comments_area_" . $id . "').append(html);\n            \$('#newCommentForm_" . $id . "').val('').trigger('autosize.resize');\n            \$('#newCommentForm_" . $id . "_contenteditable').html('" . Html::encode(Yii::t('CommentModule.widgets_views_form', 'Write a new comment...')) . "');\n            \$('#newCommentForm_" . $id . "_contenteditable').addClass('atwho-placeholder');\n            \$('#loader-" . $id . "').remove();\n            \$('#newCommentForm_" . $id . "_contenteditable').show();\n            \$('.comment-buttons').show();\n            resetUploader('comment_upload_" . $id . "');\n    }";
Example #15
0
');
?>

<div class="yboard-ban-form">

    <?php 
echo Html::beginForm();
?>
    <div class="form-group">
        <div class="form-label pad5 header3"> 
            <?php 
echo YBoard::t('yboard', 'Ban Reason');
?>
        </div>
        <?php 
echo Html::textArea('message', null, ['id' => 'ban-message', 'maxlength' => 255, 'class' => 'form-control']);
?>
    </div>
    
    <div class="form-group">
        <div class="form-label pad5 header3"> 
            <?php 
echo YBoard::t('yboard', 'Ban Expiry Date ({format})', ['format' => 'YYYY-MM-DD']);
?>
        </div>
        <?php 
echo Html::textInput('expires', null, ['id' => 'ban-expires', 'maxlength' => 255, 'class' => 'form-control']);
?>
 
    </div>
Example #16
0
    ?>
      <div id="tabs-system" style="display:inline-block;width:100%">
        <?php 
    $form = ActiveForm::begin(array('action' => Yii::$app->getUrlManager()->createUrl('setting/update-system#tabs-system')));
    ?>

            <div class="col-xs-6">

                <div class="form-group">
                    <label>Company Name</label><?php 
    echo Html::textInput('Setting[sys_company_name]', $comp_name, ['class' => 'form-control']);
    ?>
                </div>
                <div class="form-group">
                    <label>Company Address</label><?php 
    echo Html::textArea('Setting[sys_company_address]', $comp_address, ['class' => 'form-control']);
    ?>
                </div>
                <div class="form-group">
                    <label>Registration No.</label><?php 
    echo Html::textInput('Setting[sys_company_register]', $comp_register, ['class' => 'form-control']);
    ?>
                </div>

                <div class="form-group">
                    <?php 
    echo Html::submitButton('Save', ['class' => 'btn btn-primary']);
    ?>
                </div>
            </div>
Example #17
0
?>

<?php 
echo Yii::t('netis/fsm/app', 'Change status from {source} to {target}', ['source' => '<span class="badge badge-default">' . Yii::$app->formatter->format($sourceState, $format) . '</span>', 'target' => '<span class="badge badge-primary">' . Yii::$app->formatter->format($targetState, $format) . '</span>']);
?>

<?php 
echo netis\crud\web\Alerts::widget();
?>

<div class="form">
    <?php 
echo Html::label(Yii::t('netis/fsm/app', 'Reason'), 'reason');
?>
    <div class="row">
        <div class="span4">
            <?php 
echo Html::textArea('reason', '', ['cols' => 80, 'rows' => 5, 'style' => 'width: 25em;']);
?>
        </div>
    </div>
    <?php 
echo Html::a('<i class="fa fa-save"></i>' . Yii::t("netis/fsm/app", "Confirm"), Url::toRoute([$action->id, 'id' => $model->primaryKey, 'targetState' => $targetState, 'confirmed' => 1]), ['class' => 'btn btn-success']);
?>
    <?php 
echo Html::a(Yii::t('netis/fsm/app', 'Cancel'), Url::toRoute([isset($_GET['return']) ? $_GET['return'] : 'view', 'id' => $model->primaryKey]));
?>
</div>


                        <?php 
foreach ($messages as $orginal => $translated) {
    ?>
                            <tr style=''>
                                <?php 
    $i++;
    ?>
                                <td style="width:50%;max-width:50%; padding:10px;">
                                    <pre style=""><?php 
    print Html::encode($orginal);
    ?>
</pre>
                                </td>
                                <td style="width:50%;max-width:50%; padding:10px;"><?php 
    echo Html::textArea('tid_' . md5($orginal), $translated, array('class' => 'form-control'));
    ?>
</td>
                            </tr>
                        <?php 
}
?>

                    </table>
                    <hr>
                    <p><?php 
echo Html::submitButton(Yii::t('TranslationModule.views_translate_index', 'Save'), array('class' => 'btn btn-primary'));
?>
</p>

                    <?php 
Example #19
0
<?php

use yii\helpers\Html;
?>

<?php 
echo Html::textArea("message", '', array('id' => 'contentForm_message', 'class' => 'form-control autosize contentForm', 'rows' => '1', 'placeholder' => Yii::t("PostModule.widgets_views_postForm", "What's on your mind?")));
?>

<?php 
/* Modify textarea for mention input */
echo \humhub\widgets\RichTextEditor::widget(array('id' => 'contentForm_message'));
Example #20
0
    

            <!-- Confirmation Request Text Modal -->
            <div class="modal fade" id="confirmation-check-text">
              <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">&times;</span></button>
                        <h4 class="modal-title">Send Confirmation Request Text Message 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 Html::textArea('confirmation-text-message', $this->render('_confirmation-check-text'), ['rows' => '12', 'class' => 'form-control']);
?>
 
                        </div>

                        <!-- <div class="form-group">
                            <label for="message" class="control-label">Attachment:</label>
                            <input type="file" name="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 -->
Example #21
0
 public function run()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     if (isset($this->model)) {
         echo Html::activeTextarea($this->model, $this->attribute, $this->options);
     } else {
         echo Html::textArea($this->name, $this->value, $this->options);
     }
     $this->registerScripts();
 }
Example #22
0
<?php

use yii\helpers\Html;
echo Html::textArea("question", "", array('id' => 'contentForm_question', 'class' => 'form-control autosize contentForm', 'rows' => '1', "tabindex" => "1", "placeholder" => Yii::t('PollsModule.widgets_views_pollForm', "Ask something...")));
?>

<div class="contentForm_options">
    <?php 
echo Html::textArea("answersText", "", array('id' => "contentForm_answersText", 'rows' => '5', 'style' => 'height: auto !important;', "class" => "form-control contentForm", "tabindex" => "2", "placeholder" => Yii::t('PollsModule.widgets_views_pollForm', "Possible answers (one per line)")));
?>
    <div class="checkbox">
        <label>
            <?php 
echo Html::checkbox("allowMultiple", "", array('id' => "contentForm_allowMultiple", 'class' => 'checkbox contentForm', "tabindex" => "4"));
?>
 <?php 
echo Yii::t('PollsModule.widgets_views_pollForm', 'Allow multiple answers per user?');
?>
        </label>
    </div>

</div>
Example #23
0
 /**
  * Render the text area input
  */
 protected function renderInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeTextArea($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::textArea($this->name, $this->value, $this->options);
     }
     Html::addCssClass($this->previewOptions, 'hidden');
     $preview = Html::tag('div', '', $this->previewOptions);
     return $input . "\n" . $preview;
 }
 private function genField($name, $setting, $options)
 {
     if (preg_match("/number|string/i", $setting->type)) {
         return Html::textInput($name, $setting->value, $options);
     } elseif (preg_match("/text/i", $setting->type)) {
         return Html::textArea($name, $setting->value, $options);
     } elseif (preg_match("/bool/i", $setting->type)) {
         return Html::checkBox($name, $setting->value, array_merge($options, $this->checkboxOptions, ['template' => '']));
     } elseif (preg_match("/dropdown/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         return Html::dropDownList($name, $setting->value, $data, $options);
     } elseif (preg_match("/radiolist/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         $template = $this->radioTemplate;
         $this->radioOptions['item'] = !$this->radioCallback ? function ($index, $label, $name, $checked, $value) use($template) {
             return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => $label]);
         } : $this->radioCallback;
         return Html::radioList($name, $setting->value, $data, array_merge($options, $this->radioOptions));
     } elseif (preg_match("/{dateradiolist}/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         $template = $this->radioTemplate;
         $this->radioOptions['item'] = function ($index, $label, $name, $checked, $value) use($template) {
             return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => date($value, time())]);
         };
         return Html::radioList($name, $setting->value, array_combine($data, $data), array_merge($options, $this->radioOptions));
     } elseif (preg_match("/timezone/i", $setting->type)) {
         return Html::dropDownList($name, $setting->value, $this->getTimezones(), $options);
     } elseif (preg_match("/date/i", $setting->type)) {
         return DatePicker::widget(['name' => $name, 'type' => DatePicker::TYPE_INPUT, 'value' => date('d-m-Y', strtotime($setting->value)), 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
     } else {
         return Html::textArea($name, $setting->value, $options);
     }
 }
Example #25
0
<?php

/**
 * @package   yii2-markdown
 * @author    Kartik Visweswaran <kartikv2@gmail.com>
 * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
 * @version   1.3.1
 */
use yii\helpers\Html;
?>
<!DOCTYPE html>
<html>
<body>
<h3>DO NOT EDIT THIS FILE</h3>

<p>This view is used to generate the export download form for the Markdown editor.</p>
<?php 
echo Html::beginForm();
echo Html::textInput('export_filetype', '');
echo Html::textInput('export_filename', '');
echo Html::textArea('export_content', '');
echo Html::endForm();
?>
</body>
</html>
Example #26
0
?>

    <?php 
foreach ($errors as $error) {
    ?>
        <p class="error"><?php 
    echo $error;
    ?>
</p>
    <?php 
}
?>
    <div class="viewFieldSet__content__desc">
        <!-- Большое текстовое поле -->
        <?php 
echo Html::textArea($inputName, $value, array_merge($htmlOptions, array('id' => $inputId, 'class' => 'f-fieldSetComment ' . $htmlOptions['class'] . ($fck ? ' ckedit' : ''))));
?>
    </div>
    <?php 
if ($fck) {
    ?>
        <script type="text/javascript">
            CKEDITOR.replace(<?php 
    echo $inputId;
    ?>
,
                {}
            ); 
        </script>
    <?php 
}
Example #27
0
     echo Select2::widget(['name' => 'Orders[data][' . $d->label . ']', 'data' => $options, 'value' => $deval, 'options' => ['placeholder' => Yii::t('app', 'Select ') . $d->label, 'class' => 'item-shopcart', "id" => "data_" . str_replace(" ", "_", $d->label)]]);
     echo '</div>';
 } else {
     if ($type == 1) {
         echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
         echo Html::textInput('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart", "placeholder" => Yii::t("app", $d->label), "style" => "width:100%"]);
         echo '</div>';
     } else {
         if ($type == 2) {
             echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
             echo TouchSpin::widget(['name' => 'Orders[data][' . $d->label . ']', 'value' => $d->value == null ? 0 : $d->value, 'options' => ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "item-shopcart"], 'pluginOptions' => ['min' => 1, 'step' => 1, 'max' => 100000000000, 'boostat' => 10, 'maxboostedstep' => 100000, 'handle' => 'triangle', 'tooltip' => 'always']]);
             echo '</div>';
         } else {
             if ($type == 3) {
                 echo '<div class="form-group"><label class="control-label">' . Html::encode($d->label) . '</label>';
                 echo Html::textArea('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart", "placeholder" => Yii::t("app", $d->label), "style" => "width:100%"]);
                 echo '</div>';
             } else {
                 if ($type == 4) {
                     echo '<div class="form-group"><label class="control-label">' . $d->value . '</label>';
                     echo Html::hiddenInput('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart"]);
                     echo '</div>';
                 } else {
                     if ($type == 5) {
                         echo Html::hiddenInput('Orders[data][' . $d->label . ']', $d->value, ["id" => "data_" . str_replace(" ", "_", $d->label), "class" => "form-control item-shopcart"]);
                     }
                 }
             }
         }
     }
 }
Example #28
0
<?php

use yii\helpers\Html;
echo Html::textArea("title", '', array('id' => "contentForm_title", 'class' => 'form-control autosize contentForm', 'rows' => '1', 'placeholder' => Yii::t('NotesModule.widgets_views_form', "Title of your new note")));
Example #29
0
 /**
  * Renders the export menu
  *
  * @return string
  */
 public function renderExport()
 {
     if ($this->export === false || !is_array($this->export) || empty($this->exportConfig) || !is_array($this->exportConfig)) {
         return '';
     }
     $title = $this->export['label'];
     $icon = $this->export['icon'];
     $options = $this->export['options'];
     $menuOptions = $this->export['menuOptions'];
     $title = $icon == '' ? $title : "<i class='glyphicon glyphicon-{$icon}'></i> {$title}";
     $action = $this->_module->downloadAction;
     if (!is_array($action)) {
         $action = [$action];
     }
     $encoding = ArrayHelper::getValue($this->export, 'encoding', 'utf-8');
     $target = ArrayHelper::getValue($this->export, 'target', self::TARGET_POPUP);
     $form = Html::beginForm($action, 'post', ['class' => 'kv-export-form', 'style' => 'display:none', 'target' => $target == self::TARGET_POPUP ? 'kvDownloadDialog' : $target]) . "\n" . Html::hiddenInput('export_filetype') . "\n" . Html::hiddenInput('export_filename') . "\n" . Html::hiddenInput('export_mime') . "\n" . Html::hiddenInput('export_config') . "\n" . Html::hiddenInput('export_encoding', $encoding) . "\n" . Html::textArea('export_content') . "\n</form>";
     $items = empty($this->export['header']) ? [] : [$this->export['header']];
     $iconPrefix = $this->export['fontAwesome'] ? 'fa fa-' : 'glyphicon glyphicon-';
     foreach ($this->exportConfig as $format => $setting) {
         $iconOptions = ArrayHelper::getValue($setting, 'iconOptions', []);
         Html::addCssClass($iconOptions, $iconPrefix . $setting['icon']);
         $label = empty($setting['icon']) || $setting['icon'] == '' ? $setting['label'] : Html::tag('i', '', $iconOptions) . ' ' . $setting['label'];
         $items[] = ['label' => $label, 'url' => '#', 'linkOptions' => ['class' => 'export-' . $format, 'data-format' => ArrayHelper::getValue($setting, 'mime', 'text/plain')], 'options' => $setting['options']];
     }
     $itemsBefore = ArrayHelper::getValue($this->export, 'itemsBefore', []);
     $itemsAfter = ArrayHelper::getValue($this->export, 'itemsAfter', []);
     $items = ArrayHelper::merge($itemsBefore, $items, $itemsAfter);
     return ButtonDropdown::widget(['label' => $title, 'dropdown' => ['items' => $items, 'encodeLabels' => false, 'options' => $menuOptions], 'options' => $options, 'containerOptions' => $this->exportContainer, 'encodeLabel' => false]) . $form;
 }
Example #30
0
?>
			</div>
		</div>
	<?php 
echo Html::endForm();
?>

	<?php 
echo Html::beginForm();
?>
		<h3>Get Products by Category</h3>
		<div class="col-xs-12 col-sm-9 col-md-6">
			<div class="form-group">
				<label class="label-char"> Category URL</label>
				<?php 
echo Html::textArea('category_url', '', ['class' => 'form-control', 'rows' => 5]);
?>
			</div>
			<div class="form-group">
				<label class="label-char"> Category</label>
				<select name="category" class="form-control" style="width:45%">
					<option value="">Select a category</option>
				<?php 
if (!empty($categories)) {
    ?>
					<?php 
    foreach ($categories as $key => $category) {
        ?>
						<option value="<?php 
        echo $category->id;
        ?>