What would be great is if there's a way for admins to predefine selectable notes and for flaggers to be able to select one of those notes.

That would enable something like #671808: Flag States wouldn't it?

Thanks.

Comments

gunzip’s picture

Assigned: Unassigned » gunzip

i will look at this (it requires some time)

ManyNancy’s picture

Terrific, thank you so much.

ManyNancy’s picture

This feature would be really awesome for me. Would it be possible to do? Thanks.

loze’s picture

What about the ability to choose a taxonomy for each flag type that is "notes enabled"?
then each notes form could use the terms as the choices along with the textarea. it would have to store the tid.

for my purpose i want to have a select box of options as well as a "more details" text area for each piece of content being flagged.

Ravi.J’s picture

I am working on a patch that provides ability to choose a Vocabulary term per flag and still have the text area.
I am close to completing this, will post patch soon.

Ravi.J’s picture

Status: Active » Needs review
StatusFileSize
new6.44 KB

Attached is patch that allows for predefined reasons via vocabulary terms.
Also provides a view relationship for predefined reasons
This patch is for version 6.x.1.x

Ravi.J’s picture

StatusFileSize
new6.4 KB

Fixed a bug with help text second patch for version 6.x.1.x

Ravi.J’s picture

StatusFileSize
new5.05 KB

Patch for 6_2.x version

hagner’s picture

Works for me. Thanks Ravi!

rickvug’s picture

I've also seen this working in action. It looks quite good. Certainly a +1 from me.

rickvug’s picture

Status: Needs review » Needs work

@Ravi.J - Note that the patch contains a .project file from your IDE. You'll want to remove that from the patches (setting to "needs work). Reading the code it looks clean so hopefully this will move to RTBC next.

Ravi.J’s picture

StatusFileSize
new5.98 KB

Reattaching cleaned 6.x.1.x patch 6.x.2.x seems to be fine

gunzip’s picture

Status: Needs work » Patch (to be ported)

thank you for your work @ravi, i'll integrate this asap.
(i think it needs an update call to upggrade the db schema with the tid)

the latest patch gives this anyway against latest dev:

patching file flag_note.views.inc
Hunk #1 FAILED at 135.

i think because of wrong path.

Ravi.J’s picture

There are couple of patches there, #8 is for 2.x branch and #11 is for 1.x branch. Please advice which one of them is failing and i will prepare another one.

gunzip’s picture

sorry it was my fault, both patches apply correctly.

Ravi.J’s picture

gr8 .. i have also put a patch for another issue #933556: default note text with token support

gunzip’s picture

i've applied the predefined notes patch (with some twists) for 6.2-dev release.
backporting to 6.1 needs some other work, i'll do that asap.

i've seen the other patch, i'll try to integrate that one as well,
thank you again =)

gunzip’s picture

Status: Patch (to be ported) » Closed (fixed)

backported to 6.1-dev

glitz’s picture

This very much sounds like it will help me accomplish what I need to do, as long as I can include a use pre-defined notes (which I understand I can) and incorporate those predefined notes into views.

i like to show on a users profile page, the node where the flag took place, and also display the predefined note they selected in the dropdown.

thanks,
chris

glitz’s picture

i jujst installed the latest version, but i dont see a place to add values for a selection box...

Help?!

gunzip’s picture

you have to create a taxonomy and add some terms for that

glitz’s picture

hi. THANKS!!

yes it did, that and it is now working but, it there a way to not make the Flag note textarea required to fill out? I'd like to give the user an option of using just the selection box, but also add a note if they wish...

gunzip’s picture

actually there's no setting to change that. there are a couple of a workaround

1. use YOURMODULE_form_alter() function
2. hack the flag_note.module code changing line 167 to '#required' => FALSE,

glitz’s picture

I tried the following:

hack the flag_note.module code changing line 167 to '#required' => FALSE,

I cleared cache, and and It still appears to be required. Is there anywhere else I need this in flag_note.module?

thanks

glitz’s picture

possibly line 447 as well?
'#required' => TRUE,

gunzip’s picture

yes, sorry it's this code

  $form['note'] = array(
    '#type' => 'textarea',
    '#title' => variable_get('flag_note_label_'. $flag_name, ''),
    '#cols' => 60,
    '#rows' => 5,
    '#description' => variable_get('flag_note_help_'. $flag_name, ''),
    '#weight' => -1,
    '#required' => TRUE,
  );