Problem/Motivation

In #2834325: pointless use of user.private_tempstore when adding a flag, we removed a pointless use of tempstore when adding a flag. We also changed the flag add page's UI to add a description. This introduced a duplicate "This cannot be changed after the flag is created".

See this comment: https://www.drupal.org/node/2834325#comment-11820269

Proposed resolution

  1. Change the text at the top of the form to: "Select the type of flag to create."
  2. Change the form element description: "The type of entities on which this flag will be used. This cannot be changed once the flag is created."

Remaining tasks

Create patch.

User interface changes

The text on the flag add page would change.

API changes

None.

Data model changes

None.

Comments

socketwench created an issue. See original summary.

joachim’s picture

I would suggest keeping the warning about changing on the actual form element, and leave the overall description as just:

> Select the type of flag to create.

socketwench’s picture

Issue summary: View changes
joachim’s picture

BTW, it was in #2815095: Add description to Scope field to explain it will be / why it is disabled, not the issue about tempstore.

EDIT: Not even that; that was about the scope field.

Git blame shows this line was added in

commit 063d4c3e0b35291426d755a11063a16fcb7b319d
Author: berdir <berdir@214652.no-reply.drupal.org>
Date:   Thu Jan 29 15:36:14 2015 +0000

    Issue #2410005 by Berdir: Fixed UX regression on the 'add flag' form first step.
shubhang’s picture

I have changed the following:
1. Text at top of the form to "Select the type of flag to create."
2. form element description to "The type of entities on which this flag will be used. This cannot be changed once the flag is created."

I am a beginer, so if i do any mistakes please let me know.

joachim’s picture

Status: Active » Needs work

Thanks for the patch! It's always nice to see newcomers have go at making a patch :)

Looks good apart from one thing:

+++ b/includes/flag.admin.inc
@@ -267,7 +267,7 @@ function flag_add_form($form, &$form_state) {
+    '#description' => t('The type of entities on which this flag will be used. This cannot be changed once the flag is created.'),

Drupal core avoids the term 'entities' in the UI. Leave this as is please.

Also, remember to set an issue to 'needs review' when you upload a patch ;)

shubhang’s picture

Should i change the form descrition to "Type of item to reference. This cannot be changes once the flag is created." ?

shubhang’s picture

I have changed the following:
1. Text at top of the form to "Select the type of flag to create."

While the description remains the same as it was earlier.

shubhang’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: duplicate_cannot_be_changed_message-2834635-8.patch, failed testing.

gfcamilo’s picture

Assigned: Unassigned » gfcamilo
gfcamilo’s picture

StatusFileSize
new851 bytes

I have changed the following:
1. Text at top of the form to "Select the type of flag to create."

gfcamilo’s picture

Status: Needs work » Needs review
gfcamilo’s picture

Assigned: gfcamilo » Unassigned
socketwench’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

  • joachim committed d2d5aeb on 8.x-4.x authored by shubhang
    Issue #2834635 by shubhang, gfcamilo: Fixed duplicate "cannot be changed...
joachim’s picture

Status: Reviewed & tested by the community » Fixed

Committed.
Thanks everyone!

Status: Fixed » Closed (fixed)

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