hi and thanks for this module!

how can i setup your module to use a select instead of button?

something like this:

    <select name="permissions">
      <option>public</option>
      <option>hidden</option>
      <option>buddies</option>
...
...
    </select>

Comments

markus_petrux’s picture

The privacy status icons are implemented client-side. It is the whole code in js/privacy_status_dialog.js. If you want a select element, you need to replace the whole thing.

The icon is added dynamically with this code:

$('.cck-private-field-wrapper', $headerCell).append($('<div class="cck-private-field-status-icon"/>'));

You have to replace this (and all the code that is related to this icon) with a select element, and bind an onchange event that updates the privacy status for each field like this:

$('input[name="cck_private_fields['+ fieldName +']"]', context).val(privacyStatus);

These are hidden form elements that hold the privacy status of all fields, and they are sent and updated when the form is submitted.

markus_petrux’s picture

Status: Active » Closed (works as designed)
erik.ahlswede’s picture

Is there a way to redefine this without hacking into the existing JS?