When the user clicks on the icon for his/her current field level privacy setting on node edit form, the privacy options dialog pops up with the first option selected as the default, always, even if user has selected another option. It would be more intuitive if it defaulted to the option that was currently selected by user, so user could feel as though he or she was changing it. It looks kind of like a bug right now, but I'll mark this as a feature request, since it still works without this ui fix even though it throws off the user's expectations a bit.

CommentFileSizeAuthor
#3 cck_privated_fields_load_privacy.patch634 bytestugis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

j0e’s picture

ps. thanks Marc for the module, of course :)
Joseph

tugis’s picture

Category: feature » bug

First of all, congrats for this great module!

I found the same issue. I took a look at the code of the module and I suppose that the behaviour explained above is the expected one, althought is not working and the value in the dialog is always the 1st one:

// Get the current privacy status for this field from the corresponding
// hidden element in the form.
var privacyStatus = $('input[name="cck_private_fields['+ fieldName +']"]', context).val();

// Set the privacy status in the dialog form element.
$('input[name="cck-private-fields-dialog-status-options"][value='+ privacyStatus +']', $dialogContainer).attr('checked', 'checked');

I found this in "privacy_status_dialog.js".
Subscribing

tugis’s picture

Here is a patch that solves the problem. What I do is "uncheck" all radio buttons before checking the correct one. The existing code checks the stored privacy but, because the first one is always checked, it won't work.

tugis’s picture

Status: Active » Needs review
j0e’s picture

Hi Luís,

thanks, great patch...works well!