Skip to content

Commit

Permalink
Add some actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Aug 20, 2015
1 parent 5137122 commit d98d156
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/controllers/HdomainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ public function actions()
'validate-form' => [
'class' => 'hipanel\actions\ValidateFormAction',
],
// Premium Autorenewal
'enable-paid-feature-autorenewal' => [
'class' => 'hipanel\actions\SmartPerformAction',
'success' => Yii::t('app', 'Premium autorenewal has been enabled'),
],
'disable-paid-feature-autorenewal' => [
'class' => 'hipanel\actions\SmartPerformAction',
'success' => Yii::t('app', 'Premium autorenewal has been disabled'),
],
];
}
}
2 changes: 2 additions & 0 deletions src/models/Hdomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public function rules()
[['dns_on', 'with_www', 'proxy_enable'], 'boolean'],
[['domain', 'alias'], DomainValidator::className()],
[['ip', 'backend_ip'], 'safe'], /// TODO: replace with IP validator

[['domain', 'id'], 'safe', 'on' => ['enable-paid-feature-autorenewal', 'disable-paid-feature-autorenewal']],
];
}

Expand Down

0 comments on commit d98d156

Please sign in to comment.