Repository: OCHA-DAP/hdx-ckan

Issue:
Epic SSL: mailchimp.js
Our _/mailchimp.js_ is calling _http://downloads.mailchimp.com/js/jquery.form-n-validate.js_
Changing "http://" into "//" failed, because downloads.mailchimp.com has an amazon generic certificate.

The workaround is to download the said _jquery.form-n-validate.js_ to _hdx-ckan/ckanext-hdx_theme/ckanext/hdx_theme/public/_ and edit _mailchimp.js_ from the same location; change line 32 to read: 
    _script.src = '/jquery.form-n-validate.js';_

Danke. :)



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/count.py b/ckanext-hdx_theme/ckanext/hdx_theme/count.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/count.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/count.py
@@ -30,7 +30,7 @@ def organization(self):
         return json.dumps({'count': self._get_count('"group"', 'organization', True)})
 
     def source(self):
-        return json.dumps({'count': 20})
+        return json.dumps({'count': 46})
 
     def tag(self):
         return json.dumps({'count': self._get_count('tag', 'tag', False)})
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/org_controller.py
@@ -13,6 +13,7 @@
 import ckan.model as model
 import logging as logging
 import exceptions as exceptions
+import pylons.config as config
 
 log = logging.getLogger(__name__)
 
@@ -26,7 +27,6 @@ def send_mail(recipients, subject, body):
     else:
         h.flash_error(_('The are no recipients for this request. Contact an administrator '))
         raise exceptions.Exception('No recipients')
-    
 
 
 class HDXReqsOrgController(base.BaseController):
@@ -158,10 +158,13 @@ def _validate_new_org_request_field(self, data):
             raise logic.ValidationError(errors)
 
     def _send_new_org_request(self, data):
-
-        sys_admins = tk.get_action('hdx_get_sys_admins')()
-        sys_admins =[sys_admin for sys_admin in sys_admins if sys_admin['email']]
-
+#         sys_admins = tk.get_action('hdx_get_sys_admins')()
+#         sys_admins =[sys_admin for sys_admin in sys_admins if sys_admin['email']]
+        email = config.get('hdx.orgrequest.email', None)
+        if not email:
+            email = 'hdx.feedback@gmail.com'
+        display_name = 'HDX Feedback'
+        
         subject = _('New organization request:') + ' ' \
             + data['title']
         body = _('New organization request \n' \
@@ -174,5 +177,5 @@ def _send_new_org_request(self, data):
         '').format(org_name=data['title'], org_description = data['description'],
                    org_url = data['org_url'], person_name = data['your_name'], person_email = data['your_email'])
 
-        send_mail(sys_admins, subject, body)
+        send_mail([{'display_name': display_name, 'email': email}], subject, body)
         
\ No newline at end of file
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version='v0.3.0'
\ No newline at end of file
+hdx_version='v0.3.1'
\ No newline at end of file


Test patch: