Right now it's possible to hide the Preview button (using Node Form Settings) while also having "require preview" (from node/comment module) set (thus hiding the Save button). The end result is that there will be *NO* button below the form.

Node Form Settings should validate that both of these options are not enabled at the same time and either a) disallow submission of a form with these settings, or b) bring up a confirmation message asking whether the admin really wants to do this (this is more challenging to program).

It might also be good to have some JavaScript-based clues to disallow this as well - for instance an alert message when an admin chooses these "wrong" settings.

Comments

lelizondo’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Category: bug » feature

I already added some javascript but I'm afraid is not working like I expected since I'm not very good with js, I'll try what you said, but if anyone wants to jump in and help with the js, I'll be glad to receive patches.

eaton’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Category: feature » bug

I'm whipping something up -- JS to disable/enable the radio buttons is probably less reliable than a validate or submit handler that ensures the incompatible options aren't selected. Perhaps if someone chooses to hide the 'Preview' button, it automatically sets the preview to 'optional' and displays a message on the admin page?

That would work regardless of the JS situation.

lelizondo’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
StatusFileSize
new2.25 KB

I've created a patch to solve the Preview button on nodes only, what I'm doing is simple, if the 'Preview button' is set to *Required*, then we force all nodeformsettings_preview_$type variables to 'Enabled' and disable the $form['nodeformsettings']['nodeformsettings_preview'] so the user won't be able to disable the Preview button since is Required now.

Patch is against HEAD so I'm changing the version. Please test while I work on the Comment's preview button.

lelizondo’s picture

Status: Active » Needs review
lelizondo’s picture

StatusFileSize
new2.1 KB

re-rolled the patch.. review this..

lelizondo’s picture

Status: Needs review » Fixed

this was fixed months ago.

Status: Fixed » Closed (fixed)

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