|
From: Jamie C. <jca...@we...> - 2005-05-04 05:37:48
|
On Wed, 2005-05-04 at 13:38, Eldy wrote:
> Is it possible to replace in all webmin code the following strings
> <input type=button
> by
> <input class=button type=button
>
> and also
> <input type=submit
> by
> <input class=button type=submit
>
> Such a change should be safe and can be done by a recursive replace in all webmin .pl files.
> It will allows theme developpers to add a more personalised look in theme (by adding on
> buttons a different css style, for example a 3D style from a picture, using the "button" class).
> This is for the moment not possible because if doing this by using the "input" class,
> all other input fields (like input=text) are also affected.
>
> This is to have themes that looks nicer than it is possible to do now.
I am actually in the process of replacing all the code that simply
prints out HTML for form inputs with calls to a function, which can be
overridden by a theme. So code like :
print "<input type=submit name=ok value='Click Me'>\n";
is being replaced with :
print &ui_submit("Click Me", "ok"),"\n";
Your theme will then be able to define a function call theme_ui_submit
in it's theme.pl file, which will override ui_submit and can return
whatever HTML you like for the button.
Not all modules use these new functions yet, but some (like Logrotate
and IPFilter) do ..
- Jamie
|