<?php use kartik\helpers\Html; ?> <div id="<?php echo $id; ?> "> <div id="<?php echo $id; ?> -jstree"></div> <?php echo Html::label($selectLabel, $id . '-select', $selectLabelOptions); ?> <?php echo Html::activeDropDownList($model, $flagFieldName, [], $selectOptions); ?> </div> <?php ob_start(); ?> $("#<?php echo $id; ?> -jstree").jstree(<?php echo $options; ?> ).parents('form').eq(0).submit(function() { $('#<?php echo $id;
<div class="col-md-10"><?php echo Html::input('text', 'group-name', '', ['class' => 'form-control']); ?> </div> </div> <div class="form-group"> <?php echo Html::label(Yii::t('app', 'Require review'), 'group-require-review', ['class' => 'col-md-2 control-label']); ?> <div class="col-md-10"><?php echo Html::checkbox('group-require-review', false, ['class' => '']); ?> </div> </div> <div class="form-group"> <?php echo Html::label(Yii::t('app', 'Allow guest user to rate'), 'group-allow-guest', ['class' => 'col-md-2 control-label']); ?> <div class="col-md-10"><?php echo Html::checkbox('group-allow-guest', false, ['class' => '']); ?> </div> </div> <?php BackendWidget::end(); ?> </article> </div> </section> <?php echo Html::endForm();
$params_clone = $params; if ($current_selections['properties'][$property_id][0] == $value['id'] || !$onlyUncheckSlug) { if ($current_selections['properties'][$property_id][0] == $value['id']) { unset($params_clone['properties'][$property_id]); } $go_back = Url::toRoute($params_clone); $should_link = false; } } } if ($should_link === true) { $url = Url::toRoute($params); $label = Html::a($value['name'], $url, ['class' => 'filter-link']); } } $checkbox = Html::tag('div', Html::label(Html::checkBox("properties[{$property_id}][]", $active, ['class' => 'filter-checkbox', 'id' => "p_{$property_id}_{$value['id']}", 'value' => $value['id'], 'data-goback' => $go_back]) . " " . $label, "p_{$property_id}_{$value['id']}", ['class' => $disabled ? 'muted' : '']), ['class' => '']); if ($disabled) { array_push($checkboxes, $checkbox); } else { array_unshift($checkboxes, $checkbox); } } echo implode("\n", $checkboxes); ?> </li> <?php } } ?> <?php
<div class="row"> <div class="col-md-6 text-center"> <div class="panel panel-default"> <div class="panel-body"> <?php echo '<h5>Firstly, you have to put your template folder into @app/template. ' . Html::bsLabel('Required', Html::TYPE_DANGER) . '</h5>'; ?> </div> </div> </div> <div class="col-md-6 text-center"> <div class="panel panel-default"> <div class="panel-body"> <?php echo Html::label('Which file will use for layout?:'); ?> <?php echo Html::dropDownList('file', null, $fileList, ['class' => 'form-control']); ?> </div> <div class="panel-footer"><?php echo Html::button('Next', ['class' => 'btn btn-success NextButton']); ?> </div> </div> </div> </div> <?php echo Html::input('hidden', 'headerselector', $headerSelector); ?>
<div class="row"> <div class="col-md-12"> <?php echo $form->field($invoice, 'newAmount')->textInput(); ?> <?php echo Html::label('Subject', 'Invoice[subject]'); ?> <?php echo Widget::widget(['name' => 'Invoice[subject]', 'value' => $invoice->subject, 'settings' => ['minHeight' => 200, 'plugins' => ['clips']]]); ?> <?php echo Html::label('Final Text', 'Invoice[finalText]'); ?> <?php echo Widget::widget(['name' => 'Invoice[finalText]', 'value' => $invoice->finalText, 'settings' => ['minHeight' => 200, 'plugins' => ['clips']]]); ?> <div class="col-md-offset-6 text-right"> <?php echo Html::submitButton('Show Template', ['class' => 'btn btn-primary', 'id' => 'show-credit-note']); ?> <?php echo Html::submitButton('Create credit note', ['class' => 'btn btn-success', 'id' => 'create-credit-note']); ?> </div> </div> </div>
/** * Renders normal form input based on the attribute settings. * This includes additional markup like rendering content before * and after input, and wrapping input in a container if set. * * @param string $attribute the name of the attribute * @param array $settings the attribute settings * * @return string the form input markup * @throws InvalidConfigException */ protected static function renderInput($attribute, $settings = []) { $for = ''; $input = static::renderRawInput($attribute, $for, $settings); $label = ArrayHelper::getValue($settings, 'label', false); $labelOptions = ArrayHelper::getValue($settings, 'labelOptions', []); Html::addCssClass($labelOptions, 'control-label'); $label = $label !== false && !empty($for) ? Html::label($label, $for, $labelOptions) . "\n" : ''; $container = ArrayHelper::getValue($settings, 'container', []); $prepend = ArrayHelper::getValue($settings, 'prepend', ''); $append = ArrayHelper::getValue($settings, 'append', ''); $inputContainer = ArrayHelper::getValue($settings, 'inputContainer', []); if (!empty($inputContainer)) { $input = Html::tag('div', $input, $inputContainer); } $out = $prepend . "\n" . $label . $input . "\n" . $append; return empty($container) ? $out : Html::tag('div', $out, $container); }
/** * Renders the field range widget. */ protected function renderWidget() { Html::addCssClass($this->options, 'kv-field-range'); if ($this->_isHorizontalForm) { $style = $this->form->getFormLayoutStyle(); Html::addCssClass($this->labelOptions, $style['labelCss']); Html::addCssClass($this->widgetContainer, $style['inputCss']); Html::addCssClass($this->errorContainer, $style['offsetCss']); } if ($this->type === self::INPUT_DATE) { $widget = $this->getDatePicker(); } else { Html::addCssClass($this->container, 'form-group'); Html::addCssClass($this->options, 'input-group'); $tag = ArrayHelper::remove($this->separatorOptions, 'tag', 'span'); $widget = isset($this->form) ? $this->getFormInput() : $this->getInput(1) . Html::tag($tag, $this->separator, $this->separatorOptions) . $this->getInput(2); $widget = Html::tag('div', $widget, $this->options); } $widget = Html::tag('div', $widget, $this->widgetContainer); $error = Html::tag('div', '<div class="help-block"></div>', $this->errorContainer); echo Html::tag('div', strtr($this->template, ['{label}' => Html::label($this->label, null, $this->labelOptions), '{widget}' => $widget, '{error}' => $error]), $this->container); }
?> <?php echo app\widgets\Alert::widget(['id' => 'alert']); ?> <div class="row"> <?php $this->beginBlock('search-form'); ?> <?php echo Html::beginForm('search', 'get', ['id' => 'code_sorter', 'class' => 'form-inline', 'role' => 'form']); ?> <?php echo Html::label('HTTP code: ', 'code'); ?> <?php echo Html::input('text', 'ErrorMonitor[http_code]', null, ['class' => 'form-control']); ?> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <?php echo Html::endForm(); ?> <?php $this->endBlock(); ?> <div class="col-md-12">
use kartik\helpers\Html; use kartik\icons\Icon; $this->title = Yii::t('app', 'Update messages "{alias}"', ['alias' => $alias]); $this->params['breadcrumbs'] = [['label' => Yii::t('app', 'I18n'), 'url' => '/backend/i18n'], $this->title]; ?> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <?php echo Html::beginForm(); ?> <?php BackendWidget::begin(['icon' => 'language', 'title' => $this->title, 'footer' => Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary'])]); ?> <?php echo \devgroup\jsoneditor\Jsoneditor::widget(['editorOptions' => ['modes' => ['tree']], 'name' => 'messages', 'options' => ['style' => 'height: 600px'], 'value' => $messages]); ?> <div> <?php echo Html::checkbox('ksort', Yii::$app->request->cookies->getValue('sortMessages'), ['id' => 'ksort']); ?> <?php echo Html::label(Yii::t('app', 'Sort by source messages'), 'ksort'); ?> </div> <?php BackendWidget::end(); ?> <?php echo Html::endForm(); ?> </div>
?> <hr /> <?php echo Html::label('Footer Tag Selector:'); ?> <?php echo Html::input('text', 'footerselector', 'footer.footer', ['class' => 'form-control']); ?> </div> </div> </div> <div class="col-md-6 text-center"> <div class="panel panel-default"> <div class="panel-body"> <?php echo Html::label('Template:'); ?> <?php echo Html::dropDownList('folder', null, $themeList, ['class' => 'form-control']); ?> <hr /> <div class="checkbox text-left"> <label> <input type="checkbox" value="1" checked="checked" name="createAssets"/> Assets </label> </div><hr /> <div class="checkbox text-left"> <label> <input type="checkbox" value="1" checked="checked" name="createLayouts"/> Layouts </label> </div>
<div class="panel-footer"> <div class="row"> <div class="col-md-6"> <?php echo Html::label('Model Name:'); ?> <?php AutoComplete::widget(['name' => 'modelNameAutoComplete', 'id' => 'modelNameAutoComplete', 'clientOptions' => ['source' => $generalVariable['modelListName']], 'options' => ['class' => 'form-control']]); ?> <?php echo Html::dropDownList('modelNameAutoComplete', null, $generalVariable['modelListName'], ['id' => 'modelNameAutoComplete', 'class' => 'form-control']); ?> </div> <div class="col-md-6"> <?php echo Html::label('Actions:'); ?> <?php echo Html::dropDownList('modelGenerateActionSelect', null, $ActionList, ['id' => 'modelGenerateAction', 'class' => 'form-control']); ?> </div> </div> <hr /> <?php echo Html::button('Add Model', ['class' => 'btn btn-success addModel']); ?> </div> </div> <div class="row"> <div class="col-md-6 text-center"> <div class="panel panel-default">