dolibarr 21.0.0-beta
|
Class to generate html code for admin pages. More...
Public Member Functions | |
__construct ($db) | |
Constructor. | |
select_language ($selected='', $htmlname='lang_id', $showauto=0, $filter=array(), $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0, $multiselect=0, $onlykeys=array(), $mainlangonly=0) | |
Return html select list with available languages (key='en_US', value='United States' for example) | |
select_menu ($selected, $htmlname, $dirmenuarray, $moreattrib='') | |
Return list of available menus (eldy_backoffice, ...) | |
select_menu_families ($selected, $htmlname, $dirmenuarray) | |
Return combo list of available menu families. | |
select_timezone ($selected, $htmlname) | |
Return a HTML select list of timezones. | |
select_paper_format ($selected='', $htmlname='paperformat_id', $filter='', $showempty=0, $forcecombo=0) | |
Return html select list with available languages (key='en_US', value='United States' for example) | |
selectTypeOfFields ($htmlname, $type, $typewecanchangeinto=array()) | |
Function to show the combo select to chose a type of field (varchar, int, email, ...) | |
Class to generate html code for admin pages.
Definition at line 32 of file html.formadmin.class.php.
FormAdmin::__construct | ( | $db | ) |
Constructor.
Definition at line 50 of file html.formadmin.class.php.
FormAdmin::select_language | ( | $selected = '', | |
$htmlname = 'lang_id', | |||
$showauto = 0, | |||
$filter = array(), | |||
$showempty = '', | |||
$showwarning = 0, | |||
$disabled = 0, | |||
$morecss = '', | |||
$showcode = 0, | |||
$forcecombo = 0, | |||
$multiselect = 0, | |||
$onlykeys = array(), | |||
$mainlangonly = 0 ) |
Return html select list with available languages (key='en_US', value='United States' for example)
string | string[] | $selected | Language pre-selected. Can be an array if $multiselect is 1. |
string | $htmlname | Name of HTML select |
int<0,1> | $showauto Show 'auto' choice | |
string[] | $filter | Array of keys to exclude in list (opposite of $onlykeys) |
int<1,1>|string | $showempty '1'=Add empty value or 'string to show' | |
int<0,1> | $showwarning Show a warning if language is not complete | |
int<0,1> | $disabled Disable edit of select | |
string | $morecss | Add more css styles |
int<0,2> | $showcode 1=Add language code into label at beginning, 2=Add language code into label at end | |
int<0,1> | $forcecombo Force to use combo box (so no ajax beautify effect) | |
int<0,1> | $multiselect Make the combo a multiselect | |
string[] | $onlykeys | Array of language keys to restrict list with the following keys (opposite of $filter). Example array('fr', 'es', ...) |
int<0,1> | $mainlangonly 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...) |
Definition at line 74 of file html.formadmin.class.php.
References ajax_combobox(), dol_escape_htmltag(), getDolGlobalString(), getLanguageCodeFromCountryCode(), and picto_from_langcode().
FormAdmin::select_menu | ( | $selected, | |
$htmlname, | |||
$dirmenuarray, | |||
$moreattrib = '' ) |
Return list of available menus (eldy_backoffice, ...)
string | $selected | Preselected menu value |
string | $htmlname | Name of html select |
string[] | $dirmenuarray | Array of directories to scan |
string | $moreattrib | More attributes on html select tag |
Definition at line 191 of file html.formadmin.class.php.
References $conf, ajax_combobox(), dol_escape_htmltag(), and getDolGlobalInt().
FormAdmin::select_menu_families | ( | $selected, | |
$htmlname, | |||
$dirmenuarray ) |
Return combo list of available menu families.
string | $selected | Menu pre-selected |
string | $htmlname | Name of html select |
string[] | $dirmenuarray | Directories to scan |
Definition at line 311 of file html.formadmin.class.php.
References $conf, ajax_combobox(), and getDolGlobalInt().
FormAdmin::select_paper_format | ( | $selected = '', | |
$htmlname = 'paperformat_id', | |||
$filter = '', | |||
$showempty = 0, | |||
$forcecombo = 0 ) |
Return html select list with available languages (key='en_US', value='United States' for example)
string | $selected | Paper format pre-selected |
string | $htmlname | Name of HTML select field |
string | $filter | Value to filter on code |
int | $showempty | Add empty value |
int | $forcecombo | Force to load all values and output a standard combobox (with no beautification) |
Definition at line 444 of file html.formadmin.class.php.
References ajax_combobox(), and dol_print_error().
FormAdmin::select_timezone | ( | $selected, | |
$htmlname ) |
Return a HTML select list of timezones.
string | $selected | Menu pre-selectionnee |
string | $htmlname | Nom de la zone select |
Definition at line 388 of file html.formadmin.class.php.
FormAdmin::selectTypeOfFields | ( | $htmlname, | |
$type, | |||
$typewecanchangeinto = array() ) |
Function to show the combo select to chose a type of field (varchar, int, email, ...)
string | $htmlname | Name of HTML select component |
string | $type | Type preselected |
array<string,string[]> | $typewecanchangeinto Array of possible switch combination from 1 type to another one. This will grey not possible combinations. |
Definition at line 512 of file html.formadmin.class.php.
References ajax_combobox(), dol_escape_htmltag(), and getPictoForType().