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.

CommentFileSizeAuthor
#4 noajax.patch9.9 KBuladzimir.karol
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acouch’s picture

Title: forms. Add non-js fallback » Dataset and Resource form. Add non-js fallback

Updating.

acouch’s picture

Issue summary: View changes

Updated issue summary.

acouch’s picture

Title: Dataset and Resource form. Add non-js fallback » Dataset and Resource form. Add non-js fallback as well as ability to select not to use JS.

Updating title.

JimCraner’s picture

Component: Code » Documentation

+1 for minimizing time spent supporting users without Javascript per http://tomdale.net/2013/09/progressive-enhancement-is-dead/

uladzimir.karol’s picture

FileSize
9.9 KB

In 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

acouch’s picture

Thanks 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?

acouch’s picture

Status: Active » Needs work
acouch’s picture

Issue summary: View changes

Updated issue summary.

acouch’s picture

The 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".

Slurpee’s picture

Issue summary: View changes

Hello 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...

acouch’s picture

Status: Needs work » Fixed

The 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?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.