-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account mail settings edit implemented
- Loading branch information
1 parent
4d88997
commit 9556106
Showing
4 changed files
with
208 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
/* @var $this View */ | ||
/* @var $model hipanel\modules\hosting\models\Account */ | ||
/* @var $type string */ | ||
|
||
use hipanel\base\View; | ||
use hipanel\helpers\Url; | ||
use hipanel\modules\client\widgets\combo\ClientCombo; | ||
use hipanel\modules\hosting\widgets\combo\SshAccountCombo; | ||
use hipanel\modules\server\widgets\combo\ServerCombo; | ||
use hiqdev\combo\StaticCombo; | ||
use yii\helpers\Html; | ||
use yii\bootstrap\ActiveForm; | ||
|
||
$this->title = $model->login; | ||
$this->subtitle = Yii::t('app', 'account mail config') . ' #' . $model->id; | ||
$this->breadcrumbs->setItems([ | ||
['label' => 'Accounts', 'url' => ['index']], | ||
['label' => $model->login, 'url' => ['view', 'id' => $model->id]], | ||
Yii::t('app', 'Mail config') | ||
]); | ||
|
||
|
||
$form = ActiveForm::begin([ | ||
'id' => 'dynamic-form', | ||
'enableClientValidation' => true, | ||
'validateOnBlur' => true, | ||
'enableAjaxValidation' => true, | ||
'validationUrl' => Url::toRoute(['validate-form', 'scenario' => $model->scenario]), | ||
]); ?> | ||
|
||
<div class="container-items"> | ||
<?php foreach ($models as $i => $model) { ?> | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<div class="box box-danger"> | ||
<div class="box-body"> | ||
<div class="form-instance" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | ||
<?= $form->field($model, "[$i]id")->hiddenInput()->label(false) ?> | ||
|
||
<div class="row"> | ||
<?php if (Yii::$app->user->can('support')) { ?> | ||
<div class="col-md-4"> | ||
<?= $form->field($model, "[$i]client")->widget(ClientCombo::className(), ['inputOptions' => ['readonly' => true]]) ?> | ||
</div> | ||
<?php } ?> | ||
<div class="col-md-4"> | ||
<?= $form->field($model, "[$i]server")->widget(ServerCombo::className(), ['inputOptions' => ['readonly' => true]]) ?> | ||
</div> | ||
<div class="col-md-4"> | ||
<?= $form->field($model, "[$i]login")->widget(SshAccountCombo::className(), ['inputOptions' => ['readonly' => true]]) ?> | ||
</div> | ||
</div> | ||
<?php | ||
echo $form->field($model, 'per_hour_limit'); | ||
echo $form->field($model, 'block_send')->checkbox(); | ||
?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
<?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-default']) ?> | ||
| ||
<?= Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'onclick' => 'history.go(-1)']) ?> | ||
<?php ActiveForm::end(); |
Oops, something went wrong.