<?php $form = ActiveForm::begin(['id' => 'setting-form', 'options' => ['class' => 'form-horizontal nav-tabs-custom'], 'fieldConfig' => ['template' => "{label}\n<div class=\"col-lg-3\">{input}{hint}</div>\n<div class=\"col-lg-5\">{error}</div>", 'labelOptions' => ['class' => 'col-lg-2 control-label']]]); ?> <?php echo \yii\bootstrap\Tabs::widget(['items' => $items, 'options' => ['tag' => 'div'], 'itemOptions' => ['tag' => 'div'], 'headerOptions' => ['class' => 'my-class'], 'clientOptions' => ['collapsible' => false]]); ?> <div class="tab-content"> <div class="form-group"> <div class="col-lg-3 col-lg-offset-2"> <?php echo Html::input('hidden', 'tabHash', '', ['id' => 'tabHash']); ?> <?php echo Html::submitButton(Module::t('setting', 'Update'), ['class' => 'btn btn-primary']); ?> </div> </div> </div> <br/> <?php ActiveForm::end(); $js = <<<JS if (location.hash !== ''){ jQuery('a[href="' + location.hash + '"]').tab('show'); jQuery('#tabHash').val(location.hash); } // remember the hash in the URL without jumping jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
/** * @inheritdoc */ public function attributeLabels() { return ['id' => Module::t('common', 'ID'), 'parent_id' => Module::t('common', 'Parent ID'), 'name' => Module::t('common', 'Name'), 'code' => Module::t('common', 'Code'), 'type' => Module::t('common', 'Type'), 'store_range' => Module::t('common', 'Store Range'), 'store_dir' => Module::t('common', 'Store Dir'), 'value' => Module::t('common', 'Value'), 'sort_order' => Module::t('common', 'Sort Order')]; }