Repository: OCHA-DAP/hdx-ckan

Issue:
Dataset edit: The country functionality should not be in optional and should work as it does on the Dataset Creation page



Discussion:
@cjhendrix what do you mean by "should work as it does on the Dataset Creation page"  ? The search as you type should be transformed into a normal dropdown ?

Yes, exactly.  

@cjhendrix - i think this one should not be done during code freeze

Ok.  Agreed.  And in fact, it doesn't work so well on the dataset creation page.  See #349 

Moving to sprint 16 since we _almost_ finished it but not quite.

Re-opening:  the country picker is still in the optional section

What server are you seeing this on CJ? Just tested it again and not having a country selected in edit throws the correct validation error

yes, I think the validation is working, but the country picker is still in the optional section of the page.

Oh, okay. I misunderstood what you meant by make it not optional then. My bad, that makes perfect sense.


Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/licenses.py b/ckanext-hdx_theme/ckanext/hdx_theme/licenses.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/licenses.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/licenses.py
@@ -19,16 +19,16 @@ class LicenseCreativeCommonsIntergovernmentalOrgs(DefaultLicense):
     def title(self):
         return _("Creative Commons Attribution for Intergovernmental Organisations")
     
-class LicenseCreativeCommonsNoDerives(DefaultLicense):
+#class LicenseCreativeCommonsNoDerives(DefaultLicense):
 #     domain_content = True
 #     domain_data = True
-    id = "cc-by-nd"
-    is_okd_compliant = False
-    url = "http://creativecommons.org/licenses/by-nd/3.0/legalcode"
+#    id = "cc-by-nd"
+#    is_okd_compliant = False
+#    url = "http://creativecommons.org/licenses/by-nd/3.0/legalcode"
 
-    @property
-    def title(self):
-        return _("Creative Commons Attribution-NoDerives")
+#    @property
+#    def title(self):
+#        return _("Creative Commons Attribution-NoDerives")
     
 class LicenseOtherPublicDomainNoRestrictions(DefaultLicense):
 #     domain_content = True
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
@@ -21,7 +21,6 @@ def _generate_license_list():
                                                   license.License(hdx_licenses.LicenseCreativeCommonsIntergovernmentalOrgs()),
                                                   license.License(license.LicenseCreativeCommonsAttribution()),
                                                   license.License(license.LicenseCreativeCommonsAttributionShareAlike()),
-                                                  license.License(hdx_licenses.LicenseCreativeCommonsNoDerives()),
                                                   license.License(hdx_licenses.LicenseOtherPublicDomainNoRestrictions()),
                                                   license.License(hdx_licenses.LicenseHdxMultiple()),
                                                   license.License(hdx_licenses.LicenseHdxOther())


Test patch: