Returns ready HTML code for a Miniserver dropdown list. You can pre-select the current configured Miniserver from a config file.
This function is available starting with LoxBerry V1.2.4. If you use that function, set this minimum version in your plugin.cfg.
The function returns a string with HTML code to show a user dropdown to select a Miniserver. With parameters, you can control the label and the visuals, and you can provide the current configured Miniserver number to be pre-selected.
To give parameters to the function, use named parameters.
All parameter names are case-sensitive and written in capital letters.
By default, LoxBerry uses no label for the dropdown.
To use a preceding label, use the LABEL parameter.
Default is "select_miniserver".
Send the Miniserver number that should be pre-selected (e.g. from a config file).
The function defaults to "1", if the number you've provided does not exist, or you haven't used the parameter.
|DATA_MINI||x||By default, the function uses the jQuery Mobile tag data-mini="true". To have the full-sized button, send DATA_MINI => "0".|
Returns a string that is the HTML code for the Miniserver dropdown. Simply print the result of the function to your webpage, or send it to your HTML::Template.
If the user has no Miniservers defined, the HTML does not contain a select list, but a string that no Miniservers are defined.
use LoxBerry::Web; my $mshtml = mslist_select_html( FORMID => 'msno', SELECTED => 2, DATA_MINI => 0 ); # If a HTML::Template object is used, send the html to the template $maintemplate->param('MSHTML', $mshtml);