google-code-export / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
2 stars 1 forks source link

Attribute "for" in labels of custom Checkbox type fields #287

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A small issue.

While editing a custom post type with some cctm-created checkbox I noticed that 
by clicking on the label instead of the checkbox itself the latter doesn't get 
un-/checked.

Code inspection reveals that label's for="xxx" atttribute does not correspond 
to the id="cctm_xyz" attribute of the checkbox input element.

It instead works as espected in the "Multi-select" custom field where singular 
checkboxes are created.

Original issue reported on code.google.com by m.sivi...@webartisan.it on 12 Jan 2012 at 3:08

GoogleCodeExporter commented 9 years ago
Thanks!  Details...  this is easy to fix if you want to do it before the next 
patch is released:

Inside the CCTM's tpls/fields/wrappers/_checkbox.tpl, replace the following bit 

<label for="[+id+]"

With this:

<label for="[+id_prefix+][+id+]"

The system relies on placeholders -- you can customize the manager HTML by 
adding your own template (tpl) files to the wp-content/uploads/cctm directory.  
See 
http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomizingM
anagerHTML

Committed revision 488862.

Original comment by ever...@fireproofsocks.com on 12 Jan 2012 at 5:30