/
var
/
www
/
vhosts
/
nabawater
/
backend
/
views
/
country
/
/var/www/vhosts/nabawater/backend/views/country
mkdir
upload
Name
Size
Mode
Actions
create.php
512
0644
edit
dl
rm
index.php
4123
0644
edit
dl
rm
update.php
512
0644
edit
dl
rm
_form.php
2281
0644
edit
dl
rm
Edit:
/var/www/vhosts/nabawater/backend/views/country/_form.php
(2281B)
<?php use backend\components\CActiveForm; use yii\helpers\Html; use common\helpers\Com; /* @var $this \yii\web\View */ /* @var $model \backend\models\Country */ /* @var $modelLang \backend\models\CountryLang */ $form = CActiveForm::begin()->setModel($model); ?> <div class="card-body"> <h4 class="card-title"><?= $this->title; ?></h4> <hr> <div class="ui-tabs"> <ul class = "nav nav-tabs" role="tablist"> <?php $i = 1; foreach ($appLanguages as $langCode => $langName): $isActive = Com::isSiteLang($langCode); ?> <li class="nav-item"> <a href="#<?= $langCode; ?>" data-toggle="tab" role="tab" id="li_<?= $i ?>" class="<?= $isActive? 'nav-link active': 'nav-link' ?>"><?= $langName ?></a> </li> <?php $i++; endforeach ; ?> </ul> <div class="tab-content tabcontent-border"> <?php foreach ($appLanguages as $langCode => $langName): $isActive = Com::isSiteLang($langCode); ?> <div id="<?= $langCode ?>" role="tabpanel" class="tab-pane <?= $isActive? 'active': '' ?>"> <div class="col-md-6"> <?= $form->field($modelLang, 'country_name', ['lang' => $langCode])->textInput(); ?> </div> </div> <?php endforeach; ?> </div> </div> <div class="col-md-12"> <?= $form->field($model, 'country_code')->textInput(); ?> </div> <div class="col-md-12"> <?= $form->field($model, 'country_iso')->textInput(); ?> </div> <div class ="col-md-4"> <?= $form->field($model, 'country_status')->radioList([$model::ACTIVE => yii::t('backend','Active'), $model::INACTIVE => yii::t('backend','Inactive')]); ?> </div> <div class= "col-md-12 text-center"> <?= Html::submitButton($model->getIsNewRecord() ? yii::t('backend','Create') : yii::t('backend','Update'), ['class' => 'btn btn-success']) ?> <?= Html::a(yii::t('backend','Cancel'), ['index'], ['class' => 'btn btn-secondary']); ?> </div> </div> <?php CActiveForm::end(); ?>
Save
cmd:
run