dolibarr 20.0.2
|
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 31 of file html.formadmin.class.php.
FormAdmin::__construct | ( | $db | ) |
Constructor.
Definition at line 49 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 | array | $selected | Language pre-selected. Can be an array if $multiselect is 1. |
string | $htmlname | Name of HTML select |
int | $showauto | Show 'auto' choice |
array | $filter | Array of keys to exclude in list (opposite of $onlykeys) |
int | string | $showempty | '1'=Add empty value or 'string to show' |
int | $showwarning | Show a warning if language is not complete |
int | $disabled | Disable edit of select |
string | $morecss | Add more css styles |
int | $showcode | 1=Add language code into label at beginning, 2=Add language code into label at end |
int | $forcecombo | Force to use combo box (so no ajax beautify effect) |
int | $multiselect | Make the combo a multiselect |
array | $onlykeys | Array of language keys to restrict list with the following keys (opposite of $filter). Example array('fr', 'es', ...) |
int | $mainlangonly | 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...) |
Definition at line 73 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 |
array | $dirmenuarray | Array of directories to scan |
string | $moreattrib | More attributes on html select tag |
Definition at line 190 of file html.formadmin.class.php.
References 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 307 of file html.formadmin.class.php.
References 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 440 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 384 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 | $typewecanchangeinto | Array of possible switch combination from 1 type to another one. This will grey not possible combinations. |
Definition at line 508 of file html.formadmin.class.php.
References ajax_combobox(), dol_escape_htmltag(), and getPictoForType().