Modify

Opened 11 months ago

Closed 10 months ago

Last modified 10 months ago

#11523 closed defect (fixed)

Can not hide radio buttons

Reported by: anonymous Owned by: rjollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: peter@… Trac Release:

Description (last modified by rjollos)

If you have a custom field that is set as a radio

[ticket-custom]
ittype = radio
ittype.label = IT Type
ittype.options = Help Desk|Project
ittype.order = 3
ittype.value = Help Desk

you can not hide it based on the group using

ittype.show_if_group = itmember

It works for text and standard just not for radio.

Attachments (1)

t11523.patch (949 bytes) - added by rjollos 11 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 months ago by weirdo

  • Cc peter@… added; anonymous removed

comment:2 Changed 11 months ago by rjollos

  • Description modified (diff)

Changed 11 months ago by rjollos

comment:3 Changed 11 months ago by rjollos

The problem is with the markup for a radio button:

<tr>
  <th class="col1">
  IT Type:
  </th>
  <td class="col1">
    <label>
      <input type="radio" name="field_ittype" value="" checked="checked">
      Help Desk
    </label>
    <label>
      <input type="radio" name="field_ittype" value="">
      Project
    </label>
  </td>
</tr>
  • The inputs don't have id tags.
  • The content of the th isn't wrapped in a label.

The jQuery selectors are expecting both of those conditions to be in place. For example, here is the markup for a text field:

<tr>
  <th class="col2">
    <label for="field-keywords">Keywords:</label>
  </th>
  <td class="col2">
    <input type="text" id="field-keywords" name="field_keywords">
  </td>
</tr>

I've attached a patch against the 0.11 branch. Would you kindly test it out?: t11523.patch.

Last edited 10 months ago by rjollos (previous) (diff)

comment:4 Changed 11 months ago by rjollos

  • Owner changed from robguttman to rjollos
  • Status changed from new to accepted

comment:5 Changed 10 months ago by rjollos

In 13649:

Added support for hiding radio buttons. Refs #11523.

The radio buttons don't have an id attribute like the select and input elements, so the jQuery selector had to be modified.

comment:6 Changed 10 months ago by rjollos

In 13650:

Bump version to 1.2.4. Refs #11378, #11118, #11523, #10126, #9605, #9986, #9996, #8971.

comment:7 Changed 10 months ago by rjollos

  • Resolution set to fixed
  • Status changed from accepted to closed

Please report back if you are able to test the latest version.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.