Currently the Dataset form won't work without javascript.
The main issue is that the resource form doesn't show up after importing a dataset. Check for JS in the dataset submit callback and redirect to the resource node add form if it isn't.
1) Create a setting in /admin/config/dkan that allows you to select "Don't use ajax for dataset and resource forms"
2) Create a rule that moves you to a resource node/add form after the a dataset is saved with the dataset string in the url so the dataset field has the dataset already filled in. Ex: node/add/resource?dataset=35 . In this case the dataset with node id 35 will be pre-selected in the "dataset" field.
3) Update dkan_dataset.forms.inc to not use javascript if the user has selected the box in '1)' or if the user doesn't have javascript enabled.
Comment | File | Size | Author |
---|---|---|---|
#4 | noajax.patch | 9.9 KB | uladzimir.karol |
Comments
Comment #1
acouch CreditAttribution: acouch commentedUpdating.
Comment #1.0
acouch CreditAttribution: acouch commentedUpdated issue summary.
Comment #2
acouch CreditAttribution: acouch commentedUpdating title.
Comment #3
JimCraner CreditAttribution: JimCraner commented+1 for minimizing time spent supporting users without Javascript per http://tomdale.net/2013/09/progressive-enhancement-is-dead/
Comment #4
uladzimir.karol CreditAttribution: uladzimir.karol commentedIn patch:
1. config page - /admin/config/dkan that allows you to select "Don't use ajax for dataset and resource forms"
2. export rule
3. Update dkan_dataset.forms.inc if checked don't use ajax
Comment #5
acouch CreditAttribution: acouch commentedThanks for the patch!
Please select 'Needs review' when you submit a patch so I know it is here.
Looks great. Can you add the new rule to dkan_dataset instead of its own module?
Comment #6
acouch CreditAttribution: acouch commentedComment #6.0
acouch CreditAttribution: acouch commentedUpdated issue summary.
Comment #7
acouch CreditAttribution: acouch commentedThe update on this is that there is a config form setting for not using JS for the dataset form, but not the resource form. The resource form needs a menu option to select whether or not JS should be enabled and the dkan_dataset.forms.inc page needs to check to see if that has been selected before adding the ajax callbacks, and finally a redirect needs to happen if the users selects "Add Another".
Comment #8
Slurpee CreditAttribution: Slurpee commentedHello from Drupal's GSoC 2014 team. Google Summer of Code (GSoC)? - an annual program for university students organized by Google with projects managed by open source organization mentors such as us (Drupal!).
We're currently browsing the issue queue looking for projects. Do you think this issue/project is worth a student spending a summer on it and being paid by Google? If so, are you interested in mentoring the student? Learn more about Summer of Code and how to get involved at links below. We're submitting our Summer of Code application to Google in just over 24 hours and looking for last minute ideas. Please respond quickly if you're interested.
Group to join - https://groups.drupal.org/google-summer-code
Ideas for projects for Summer of Code 2014 - https://groups.drupal.org/node/404778
GSoC Homepage http://www.google-melange.com/gsoc/homepage/google/gsoc2014
Google's Summer of Code 2014 Announcement - http://google-opensource.blogspot.com/2014/02/mentoring-organization-app...
Comment #9
acouch CreditAttribution: acouch commentedThe ajax is now off by default for the dataset and resource forms. That can be toggled at /admin/dkan/dkan_forms.
@Slurpee we would love to have this as a GsoC project. Is it too late to try present our project? What steps should we take?