FIX 20.0 ajax_constantonoff + FormSetup were ignoring custom css class (cssClass / $morecss) (#36039)
This commit is contained in:
parent
e3fc45b6c8
commit
dc024fef27
2 changed files with 5 additions and 5 deletions
|
|
@ -899,9 +899,9 @@ class FormSetupItem
|
|||
$out .= $this->generateInputFieldColor();
|
||||
} elseif ($this->type == 'yesno') {
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$out .= ajax_constantonoff($this->confKey);
|
||||
$out .= ajax_constantonoff($this->confKey, array(), null, 0, 0, 0, 2, 0, 0, '', '', $this->cssClass);
|
||||
} else {
|
||||
$out .= $this->form->selectyesno($this->confKey, $this->fieldValue, 1);
|
||||
$out .= $this->form->selectyesno($this->confKey, $this->fieldValue, 1, false, 0, 0, $this->cssClass);
|
||||
}
|
||||
} elseif (preg_match('/emailtemplate:/', $this->type)) {
|
||||
$out .= $this->generateInputFieldEmailTemplate();
|
||||
|
|
@ -1212,7 +1212,7 @@ class FormSetupItem
|
|||
$out .= $this->generateOutputFieldColor();
|
||||
} elseif ($this->type == 'yesno') {
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$out .= ajax_constantonoff($this->confKey, array(), $this->entity); // TODO possibility to add $input parameter
|
||||
$out .= ajax_constantonoff($this->confKey, array(), $this->entity, 0, 0, 0, 2, 0, 0, '', '', $this->cssClass); // TODO possibility to add $input parameter
|
||||
} else {
|
||||
if ($this->fieldValue == 1) {
|
||||
$out .= $langs->trans('yes');
|
||||
|
|
|
|||
|
|
@ -697,8 +697,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
|
|||
</script>'."\n";
|
||||
|
||||
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
|
||||
$out .= '<span id="set_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||
$out .= '<span id="del_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||
$out .= '<span id="set_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').' '.$morecss.'">'.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||
$out .= '<span id="del_'.$code.'" class="valignmiddle inline-block linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').' '.$morecss.'">'.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||
$out .= "\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue