Fasttoggle miscommunication when "Label style" = Action

thekevinday - August 19, 2008 - 18:48
Project:Fasttoggle
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When "Label style" is set to Action instead of the default Status the following problem happens.

I have a node (page) called "test".
I want to unpublish, and with "Label style" set to action, the button properly shows unpublish.

Now, when I click the button, I get the following message:
Are you sure you want to set the post test to publish?

The node is currently published, and when the above message is confirmed, the node will be properly unpublished.
So this miscommunicates to the user what the confirmation action will perform.

I have solved the problem with the attached patch, please review.

The patch adds a conditional for handling whether or not "Label style" is Status or Action.
The patch is applied to all 3 cases of the question: node, comment, and user

AttachmentSize
fasttoggle-fix_confirmation-1.patch2.25 KB

#1

thekevinday - August 19, 2008 - 20:28

Looks like I overlooked a case.

Apparently all of the options are not boolean, this happens in the case of "comments".
There are three choices instead of two choices for comments "lock comments", "unlock comments", "hide comments".

The patch I provided uses the boolean operator ! and will therefore not communicate properly for "comments".

I will leave it to the developer of this project to determine the proper solution that will handle more than just true/false cases.

#2

thekevinday - October 8, 2008 - 03:22

Seeing as the developer hasn't done anything here yet, I went ahead and fixed my patch.

This now allows for the comments to be toggled between the three choices: "lock comments", "unlock comments", "hide comments".
Nothing else was changed from the original patch.

AttachmentSize
fasttoggle-fix_confirmation-2.patch 2.39 KB

#3

kkaefer - November 8, 2008 - 11:39
Status:needs review» fixed

Thanks for the patch. Actually, the module worked correctly (the new label was displayed, which was "publish" when the node got unpublished), but the title was misleading nonetheless. The patch you supplied somewhat fixes the problem, but it still displays the action titles. I changed the patch to use the "status" titles for these confirmation pages now.

#4

System Message - November 22, 2008 - 11:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.