Comments

optalgin’s picture

Status: Active » Closed (works as designed)

Check the advanced tab under /admin/settings/hide-submit/settings
there is an option to "Exclude unlisted forms"

josebc’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Closed (works as designed) » Active

looks like there is not implemented in the 7.x branch, i can work on it if no work is already beeing done

josebc’s picture

StatusFileSize
new2.96 KB

patch for 7.x-2.x

josebc’s picture

Status: Active » Needs review
greggles’s picture

Title: Enable per Form ID » Enable hide_submit on a per Form ID basis

I like this approach in general, thanks for your work!

I wonder about "exclude unlisted forms" as a way to describe what the feature does. Maybe it could be described as "Only affect listed forms"? And then the text area description would have to change to be just something like "Form id list" so that it avoids the word "exclusion".

josebc’s picture

StatusFileSize
new2.91 KB

yeah i agree, here is a new patch with the changes

skyredwang’s picture

I followed @greggles's breadcrumb from #1939426: I cannot Create new filter group , however #6 patch doesn't solve the original problem; tested on simplelytest.me

greggles’s picture

@skyredwang - after you applied this patch did you configure it so it would be disabled in the views admin area?

skyredwang’s picture

@greggles, no, I didn't. Not sure what form ID(s) I should use to exclude all Views. Maybe this feature can provide some common defaults?

greggles’s picture

I agree it should have some good defaults, especially for the views admin form.

It looks like the main views editing form is views_ui_edit_form.

josebc’s picture

actually i think we should add an "exclude from admin pages" checkbox that should be checked by default, since it will be hard to cover all the admin form cases

greggles’s picture

As I was looking through views I saw a lot of forms where hide_submit would be valuable - the cache clearing, importing an exported view. I don't think "all of admin" is a good idea.

josebc’s picture

StatusFileSize
new3.01 KB

Re-roll for latest dev and fix possible xss issue, @greggles could you please provide a list of what could be considered as common defaults .

sumthief’s picture

StatusFileSize
new16.31 KB

Hi all,

Reroll of patch from #13.
Fixed some moments (incorrect condition in hide_submit_form_alter()) and add some additional logic for real per form id functional.

sumthief’s picture

StatusFileSize
new16.43 KB
new532 bytes

Reroll of patch from #14. (Fix problem with features export).

qzmenko’s picture

Comment deleted (wrong)

sumthief’s picture

StatusFileSize
new16.43 KB

Reviewed and tested on clean Drupal installation and for me it works good.

Also there is small rework for the last patch.

sumthief’s picture

StatusFileSize
new195 bytes

Add inter diff.

phily’s picture

Status: Needs review » Reviewed & tested by the community

Thanks lot, patch #17 works with Drupal 7.56 and Hide Submit 7.x-2.4
I haven't tested it on many sites but it might be the time to port it ;-)

chaseontheweb’s picture

StatusFileSize
new16.14 KB
new5.77 KB

Patch #17 doesn't work with the 'disable button' mode because of hide_submit.js:63:

              if (Drupal.settings.hide_submit[i].hide_submit_method === 'disable') {
                $('input.form-submit, button.form-submit', $form).attr('disabled', 'disabled').each(function (i) {
                  var $button = $(this);
                  if (Drupal.settings.hide_submit[i].hide_submit_css) {

'i' was the name of the variable holding the form id, and it's been clobbered in the .each() callback. The attached patch cleans up the ambiguously named 'i' variable.

mrpeanut’s picture

Patch from #20 works for me. Thanks!