Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleCase sensitivity

All parameter names are case-sensitive and written in capital letters.


ParameterOptionalUsage
LABELx

By default, LoxBerry uses the language specific default label "Loglevel" as label for the dropdown.

  • To use a userdefined preceding label, use the LABEL parameter with your (language specific) string.
  • To disable the label tag in the html, use LABEL => "".
FORMIDx

This is the name and id of the form element. This name is used on submitting a form, or reading the value with JavaScript.

Default is "select_loglevel".

DATA_MINIxBy default, the function uses the jQuery Mobile tag data-mini="true". To have the full-sized button, send DATA_MINI => "0".
PLUGINx

The function automatically detects your plugin.

If the detection fails, it will raise a warning to STDERR. In this case, send your lbpplugindir Variable to PLUGIN.

Return value

Returns a string that is the HTML and JavaScript code for the loglevel selection. Simply print the result of the function to your webpage, or send it to your HTML::Template.

...

Code Block
languageperl
use LoxBerry::Web;
# For default settings, no parameters are needed
my $loglevelhtml = LoxBerry::Web::loglevel_select_html();


# Use the form id 'loglevel', and don't use DATA_MINI
my $loglevelhtml = LoxBerry::Web::loglevel_select_html( FORM => 'loglevel', DATA_MINI => 0 );

# If a HTML::Template object is used, send the html to the template
$maintemplate->param('LOGLEVEL', $loglevelhtml);

...