How to assign id and class to checkbox?
Posted: Sun Apr 24, 2011 2:05 am
The checkbox is not assigned the class and id in the comments module. I want to fix it.
so I find the CreateInputCheckbox function in
\modules\Comments\action.default.php
and it's come from
\lib\classes\class.module.inc.php
the cms_module_CreateInputCheckbox() is come from
\lib\classes\module_support\modform.inc.php
you could see the class is assigned, but it's missing when output. And whenever how I change this function, it still output the same content.
And I check the BO, all of the checkboxes are not assigned class either.
Is there anyone know about these problem?
thank you.
so I find the CreateInputCheckbox function in
\modules\Comments\action.default.php
Code: Select all
$this->smarty->assign_by_ref('inputnotify', $this->CreateInputCheckbox($id, 'authornotify', 1, $authornotify));\lib\classes\class.module.inc.php
Code: Select all
function CreateInputCheckbox($id, $name, $value='', $selectedvalue='', $addttext='')
{
$this->LoadFormMethods();
return cms_module_CreateInputCheckbox($this, $id, $name, $value, $selectedvalue, $addttext);
}\lib\classes\module_support\modform.inc.php
Code: Select all
function cms_module_CreateInputCheckbox(&$modinstance, $id, $name, $value='', $selectedvalue='', $addttext='')
{
$id = cms_htmlentities($id);
$name = cms_htmlentities($name);
$value = cms_htmlentities($value);
$selectedvalue = cms_htmlentities($selectedvalue);
$text = '<input type="checkbox" class="cms_checkbox" name="'.$id.$name.'" value="'.$value.'"';
if ($selectedvalue == $value)
{
$text .= ' ' . 'checked="checked"';
}
if ($addttext != '')
{
$text .= ' '.$addttext;
}
$text .= " />\n";
return $text;
}And I check the BO, all of the checkboxes are not assigned class either.
Is there anyone know about these problem?
thank you.