diff --git a/src/controllers/HdomainController.php b/src/controllers/HdomainController.php index c56eaad7..83aa7c09 100644 --- a/src/controllers/HdomainController.php +++ b/src/controllers/HdomainController.php @@ -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'), + ], ]; } } diff --git a/src/models/Hdomain.php b/src/models/Hdomain.php index 15a59498..ca85ef64 100644 --- a/src/models/Hdomain.php +++ b/src/models/Hdomain.php @@ -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']], ]; }