
kmitchell
New User
Aug 11, 2011, 11:16 AM
Post #1 of 2
(1312 views)
|
|
Subrouting option does not disable text box.
|
Can't Post
|
|
Hello, I'm trying to customize a module in Webmin. There is a sub that doesn't appear to work as the notes say. I want to disable certain text boxes. I set the value to "1" as the notes state but the text box is still editable. What am I missing? Here is the code block: =head2 ui_up_textbox(name, value, size, [disabled?], [maxlength], [tags]) Returns HTML for a text input box. The parameters are : =item name - Name for this input. =item value - Initial contents for the text box. =item size - Desired width in characters. =item disabled - Set to 1 if this text box should be disabled by default. =item maxlength - Maximum length of the string the user is allowed to input. =item tags - Additional HTML attributes for the <input> tag. =cut sub ui_up_textbox { my ($name, $value, $size, $dis, $max, $tags) = @_; $size = &ui_max_text_width($size); return "<input class='ui_up_textbox' name=\""."e_escape($name)."\" ". "value=\""."e_escape($value)."\" ". "size=$size ". ($dis ? "disabled=true" : "1"). ($max ? " maxlength=$max" : ""). " ".$tags. ">"; } This option is the one in question: ($dis ? "disabled=true" : ""). I changed it to: ($dis ? "disabled=true" : "1").
|