-
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.
- Loading branch information
1 parent
95e5af1
commit a351075
Showing
11 changed files
with
243 additions
and
16 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
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
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,52 @@ | ||
<?php | ||
|
||
/* @var $this View */ | ||
/* @var $model hipanel\modules\hosting\models\Db */ | ||
/* @var $type string */ | ||
|
||
use hipanel\base\View; | ||
use hipanel\modules\client\widgets\combo\ClientCombo; | ||
use hipanel\modules\hosting\widgets\combo\AccountCombo; | ||
use hipanel\modules\hosting\widgets\combo\DbServiceCombo; | ||
use hipanel\modules\server\widgets\combo\ServerCombo; | ||
use hipanel\widgets\PasswordInput; | ||
use yii\helpers\Html; | ||
use yii\bootstrap\ActiveForm; | ||
use yii\helpers\Url; | ||
|
||
?> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="box box-danger"> | ||
<div class="box-body"> | ||
<div class="ticket-form" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> | ||
<?php $form = ActiveForm::begin([ | ||
'action' => $model->isNewRecord ? Url::to('create') : Url::toRoute([ | ||
'update', | ||
'id' => $model->id | ||
]), | ||
]); | ||
?> | ||
<!-- Properties --> | ||
|
||
<?php | ||
print $form->field($model, 'client')->widget(ClientCombo::className()); | ||
print $form->field($model, 'server')->widget(ServerCombo::className()); | ||
print $form->field($model, 'account')->widget(AccountCombo::className()); | ||
|
||
print $form->field($model, 'domain'); | ||
|
||
?> | ||
|
||
<div class="form-group"> | ||
<?= Html::submitButton(Yii::t('app', 'Create'), ['class' => 'btn btn-primary']) ?> | ||
</div> | ||
|
||
<?php ActiveForm::end(); ?> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- ticket-_form --> | ||
</div> | ||
</div> |
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,13 @@ | ||
<?php | ||
/* @var $this yii\web\View */ | ||
/* @var $model hipanel\modules\ticket\models\Thread */ | ||
/* @var $type string */ | ||
|
||
$this->title = Yii::t('app', 'Create database'); | ||
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Domains'), 'url' => ['index']]; | ||
$this->params['breadcrumbs'][] = $this->title; | ||
?> | ||
|
||
<div class="db-create"> | ||
<?= $this->render('_form', compact('model')) ?> | ||
</div> |
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,22 @@ | ||
<?php | ||
|
||
namespace hipanel\modules\hosting\widgets\hdomain; | ||
|
||
use hipanel\base\Re; | ||
use hipanel\widgets\Label; | ||
|
||
class State extends Label | ||
{ | ||
public $model = []; | ||
|
||
public function run () { | ||
$state = $this->model->state; | ||
if ($state=='ok') $class = 'info'; | ||
elseif ($state=='blocked') $class = 'danger'; | ||
else $class = 'warning'; | ||
|
||
$this->zclass = $class; | ||
$this->label = Re::l($this->model->state_label); | ||
parent::run(); | ||
} | ||
} |