Comments

nehajyoti created an issue. See original summary.

nehajyoti’s picture

@greggles,
I see the module needs co-maintainer, I am starting to work on D8 port and would also like to maintain the module for both D7 and D8.

nehajyoti’s picture

Hi @greggles,
I have ported a basic version of this module to Drupal 8. The code is available at https://github.com/nehajyoti04/hide_submit.
I would also like to have maintainer access to actively maintain the module.

dkre’s picture

Thanks @nehajyoti, works well.

nehajyoti’s picture

@dkre In case you have access to provide me maintainer access, can you grant me. So that I can release as well as maintain D8 version.

greggles’s picture

Title: [meta]Port to D8 » [meta] Port hide submit to Drupal 8

Thanks for your work so far. I don't use Drupal 8 much so I'm not in a good place to review the code and potentially add you as a maintainer.

Would you consider going through the security review process for the module? If you become a git vetted user through that process I'd be willing to add you as a maintainer here so you can release the code in this project. Thanks again!

deviantintegral’s picture

I'm not sure this is required for 8.x as it was solved in core at #1705618: Double click prevention on form submission at commit 502e953fba73458e5a69b837b40b91e072a3791d. Testing locally on my 8.5.x checkout, I'm unable to spam-submit the node form.

Should this issue be closed and the project page updated?

greggles’s picture

Yes, it looks like that does fix it. Want to propose some text for the project page?

kyberman’s picture

Hi @greggles, that core commit covers only node forms, but other forms are still open for double-click. Could you please consider merging of https://www.drupal.org/project/hide_submit_d8 module written by @nehajyoti ?

I tested it and it looks like solid starting point. Code would need some care (at least duplicate calls of core services, coding standards and removing of weird route checking), but having that work merged would be really nice.

deviantintegral’s picture

I haven't tried it myself, but reading the behaviour looks like it would apply to all forms that are not GET requests.

If there is a need for something on top of core, I think the module should work with the existing behaviour or at least model it in implementation, as compared to the current code in Github.

kyberman’s picture

@deviantintegral That's right, sometimes I got this working also for other forms (as a user with admin role), but not in all cases (e.g. the same form with non-admin role). Drupal is basically not attaching this library to all forms.