Skip to content

Commit

Permalink
Account, DB, Hdomain create form - removed client input for non-support
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Sep 28, 2015
1 parent 7be4e50 commit 99602fd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/views/account/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
?>

<?php
print $form->field($model, "[$i]client")->widget(ClientCombo::className());
if (Yii::$app->user->can('support')) {
print $form->field($model, "[$i]client")->widget(ClientCombo::className());
}

print $form->field($model, "[$i]server")->widget(ServerCombo::className());
if ($model->scenario === 'create-ftponly') {
print $form->field($model, "[$i]account")->widget(SshAccountCombo::className());
Expand Down
5 changes: 4 additions & 1 deletion src/views/db/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
<div class="box-body">
<div class="form-instance" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<?php
print $form->field($model, "[$i]client")->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
if (Yii::$app->user->can('support')) {
print $form->field($model, "[$i]client")->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
}

print $form->field($model, "[$i]server")->widget(ServerCombo::className(), ['formElementSelector' => '.form-instance']);
print $form->field($model, "[$i]account")->widget(SshAccountCombo::className(), ['formElementSelector' => '.form-instance']);
print $form->field($model, "[$i]service_id")->widget(DbServiceCombo::className(), ['formElementSelector' => '.form-instance']);
Expand Down
5 changes: 4 additions & 1 deletion src/views/hdomain/_form-alias.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
<div class="box-body">
<div class="form-instance" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<?php
print $form->field($model, "[$i]client")->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
if (Yii::$app->user->can('support')) {
print $form->field($model, "[$i]client")->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
}

print $form->field($model, "[$i]server")->widget(ServerCombo::className(), ['formElementSelector' => '.form-instance']);
print $form->field($model, "[$i]account")->widget(SshAccountCombo::className(), [
'formElementSelector' => '.form-instance',
Expand Down
7 changes: 5 additions & 2 deletions src/views/hdomain/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@
<div class="box-body">
<div class="form-instance" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<?php
print $form->field($model, "[$i]client")
->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
if (Yii::$app->user->can('support')) {
print $form->field($model, "[$i]client")
->widget(ClientCombo::className(), ['formElementSelector' => '.form-instance']);
}

print $form->field($model, "[$i]server")
->widget(ServerCombo::className(), ['formElementSelector' => '.form-instance']);
print $form->field($model, "[$i]account")->widget(SshAccountCombo::className(), [
Expand Down

0 comments on commit 99602fd

Please sign in to comment.