فهرست منبع

reenable flexilbe extension facility

andre 2 سال پیش
والد
کامیت
6d6e352b5e
2فایلهای تغییر یافته به همراه14 افزوده شده و 3 حذف شده
  1. 3 0
      app/UI/Admin/ProductConfiguration/Pages/ConfigForm.php
  2. 11 3
      kerioEmail.php

+ 3 - 0
app/UI/Admin/ProductConfiguration/Pages/ConfigForm.php

@@ -41,6 +41,9 @@ class ConfigForm extends FormIntegration implements AdminArea
         /** available features in ca **/
         $this->addSection(new ClientAreaFeatures());
 
+        /** configurable option section**/
+        $this->addSection(new ConfigurableOptions());
+
         $this->loadDataToForm();
     }
 

+ 11 - 3
kerioEmail.php

@@ -121,9 +121,17 @@ function KerioEmail_ClientArea()
 {
     require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'App' . DIRECTORY_SEPARATOR . 'AppContext.php';
     
-    $appContext = new AppContext();    
-    
-    return $appContext->runApp(__FUNCTION__);
+    $appContext = new AppContext();
+    $productManager = new ProductManager;
+    $productManager->loadByHostingId($params['serviceid']);
+    $domainBaseSize = $productManager->get('domainBaseSize') ? $productManager->get('domainBaseSize') : 0;
+    $acc_base = $productManager->get('acc_base') ? $productManager->get('acc_base') : 0;
+    $response = $appContext->runApp('clientarea', $params);
+    $response['templateVariables']['acc_base'] = $acc_base;
+    $response['templateVariables']['acc_add'] = $params['configoptions']['acc_add'] ? $params['configoptions']['acc_add'] : 0;
+    $response['templateVariables']['domainBaseSize'] = $domainBaseSize;
+    $response['templateVariables']['domainAddSize'] = $params['configoptions']['domainAddSize'] ? $params['configoptions']['domainAddSize'] : 0;
+    return $response;
 }
 
 function KerioEmail_ListAccounts($params)