benefits: Display member button.
[org.fsf.memberdashboard.git] / CRM / Admin / Form / Setting / MemberDashboard.php
index a2b32f3de8037a2db27df074076f57574aff9aaa..e065f8f18be24a71056c51293a1e401aed064141 100644 (file)
@@ -45,6 +45,8 @@ class CRM_Admin_Form_Setting_MemberDashboard extends CRM_Admin_Form_Setting {
   public function buildQuickForm() {
     $this->add('select', 'memberdashboard_info_profile_id',
                'Member Info Profile', $this->fetchProfiles());
+    $this->add('text', 'memberdashboard_button_static_url',
+               'Member Button Static Image URL');
     $this->add('text', 'memberdashboard_button_api_url',
                'Member Button API URL');
     $this->add('text', 'memberdashboard_button_api_user',
@@ -64,13 +66,15 @@ class CRM_Admin_Form_Setting_MemberDashboard extends CRM_Admin_Form_Setting {
   public function postProcess() {
     $params = $this->exportValues();
     $profileKey = 'memberdashboard_info_profile_id';
-    $urlKey = 'memberdashboard_button_api_url';
+    $staticUrlKey = 'memberdashboard_button_static_url';
+    $apiUrlKey = 'memberdashboard_button_api_url';
     $userKey = 'memberdashboard_button_api_user';
     $passwordKey = 'memberdashboard_button_api_password';
 
     civicrm_api3('setting', 'create', array(
       $profileKey => $params[$profileKey],
-      $urlKey => $params[$urlKey],
+      $staticUrlKey => $params[$staticUrlKey],
+      $apiUrlKey => $params[$apiUrlKey],
       $userKey => $params[$userKey],
       $passwordKey => $params[$passwordKey]
     ));