Commit 5d0a7689 authored by marknl's avatar marknl
Browse files

http://bugtracker.ispconfig.org/index.php?do=details&task_id=1348&project=3

I've changed the id HTML attributes of the check boxes. You can still group post requests on name attributes while using the id to keep the items unique in the DOM tree. i saw some commented code already being there but wasn't functioning, so i rewrote the original lines.
This only goes for type: CHECKBOXARRAY and RADIO
parent abdfe2cf
......@@ -430,6 +430,7 @@ class tform {
// HTML schreiben
$out = '';
$elementNo = 0;
foreach($field['value'] as $k => $v) {
$checked = '';
......@@ -437,7 +438,8 @@ class tform {
if(trim($tvl) == trim($k)) $checked = ' CHECKED';
}
// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
$out .= "<input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v <br/>\r\n";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label><br/>\r\n";
$elementNo++;
}
}
$new_record[$key] = $out;
......@@ -448,10 +450,12 @@ class tform {
// HTML schreiben
$out = '';
$elementNo = 0;
foreach($field['value'] as $k => $v) {
$checked = ($k == $val)?' CHECKED':'';
//$out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"radio\" $checked/> $v</label>\r\n";
$out .= "<input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"radio\" $checked/> $v\r\n";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"radio\" $checked/> $v </label>\r\n";
$elementNo++;
}
}
$new_record[$key] = $out;
......@@ -539,6 +543,7 @@ class tform {
// HTML schreiben
$out = '';
$elementNo = 0;
foreach($field['value'] as $k => $v) {
$checked = '';
......@@ -546,7 +551,8 @@ class tform {
if(trim($tvl) == trim($k)) $checked = ' CHECKED';
}
// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
$out .= "<input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v &nbsp;\r\n";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label> &nbsp;\r\n";
$elementNo++;
}
}
$new_record[$key] = $out;
......@@ -557,10 +563,12 @@ class tform {
// HTML schreiben
$out = '';
$elementNo = 0;
foreach($field['value'] as $k => $v) {
$checked = ($k == $field["default"])?' CHECKED':'';
//$out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"radio\" $checked/> $v</label>\r\n";
$out .= "<input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"radio\" $checked/> $v\r\n";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"radio\" $checked/> $v</label>\r\n";
$elementNo++;
}
}
$new_record[$key] = $out;
......
......@@ -13,7 +13,7 @@
<p class="label">{tmpl_var name='autoresponder_txt'}</p>
<div class="multiField">
<div class="ctrlHolder" style="margin-bottom: 5px;">
<input type="checkbox" value="y" id="autoresponder" name="autoresponder" onclick="AR_ResetDates();" {tmpl_var name='ar_active'} />&nbsp;{tmpl_var name='autoresponder_active'}<br />
<label for="autoresponder"><input type="checkbox" value="y" id="autoresponder" name="autoresponder" onclick="AR_ResetDates();" {tmpl_var name='ar_active'} />&nbsp;{tmpl_var name='autoresponder_active'}</label><br />
</div>
<p style="margin-bottom: 3px;">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment