Exemplo n.º 1
3
 protected function launch()
 {
     echo Html::beginForm($this->url, 'get');
     echo Html::input('text', $this->queryParam, $this->query);
     echo Html::submitButton(\Yii::t('gromver.platform', 'Find'));
     echo Html::endForm();
 }
 public function actionForm()
 {
     echo Html::beginForm();
     echo Html::checkboxList('test', ['value 1' => 'item 1', 'value 2' => 'item 2', 'value 3' => 'item 3'], isset($_POST['test']) ? $_POST['test'] : null, function ($index, $label, $name, $value, $checked) {
         return Html::label($label . ' ' . Html::checkbox($name, $value, $checked), null, ['class' => 'inline checkbox']);
     });
     echo Html::submitButton();
     echo Html::endForm();
     print_r($_POST);
 }
Exemplo n.º 3
1
 public function run()
 {
     SelectAsset::register($this->view);
     FilterAsset::register($this->view);
     $values = [];
     foreach ($this->data as $value) {
         $value = strval($value);
         $values[$value] = $value;
     }
     if (!$this->default) {
         $this->default = $this->multiple ? array_keys($values) : key($values);
     }
     $selected = $this->selected($this->default);
     // Setup options
     $options = ['id' => $this->name, 'name' => $this->name . '[]', 'style' => 'width: 300px;', 'class' => 'selectpicker'];
     $extra = ['title' => 'Not selected'];
     if ($this->multiple) {
         $extra['multiple'] = 'multiple';
     }
     if ($this->placeholder) {
         $extra['title'] = strval($this->placeholder);
     }
     $options = array_merge($options, $extra);
     if (!$this->method) {
         $this->method = 'get';
     }
     // Render
     echo Html::beginForm(Url::canonical(), $this->method, ['data-pjax' => '1', 'id' => $this->name]);
     echo Html::beginTag('select', $options, ['data-pjax' => '1']);
     echo Html::renderSelectOptions($selected, $values);
     echo Html::endTag("select");
     echo Html::endForm();
     parent::run();
 }
Exemplo n.º 4
1
 public function run()
 {
     $id = $this->getId();
     echo Html::beginForm(Url::canonical(), 'get', ['data-pjax' => '1', 'id' => $this->name]);
     echo Html::beginTag('div');
     echo Html::beginTag("select", ['id' => $id, 'multiple' => 'multiple', 'class' => 'invisible', 'style' => 'width: ' . $this->width . 'px;', 'name' => $this->name . '[]']);
     echo Html::renderSelectOptions($this->selectedValues, $this->_allValues);
     echo Html::endTag("select");
     echo Html::submitButton('OK', ['style' => 'margin: 0 5px;']);
     echo Html::endTag('div');
     echo Html::endForm();
     echo "<script type='text/javascript'>";
     echo "\$('#{$id}').removeClass('invisible');";
     echo "\$('#{$id}').multipleSelect()";
     echo "</script>";
 }
Exemplo n.º 5
0
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     switch ($this->type) {
         case self::TYPE_HORIZONTAL:
             if ($this->stripped) {
                 Html::addCssClass($this->options, 'form-row-stripped');
             }
             if ($this->separated) {
                 Html::addCssClass($this->options, 'form-row-seperated');
             }
             if ($this->bordered) {
                 Html::addCssClass($this->options, 'form-bordered');
             }
             if ($this->bordered) {
                 Html::addCssClass($this->options, 'form-label-stripped');
             }
             Html::addCssClass($this->options, 'form-horizontal');
             $this->fieldConfig = ArrayHelper::merge(['labelOptions' => ['class' => 'col-md-3 control-label'], 'template' => "{label}\n" . Html::tag('div', "{input}\n{error}\n{hint}", $this->tagOptions)], $this->fieldConfig);
             break;
         case self::TYPE_INLINE:
             Html::addCssClass($this->options, 'form-inline');
             break;
     }
     if (!isset($this->fieldConfig['class'])) {
         $this->fieldConfig['class'] = ActiveField::className();
     }
     echo Html::beginForm($this->action, $this->method, $this->options);
     echo $this->renderActions(self::BUTTONS_POSITION_TOP);
     Html::addCssClass($this->bodyOptions, 'form-inline');
     echo Html::beginTag('div', $this->bodyOptions);
 }
Exemplo n.º 6
0
 public function testBeginForm()
 {
     $this->assertEquals('<form action="/test" method="post">', Html::beginForm());
     $this->assertEquals('<form action="/example" method="get">', Html::beginForm('/example', 'get'));
     $hiddens = ['<input type="hidden" name="id" value="1">', '<input type="hidden" name="title" value="&lt;">'];
     $this->assertEquals('<form action="/example" method="get">' . "\n" . implode("\n", $hiddens), Html::beginForm('/example?id=1&title=%3C', 'get'));
 }
Exemplo n.º 7
0
    public static function begin($config = [])
    {
        $defaults = ArrayHelper::remove($config, 'defaults', []);
        $w = parent::begin($config);
        $w->defaults = ArrayHelper::merge($w->defaults, $defaults);
        $view = $w->getView();
        echo Html::beginForm($w->action, $w->method, ArrayHelper::merge(ArrayHelper::getValue($config, 'options', []), ['id' => $w->id, 'method' => 'POST', 'enctype' => 'multipart/form-data']));
        KnockoutAsset::register($view);
        // client side validate on submit
        if ($w->validateOnSubmit) {
            $view->registerJs(sprintf(<<<EOD
\$('#%1\$s').submit(function(e) {
    var vm = ko.dataFor(e.target);
    if (vm && vm.validate) {
        vm.validate();
    }

    if (vm && vm.isValid && vm.isValid()) {
        return true;
    } else {
        e.preventDefault();
        return false;
    }
})
EOD
, $w->id, Json::encode($w->defaults)), View::POS_END);
        }
        //         $view->registerJs(sprintf(<<<EOD
        // var %1\$s = $.extend({}, x1.config, %2\$s);
        // EOD
        // , lcfirst(\yii\helpers\Inflector::camelize($w->id)), Json::encode($w->defaults)));
        return $w;
    }
Exemplo n.º 8
0
 /**
  * Initializes the widget.
  * This renders the form open tag.
  */
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     if ($this->init) {
         echo Html::beginForm($this->action, $this->method, $this->options);
     }
 }
Exemplo n.º 9
0
 /**
  * @return string
  */
 public function renderNavItem()
 {
     $output = '<li>' . Html::beginForm($this->action, $this->method, $this->formOptions) . '<div class="input-group">';
     $output .= Html::input('text', $this->name, $this->value, $this->inputOptions);
     $output .= '<div class="input-group-btn">';
     $output .= Html::button('<i class="glyphicon glyphicon-search"></i>', $this->buttonOptions);
     $output .= '</div></div>' . Html::endForm() . '</li>';
     return $output;
 }
Exemplo n.º 10
0
 public function run()
 {
     echo Html::beginForm(Url::to([$this->actionUrl]), 'post', []);
     if (!empty($this->returnUrl)) {
         echo Html::hiddenInput('returnUrl', $this->returnUrl);
     }
     echo Html::dropDownList('language', Yii::$app->language, Yii::$app->czaHelper->getEnabledLangs(), ['id' => $this->htmlId(), 'onchange' => 'this.form.submit()']);
     echo Html::endForm();
 }
Exemplo n.º 11
0
 private function _getList()
 {
     $menuItems = [];
     if (\Yii::$app->user->isGuest) {
         //          $menuItems[] = ['label' => 'Signup', 'visible' => \humanized\user\Module::getInstance()->params['enableSignUp'], 'url' => ['/user/account/signup']];
         $menuItems[] = ['label' => 'Login', 'url' => ['/user/account/login']];
     } else {
         $menuItems[] = '<li>' . Html::beginForm(['/user/account/logout'], 'post') . Html::submitButton('Logout (' . \Yii::$app->user->identity->email . ')', ['class' => 'btn btn-link']) . Html::endForm() . '</li>';
     }
     return $urls;
 }
Exemplo n.º 12
0
 /**
  * Renders the sort links.
  * @return string the rendering result
  */
 protected function renderSortLinks()
 {
     $attributes = empty($this->attributes) ? array_keys($this->sort->attributes) : $this->attributes;
     $links = [];
     foreach ($attributes as $key => $name) {
         $links[$name] = $name;
     }
     echo Html::beginForm(null, 'get', []);
     echo Html::dropDownList('sort', null, $links, ['prompt' => 'Sortiraj po']);
     echo Html::submitButton('<i class="fa fa-sort"></i>', ['class' => 'btn btn-default margin-left-5']);
     echo Html::endForm();
 }
Exemplo n.º 13
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->name;
     }
     if (!isset($this->options['ng-submit'])) {
         $this->options['ng-submit'] = 'submit($event)';
     }
     $this->options['name'] = $this->name;
     $this->options['novalidate'] = true;
     echo Html::beginForm($this->action, $this->method, $this->options);
 }
Exemplo n.º 14
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     $popover = '';
     $popover .= Html::beginForm($this->action);
     if ($this->content) {
         $popover .= $this->content;
     }
     $popover .= Html::submitButton($this->btnText, ['class' => 'btn btn-success']);
     $popover .= Html::hiddenInput('id', $this->model['id']);
     $popover .= Html::endForm();
     $this->content = $popover;
     return parent::run();
 }
Exemplo n.º 15
0
 public function renderForm()
 {
     $action = ArrayHelper::remove($this->formOptions, 'action', '');
     $method = ArrayHelper::remove($this->formOptions, 'method', 'post');
     if (!isset($this->formOptions['id'])) {
         $this->formOptions['id'] = 'msg-form';
     }
     $content = Html::beginForm($action, $method, $this->formOptions);
     if (is_string($this->formView)) {
         $content .= $this->getView()->render($this->formView, array_merge(['widget' => $this], $this->formParams));
     } else {
         $content .= call_user_func($this->formView, $this);
     }
     $content .= Html::endForm();
     return $content;
 }
Exemplo n.º 16
0
 private function buildForm()
 {
     $id = $this->_config['formId'];
     $opts = [];
     if ($id != '') {
         $opts['id'] = $id;
     }
     $form = Html::beginForm($this->_action, 'post', $opts);
     $form .= Html::hiddenInput('formid', $this->blockId);
     $form .= $this->renderFields();
     $form .= $this->renderCaptcha();
     $form .= $this->renderNote();
     $form .= Html::tag('div', Html::submitButton('Отправить'));
     $form .= Html::endForm();
     $form .= Html::tag('div', '', ['id' => 'feedback-message']);
     $this->registerScript();
     return $form;
 }
Exemplo n.º 17
0
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     echo Html::beginForm($this->action, $this->method, $this->options);
     echo '<div class="box box-primary">' . '  <div class="box-header with-border">';
     echo Html::tag('h3', $this->options['boxTitle'], ['class' => 'box-title']);
     echo '<div class="box-tools pull-right">';
     echo Html::button('<i class="fa fa-save"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-primary', 'title' => \Yii::t('theme/widgets/box', 'Save')]);
     echo ' ';
     if (isset($this->options['buttonUndo'])) {
         echo Html::a('<i class="fa fa-undo"></i>', $this->options['buttonUndo'], ['class' => 'btn btn-sm btn-default', 'title' => \Yii::t('theme/widgets/box', 'Undo')]);
     }
     echo '</div>';
     echo '</div>';
     echo '<div class="box-body form-horizontal">';
 }
Exemplo n.º 18
0
 /**
  * Renders the page buttons.
  * 
  * @return string the rendering result
  */
 protected function renderPageButtons()
 {
     // <div class="pagination" rel="jbsxBox" totalCount="<?php echo $totalCount;"
     // numPerPage=" echo $numPerPage;" pageNumShown="5"
     // currentPage=" echo $currentPage;"></div>
     //总条数
     $totalCount = $this->pagination->totalCount;
     // 总页数
     $pageCount = $this->pagination->getPageCount();
     // 当前页
     $currentPage = $this->pagination->getPage() + 1;
     // 每页大小
     $pageSize = $this->pagination->getPageSize();
     $options = ArrayHelper::merge(['rel' => $this->rel, 'totalCount' => $totalCount, 'numPerPage' => $pageSize, 'currentPage' => $currentPage, 'pageNumShown' => 5, 'targetType' => $this->targetType], $this->options);
     $pagerForm = '';
     $pagerForm .= Html::beginForm(Yii::$app->request->absoluteUrl, 'POST', ['id' => 'pagerForm']);
     $pagerForm .= Html::hiddenInput('pageNum', 1);
     $pagerForm .= Html::hiddenInput('numPerPage', $pageSize);
     $pagerForm .= Html::endForm();
     $html = '<div class="' . $this->options['class'] . '" targetType="' . $this->targetType . '" totalCount="' . $totalCount . '" numPerPage="' . $pageSize . '" pageNumShown="10" currentPage="' . $currentPage . '"></div>';
     return $pagerForm . $html;
     //return $pagerForm.Html::tag('div', '',$options);
 }
Exemplo n.º 19
0
 /**
  * Will generate the stripe form
  * @return string the generated stripe's modal form
  */
 private function generateStripeForm()
 {
     return Html::beginForm($this->action, 'POST', $this->formOptions) . $this->generateScriptTag() . Html::endForm();
 }
Exemplo n.º 20
0
echo Select2::widget(['name' => 'select_cpv', 'options' => ['placeholder' => 'CPV ...'], 'language' => 'el', 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(cpv) { return cpv.text; }'), 'templateSelection' => new JsExpression('function (cpv) { return cpv.text; }')]]);
echo Html::submitButton('Εμφάνιση');
?>
    
                    <br>     
            <?php 
echo Html::endForm();
?>
                
          
        </div>
        <div style="text-align: justify;" class="col-lg-4">
        <h4> Αποφάσεις για ΑΦΜ για Οργανισμό </h4>
            <?php 
// Form 1 : Decisions per month pew organizations
echo Html::beginForm('index.php?r=results/resultsb21afmorg', 'post');
// 2. Show selected Organisations
echo '<label class="control-label">Οργανισμοί</label>';
echo Select2::widget(['name' => 'select_orgs', 'data' => $currentOrgs, 'value' => '', 'options' => ['placeholder' => 'Οργανισμός...', 'multiple' => false]]);
echo Html::textInput("set_afm");
?>
                    <br>
            <?php 
echo Html::submitButton('Εμφάνιση');
?>
    
                    <br>     
            <?php 
echo Html::endForm();
?>
                
Exemplo n.º 21
0
$this->registerJsFile($baseUrl . '/assets/global/plugins/select2/js/select2.full.min.js', ['position' => \yii\web\View::POS_END]);
$this->registerJsFile($baseUrl . '/assets/pages/scripts/components-select2.min.js', ['position' => \yii\web\View::POS_END]);
echo UiMessage::widget();
?>
                    <div class="row">
                        <div class="col-md-12">
                            <!-- BEGIN PORTLET-->
                            <div class="portlet box blue">
                                <div class="portlet-title">
                                    <div class="caption">
                                        <i class="fa fa-gift"></i>บันทึกบ่อเลี้ยงกุ้ง </div>
                                </div>
                                <div class="portlet-body form">
                                    <!-- BEGIN FORM-->
                                   <?php 
echo Html::beginForm('', 'post', array('class' => 'form-horizontal form-bordered'));
?>
										<div class="form-body">
											<div class="form-group">
												<label class="control-label col-md-3">ชื่อบ่อ<span class="required">*</span></label>
												<div class="col-md-9">
													<?php 
echo Html::activeInput('text', $model, 'name', ['class' => 'form-control', 'placeholder' => 'กรุณาระบุ ชื่อบ่อ']);
?>
												</div>
											</div>
											
											<div class="form-group">
												<label class="control-label col-md-3">ขนาดบ่อ<span class="required">*</span></label>
												<div class="col-md-9">
													<?php 
 <?php 
    echo Html::submitButton('Update Item', ['class' => 'btn btn-primary', 'id' => 'uploaditemsubmit']);
    ?>
 <?php 
    ActiveForm::end();
    ?>
 </div>
 <?php 
}
?>
</div>
<br/>
<!-- Show color number selector -->
<?php 
if ($showColorNumberSelection) {
    echo Html::beginForm(['default/showupdatecolorsizeimage', 'item_id' => $itemData['item_id']], 'post');
    echo Html::activeDropDownList($itemModel, 'numberOfColors', $colorNumbers, ['onchange' => 'this.form.submit()', 'prompt' => '--Choose Number of Colors--']);
    echo Html::endForm();
    ?>
<br/>
<?php 
    if ($showColorSizeImageSelection) {
        $form = ActiveForm::begin(['method' => 'post', 'action' => 'index.php?r=item/default/insetitem&sub_cat_it=' . $itemModel->item_sub_category_id . '&item_name=' . $itemModel->item_name . '&item_mirrVal=' . $itemModel->item_mirrorval . '&item_no_of_colors=' . $itemModel->numberOfColors . '&item_id=' . $itemModel->item_id . '&item_hash=' . $itemModel->item_hashTag, 'options' => ['enctype' => 'multipart/form-data']]);
        for ($i = 0; $i < $colorNumbers[$itemModel->numberOfColors]; $i++) {
            echo '<label class="control-label">Enter Details of Item ' . ($i + 1) . '</label>';
            ?>
<br/>
<?php 
            echo Html::activeDropDownList($itemModel, 'itemColors[' . $i . ']', yii\helpers\ArrayHelper::map($colors, 'color_name', 'color_name'), ['prompt' => '--Choose color--']);
            ?>
Exemplo n.º 23
0
        <div class="row">
            <div class="col-lg-3 col-sm-3">
                <h4>Information</h4>
                <ul class="row">
                    <li class="col-lg-12 col-sm-12 col-xs-3"><a href="about.html" >About</a></li>
                    <li class="col-lg-12 col-sm-12 col-xs-3"><a href="agents.html" >Agents</a></li>
                    <li class="col-lg-12 col-sm-12 col-xs-3"><a href="blog.html" >Blog</a></li>
                    <li class="col-lg-12 col-sm-12 col-xs-3"><a href="contact.html" >Contact</a></li>
                </ul>
            </div>

            <div class="col-lg-3 col-sm-3">
                <h4>Newsletter</h4>
                <p>Get notified about the latest properties in our marketplace.</p>
                <?php 
echo \yii\helpers\Html::beginForm('', 'POST', ['class' => 'form-inline']);
?>
                    <?php 
echo \yii\helpers\Html::textInput('email', '', ['class' => 'form-control', 'placeholder' => 'Enter email address']);
?>
                    <?php 
echo \yii\helpers\Html::submitButton('Notify Me', ['class' => 'btn btn-success']);
?>
                <?php 
echo \yii\helpers\Html::endForm();
?>
            </div>

            <div class="col-lg-3 col-sm-3">
                <h4>Follow us</h4>
                <a href="#"><img src="/images/facebook.png"  alt="facebook"></a>
Exemplo n.º 24
0
<?php

/**
 * Created by PhpStorm.
 * User: vilison
 * Date: 2015/5/27
 * Time: 21:30
 */
use app\models\Commodity;
use yii\grid\GridView;
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\LinkPager;
$this->title = '商品审核';
$this->params['breadcrumbs'][] = $this->title;
echo Html::beginForm(['commodity/audit'], 'post', ['id' => 'search_form']);
?>
    <div>
        <div style="margin-bottom: 5px;">
            <div class="col-sm-2" style="padding-left:0px;">
                <?php 
echo Html::activeTextInput($model, 'shop', ['class' => 'form-control', 'placeholder' => '店铺']);
?>
            </div>
            <div class="col-sm-2" style="padding-left:0px;">
                <?php 
echo Html::activeTextInput($model, 'commodity', ['class' => 'form-control', 'placeholder' => 'ID']);
?>
            </div>
            <div class="col-sm-2" style="padding-left:0px;">
                <?php 
Exemplo n.º 25
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
if (!empty($interface) && isset($interface)) {
    echo Html::beginForm(Url::toRoute(['catalog/add', "id" => isset($data["id"]) ? $data["id"] : ""]), "POST");
    $this->beginContent('@app/views/layouts/interface.php', ["interface" => $interface]);
    $this->endContent();
    echo Html::endForm();
}
Exemplo n.º 26
0
active<?php 
}
?>
">
                            <?php 
echo Html::a(Yii::t('happycode', 'Add') . ' ' . \app\helpers\BootstrapHelper::glyphicon('plus'), ['site/add']);
?>
                        </li>
                        <li class="settings dropdown">
                            <a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin"><?php 
echo \app\helpers\BootstrapHelper::glyphicon('cog');
?>
</a>
                            <div class="dropdown-menu dropdown-menu-right" style="padding:15px; width: 350px;">
                                <?php 
echo Html::beginForm(['site/save-settings'], 'post', ['id' => 'settings-form']);
?>
                                <div class="form-group">
                                    <label for="theme-settings"><?php 
echo Yii::t('happycode', 'Highlight theme:');
?>
</label>
                                    <select name="highlight-style" id="theme-settings" class="form-control">
                                        <?php 
foreach (Yii::$app->params['highlight-styles'] as $style => $name) {
    ?>
                                            <option value="<?php 
    echo $style;
    ?>
"
                                                    <?php 
Exemplo n.º 27
0
        }
        return $string;
    }, 'format' => 'raw']]]);
    ?>
    </div>

    <?php 
    if ($model->is_active != Tournaments::FINISHED && $nextTour) {
        ?>
            <h4>Следующий тур в турнире <?php 
        echo $nextTour;
        ?>
</h4>

            <?php 
        echo Html::beginForm(['tournaments/reminder'], 'post');
        ?>
                <?php 
        echo Html::hiddenInput('tournament', $model->id_tournament);
        ?>
                <?php 
        echo Html::hiddenInput('tour', $nextTour);
        ?>
                <?php 
        echo Html::submitButton("Отправить напоминания на {$nextTour} тур", ['class' => 'btn btn-success']);
        ?>
            <?php 
        echo Html::endForm();
        ?>

    <?php 
Exemplo n.º 28
0

    <?php 
echo DetailView::widget(['model' => $evidence, 'attributes' => ['description:ntext']]);
?>
    <?php 
echo Html::label('Archivo adjunto: ');
?>


    <?php 
echo Html::a($evidence->attachment_name, ['download', 'evidenceId' => $evidence->id]);
?>
    <br><br>
    <?php 
echo Html::beginForm(['give-feedback', 'id' => $model['id'], 'evidenceId' => $evidence['id']], 'post');
?>
    <?php 
$array = [['value' => 1, 'estado' => 'Aceptado'], ['value' => 2, 'estado' => 'No aceptado']];
?>
    <?php 
echo Html::label('Aceptar avance?');
?>

    <?php 
echo Html::radioList('aceptado', 1, ArrayHelper::map($array, 'value', 'estado'), ['class' => "form-control", 'required' => true]);
?>

    <br>
    <?php 
echo Html::label('Retroalimentación');
Exemplo n.º 29
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\data\ArrayDataProvider;
use yii\helpers\ArrayHelper;
/**
 * @var yii\web\View $this
 */
$this->title = Yii::t('rbac', 'Generate Routes');
$this->params['breadcrumbs'][] = ['label' => Yii::t('rbac', 'Routes'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<h1><?php 
echo Yii::t('rbac', 'Generate Routes');
?>
</h1>

<?php 
echo Html::beginForm();
echo GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $new]), 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'checkboxOptions' => function ($model) {
    return ['value' => ArrayHelper::getValue($model, 'name'), 'checked' => true];
}], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'name']]]);
echo Html::submitButton(Yii::t('rbac', 'Append'), ['name' => 'Submit', 'class' => 'btn btn-primary']);
echo Html::endForm();
Exemplo n.º 30
-1
 public function run()
 {
     echo Html::beginForm($this->getComponent()->paymentAction, 'post', $this->options);
     echo Html::hiddenInput('shopId', $this->getComponent()->shopId);
     echo Html::hiddenInput('scid', $this->getComponent()->scId);
     echo Html::hiddenInput('sum', $this->order->getTotalPrice());
     echo Html::hiddenInput('customerNumber', $this->userIdentity->getCustomerId());
     if (is_array($this->paymentType)) {
         echo Html::dropDownList('paymentType', array_keys($this->paymentType)[0], $this->paymentType);
     }
     if (is_array($this->data)) {
         foreach ($this->data as $key => $value) {
             echo Html::hiddenInput($key, $value);
         }
     }
     if ($phone = $this->userIdentity->getCustomerPhone()) {
         echo Html::hiddenInput('cps_phone', $phone);
     }
     if ($email = $this->userIdentity->getCustomerEmail()) {
         echo Html::hiddenInput('cps_email', $email);
     }
     if ($orderId = $this->order->getId()) {
         echo Html::hiddenInput('orderNumber', $orderId);
     }
     echo Html::submitButton(Yii::t($this->getComponent()->messagesCategory, $this->submitText));
     echo Html::endForm();
 }