|
dolibarr 25.0.0-alpha
|
HTML rendering functions for Dolibarr This file contains all HTML output, formatting and display functions. More...
Go to the source code of this file.
Functions | |
| dol_escape_htmltag ($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0) | |
| dolButtonToOpenExportDialog ($name, $label, $buttonstring, $exportSiteName, $overwriteGitUrl, $website) | |
| Create a dialog with two buttons for export and overwrite of a website. | |
| dolButtonToOpenUrlInDialogPopup ($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $jsonclose='', $accesskey='') | |
| Return HTML code to output a button to open a dialog popup box. | |
| dol_get_fiche_head ($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='') | |
| Show tabs of a record. | |
| dol_get_fiche_end ($notab=0) | |
| Return tab footer of a card. | |
| fieldLabel ($langkey, $fieldkey, $fieldrequired=0) | |
| Show a string with the label tag dedicated to the HTML edit field. | |
| dolOutputDates ($datep, $datef=null, $fullday=0, $addseconds=0, $pictotoadd='', $tzoutput='tzuserrel', $reduceformat=0) | |
| Print decorated date-hour. | |
| getPictoForType ($key, $morecss='') | |
| Return the picto for a data type. | |
| getImgPictoConv ($mode='fa') | |
| Get array to convert the Dolibarr picto keys into Font awesome keys. | |
| img_weather ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='') | |
| Show weather picto. | |
| img_picto_common ($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $notitle=0) | |
| Show picto (generic function) | |
| img_action ($titlealt, $numaction, $picto='', $moreatt='') | |
| Show logo action. | |
| img_printer ($titlealt="default", $other='') | |
| Show printer logo. | |
| img_split ($titlealt='default', $other='class="pictosplit"') | |
| Show split logo. | |
| img_next ($titlealt='default', $moreatt='') | |
| Show next logo. | |
| img_previous ($titlealt='default', $moreatt='') | |
| Show previous logo. | |
| img_down ($titlealt='default', $selected=0, $moreclass='') | |
| Show down arrow logo. | |
| img_up ($titlealt='default', $selected=0, $moreclass='') | |
| Show top arrow logo. | |
| img_left ($titlealt='default', $selected=0, $moreatt='') | |
| Show left arrow logo. | |
| img_right ($titlealt='default', $selected=0, $moreatt='') | |
| Show right arrow logo. | |
| img_allow ($allow, $titlealt='default') | |
| Show tick logo if allowed. | |
| img_credit_card ($brand, $morecss='fa-2x inline-block valignmiddle') | |
| Return image of a credit card according to its brand name. | |
| img_mime ($file, $titlealt='', $morecss='') | |
| Show MIME img of a file. | |
| img_search ($titlealt='default', $other='') | |
| Show search logo. | |
| img_searchclear ($titlealt='default', $other='') | |
| Show search logo. | |
| info_admin ($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='', $cssfordropdown='info_admin') | |
| Show information in HTML for admin users or standard users. | |
| dol_print_error_email ($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='') | |
| Show a public email and error code to contact if technical error. | |
| print_liste_field_titre ($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0) | |
| Show title line of an array. | |
| getTitleFieldOfList ($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0) | |
| Get title line of an array. | |
| load_fiche_titre ($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle') | |
| Load a title with picto. | |
| print_fleche_navigation ($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $selectlimitsuffix='', $beforearrows='', $hidenavigation=0) | |
| Function to show navigation arrows into lists. | |
| showTotalAmount ($amount) | |
| Style total amount of an object. | |
| showDimensionInBestUnit ($dimension, $unit, $type, $outputlangs, $round=-1, $forceunitoutput='no', $use_short_label=0) | |
| Output a dimension with best unit. | |
| dol_htmloutput_events ($disabledoutputofmessages=0) | |
| Print formatted messages to output (Used to show messages on html output). | |
| get_htmloutput_mesg ($mesgstring='', $mesgarray=[], $style='ok', $keepembedded=0) | |
| Get formatted messages to output (Used to show messages on html output). | |
| get_htmloutput_errors ($mesgstring='', $mesgarray=array(), $keepembedded=0) | |
| Get formatted error messages to output (Used to show messages on html output). | |
| dol_htmloutput_mesg ($mesgstring='', $mesgarray=array(), $style='ok', $keepembedded=0) | |
| Print formatted messages to output (Used to show messages on html output). | |
| dol_htmloutput_errors ($mesgstring='', $mesgarray=array(), $keepembedded=0) | |
| Print formatted error messages to output (Used to show messages on html output). | |
| picto_from_langcode ($codelang, $moreatt='', $notitlealt=0) | |
| Return img flag of country for a language code or country code. | |
| printCommonFooter ($zone='private') | |
| Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global->MAIN_GOOGLE_AN_ID js for conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"] js for conf->logbuffer. | |
| dol_set_focus ($selector) | |
| Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag) | |
| showSimpleHTMLTable ($outputlangs, $object) | |
| Returns simple order table template as string. | |
| showDirectDownloadLink ($object) | |
| Return string with full Url. | |
| getAdvancedPreviewUrl ($modulepart, $relativepath, $alldata=0, $param='') | |
| Return URL we can use for advanced preview links. | |
| ajax_autoselect ($htmlname, $addlink='', $textonlink='Link') | |
| Make content of an input box selected when we click into input field. | |
| commonHtmlAttributeBuilder ($attr, array $unescapedAttr=[]) | |
| Builds an array of safe and properly escaped HTML attributes from a key-value pair list. | |
| getListOfHtmlBooleanAttributes () | |
| Returns a list of HTML boolean attributes. | |
| dolCompletUrlForDropdownButton (string $url, array $params, bool $addDolUrlRoot=true) | |
| An function to complete dropdown url in dolGetButtonAction. | |
| dolGetButtonTitleSeparator ($moreClass="") | |
| Add space between dolGetButtonTitle. | |
| getFieldErrorIcon ($fieldValidationErrorMsg) | |
| get field error icon | |
| dolGetButtonTitle ($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array()) | |
| Function dolGetButtonTitle : this kind of buttons are used in title in list. | |
| startSimpleTable ($header, $link="", $arguments="", $emptyColumns=0, $number=-1, $pictofulllist='') | |
| Start a table with headers and a optional clickable number (don't forget to use "finishSimpleTable()" after the last table row) | |
| finishSimpleTable ($addLineBreak=false) | |
| Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line) | |
| addSummaryTableLine ($tableColumnCount, $num, $nbofloop=0, $total=0, $noneWord="None", $extraRightColumn=false) | |
| Add a summary line to the current open table ("None", "XMoreLines" or "Total xxx") | |
| showValueWithClipboardCPButton ($valuetocopy, $showonlyonhover=1, $texttoshow='') | |
| Create a button to copy $valuetocopy in the clipboard (for copy and paste feature). | |
| show_actions_messaging ($conf, $langs, $db, $filterobj, $objcon=null, $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep, a.id', $sortorder='DESC') | |
| Show html area with actions in messaging format. | |
HTML rendering functions for Dolibarr This file contains all HTML output, formatting and display functions.
It was extracted from functions.lib.php to reduce file size and improve maintainability.
Functions included:
Definition in file html.lib.php.
| addSummaryTableLine | ( | $tableColumnCount, | |
| $num, | |||
| $nbofloop = 0, | |||
| $total = 0, | |||
| $noneWord = "None", | |||
| $extraRightColumn = false ) |
Add a summary line to the current open table ("None", "XMoreLines" or "Total xxx")
| integer | $tableColumnCount | The complete count columns of the table |
| integer | $num | The count of the rows of the table, when it is zero (0) the "$noneWord" is shown instead |
| integer | $nbofloop | (optional) The maximum count of rows thaht the table show (when it is zero (0) no summary line will show, expect "$noneWord" when $num === 0) |
| integer | $total | (optional) The total value thaht is shown after when the table has minimum of one entire |
| string | $noneWord | (optional) The word that is shown when the table has no entries ($num === 0) |
| bool | $extraRightColumn | (optional) Add a additional column after the summary word and total number |
Definition at line 5085 of file html.lib.php.
References price().
| ajax_autoselect | ( | $htmlname, | |
| $addlink = '', | |||
| $textonlink = 'Link' ) |
Make content of an input box selected when we click into input field.
| string | $htmlname | Id of html object ('#idvalue' or '.classvalue') |
| string | $addlink | Add a 'link to' after |
| string | $textonlink | Text to show on link or 'image' |
Definition at line 4259 of file html.lib.php.
Referenced by dol_print_cron_urls(), FormFile\list_of_documents(), showDirectPublicLink(), and FormFile\showdocuments().
| commonHtmlAttributeBuilder | ( | $attr, | |
| array | $unescapedAttr = [] ) |
Builds an array of safe and properly escaped HTML attributes from a key-value pair list.
This function ensures that HTML attributes are correctly encoded for safe output. Special handling is applied for attributes such as href, which are processed using dolPrintHTMLForAttributeUrl(). All other attributes are escaped using dolPrintHTMLForAttribute().
Example:
| array<string,string|int|float|null|bool> | $attr Associative array of attribute names and their values. | |
| string[] | $unescapedAttr | Optional list of attribute names that should not be escaped. |
key="escaped_value" string ready for HTML output. Definition at line 4742 of file html.lib.php.
References dol_htmlentities(), and getListOfHtmlBooleanAttributes().
Referenced by FormSetup\generateLineOutput(), and Form\radio().
| dol_escape_htmltag | ( | $stringtoescape, | |
| $keepb = 0, | |||
| $keepn = 0, | |||
| $noescapetags = '', | |||
| $escapeonlyhtmltags = 0, | |||
| $cleanalsojavascript = 0 ) |
| string[] | $reg |
Definition at line 181 of file html.lib.php.
References dol_string_onlythesehtmltags().
Referenced by pdf_standard_myobject\_pagehead(), ActionsStripeconnect\addMoreActionsButtons(), barcode_encode(), modPhpbarcode\buildBarCode(), modTcpdfbarcode\buildBarCode(), Form\constructProductListOption(), DolEditor\Create(), Documentation\docHeader(), dol_get_fiche_head(), dolButtonToOpenExportDialog(), dolGetButtonTitle(), dolGetSignatureQualityBadge(), DolGraph\draw_chart(), Form\editfieldval(), Form\form_conditions_reglement(), form_constantes(), Form\form_date(), Form\form_modes_reglement(), Form\form_remise_dispo(), Form\formconfirm(), mailing_contacts1\formFilter(), mailing_thirdparties\formFilter(), FormProjets\formOpportunityStatus(), FormSetup\generateAttributesStringFromArray(), FormSetup\generateOutput(), FormMail\get_form(), getAiChatAssistantHtml(), ExternalModules\getCategories(), getFieldErrorIcon(), FormCategory\getFilterBox(), FormOther\getHTMLScannerForm(), DolibarrModules\getKanbanView(), Holiday\getKanbanView(), Product\getKanbanView(), Setup\getModulesList(), AccountingAccount\getNomUrl(), ActionComm\getNomUrl(), Adherent\getNomUrl(), Asset\getNomUrl(), BonPrelevement\getNomUrl(), BookkeepingTemplate\getNomUrl(), Commande\getNomUrl(), CommandeFournisseur\getNomUrl(), DiscountAbsolute\getNomUrl(), Don\getNomUrl(), EcmDirectory\getNomUrl(), EcmFiles\getNomUrl(), Expedition\getNomUrl(), FactureFournisseur\getNomUrl(), FactureFournisseurRec\getNomUrl(), FactureRec\getNomUrl(), FichinterRec\getNomUrl(), Localtax\getNomUrl(), PaymentDonation\getNomUrl(), PaymentExpenseReport\getNomUrl(), PaymentLoan\getNomUrl(), PaymentSocialContribution\getNomUrl(), Position\getNomUrl(), Product\getNomUrl(), ProductAttribute\getNomUrl(), ProductFournisseur\getNomUrl(), Project\getNomUrl(), Propal\getNomUrl(), Societe\getNomUrl(), Subscription\getNomUrl(), SupplierProposal\getNomUrl(), WebPortalInvoice\getNomUrl(), WebPortalMember\getNomUrl(), WebPortalOrder\getNomUrl(), WebPortalPartnership\getNomUrl(), WebPortalPropal\getNomUrl(), ExternalModules\getProducts(), getRankOrderResults(), getSocialNetworkSharingLinks(), getStatusPieChart(), ActionComm\getTooltipContentArray(), Cronjob\getTooltipContentArray(), Societe\getTooltipContentArray(), img_next(), img_previous(), img_search(), img_searchclear(), info_admin(), ViewImageController\init(), left_menu(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), FormFile\listOfLinks(), Form\load_tva(), box_boms\loadBox(), box_clients\loadBox(), box_commandes\loadBox(), box_contacts\loadBox(), box_contracts\loadBox(), box_dolibarr_state_board\loadBox(), box_factures\loadBox(), box_factures_fourn\loadBox(), box_factures_fourn_imp\loadBox(), box_factures_imp\loadBox(), box_fediverse\loadBox(), box_ficheinter\loadBox(), box_fournisseurs\loadBox(), box_last_knowledgerecord\loadBox(), box_last_modified_knowledgerecord\loadBox(), box_last_modified_ticket\loadBox(), box_last_ticket\loadBox(), box_members_by_tags\loadBox(), box_members_by_type\loadBox(), box_members_last_modified\loadBox(), box_members_last_subscriptions\loadBox(), box_mos\loadBox(), box_produits\loadBox(), box_propales\loadBox(), box_prospect\loadBox(), box_services_contracts\loadBox(), box_services_expired\loadBox(), box_supplier_orders\loadBox(), main_area(), EmailCollector\overwritePropertiesOfObject(), print_auguria_menu(), print_eldy_menu(), print_fleche_navigation(), print_text_menu_entry(), print_text_menu_entry_auguria(), print_text_menu_entry_empty(), printDropdownBookmarksList(), FormListWebPortal\printSearchInput(), projectLinesPerAction(), projectLinesPerDay(), projectLinesPerWeek(), Form\searchComponent(), FormAccounting\select_accounting_category(), Form\select_all_categories(), FormAccounting\select_auxaccount(), Form\select_dolgroups(), Form\select_dolresources_forevent(), FormIntervention\select_interventions(), FormAdmin\select_language(), FormAdmin\select_menu(), Form\select_produits_fournisseurs_list(), FormEcm\selectAllSections(), Form\selectarray(), FormWebPortal\selectarray(), Form\selectAvailabilityDelay(), Form\selectCategories(), FormCompany\selectCompaniesForNewContact(), Form\selectCurrency(), Form\selectDate(), FormFiscalYear\selectFiscalYear(), Form\selectForFormsList(), FormTicket\selectGroupTickets(), Form\selectMassAction(), FormCompany\selectProspectStatus(), FormProjets\selectTasks(), FormAdmin\selectTypeOfFields(), Utils\sendBackup(), Adherent\sendReminderForExpiredSubscription(), show_actions_done(), show_actions_messaging(), show_contacts(), CommonObject\show_photos(), show_projects(), show_subsidiaries(), FormFile\showdocuments(), CommonObject\showInputField(), ExtraFields\showInputField(), FormWebPortal\showInputFieldForObject(), Form\showLinkToObjectBlock(), ExtraFields\showOutputField(), Form\showPhoneInput(), showSkins(), showSocialNetwork(), showValueWithClipboardCPButton(), Form\textwithtooltip(), Diff\toHTML(), top_menu(), top_menu_user(), treeOutputForAbsoluteDir(), html_cerfafr\write_file(), and modTcpdfbarcode\writeBarCode().
| dol_get_fiche_end | ( | $notab = 0 | ) |
Return tab footer of a card.
| int<-1,1> | $notab -1 or 0=Add tab footer, 1=no tab footer |
Definition at line 738 of file html.lib.php.
Referenced by ActionsAdherentCardDefault\assign_values(), ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), ActionsCardService\assign_values(), ActionsContactCardDefault\assign_values(), displayPositionCard(), journalHead(), and report_header().
| dol_get_fiche_head | ( | $links = array(), | |
| $active = '', | |||
| $title = '', | |||
| $notab = 0, | |||
| $picto = '', | |||
| $pictoisfullpath = 0, | |||
| $morehtmlright = '', | |||
| $morecss = '', | |||
| $limittoshow = 0, | |||
| $moretabssuffix = '', | |||
| $dragdropfile = 0, | |||
| $morecssdiv = '' ) |
Show tabs of a record.
| array<int,array<int<0,5>,string>> | $links Array of tabs (0=>url, 1=>label, 2=>code, 3=>not used, 4=>text after link, 5=>morecssonlink). Currently initialized by calling a function xxx_admin_prepare_head. Note that label into $links[$i][1] must be already HTML escaped. | |
| string | $active | Active tab name (using the old numeric int is deprecated) |
| string | $title | Title |
| int | $notab | -1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no separation under tab (to start a tab just after), -3=-2+'noborderbottom' |
| string | $picto | Add a picto on tab title |
| int | $pictoisfullpath | If 1, image path is a full path. If you set this to 1, you can use url returned by dol_buildpath('/mymodule/img/myimg.png',1) for $picto. |
| string | $morehtmlright | Add more html content on right of tabs title |
| string | $morecss | More CSS on the link |
| int | $limittoshow | Limit number of tabs to show. Use 0 to use automatic default value. |
| string | $moretabssuffix | A suffix to use when you have several dol_get_fiche_head() in same page |
| int | $dragdropfile | 0 (default) or 1. 1 enable a drop zone for file to be upload, 0 disable it |
| string | $morecssdiv | More CSS on the div |
Definition at line 540 of file html.lib.php.
References $conf, dol_escape_htmltag(), dragAndDropFileUpload(), getDolGlobalInt(), getDolGlobalString(), and getNonce().
Referenced by ActionsAdherentCardDefault\assign_values(), ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), ActionsCardService\assign_values(), ActionsContactCardDefault\assign_values(), displayPositionCard(), journalHead(), and report_header().
| dol_htmloutput_errors | ( | $mesgstring = '', | |
| $mesgarray = array(), | |||
| $keepembedded = 0 ) |
Print formatted error messages to output (Used to show messages on html output).
| string | $mesgstring | Error message |
| string[] | $mesgarray | Error messages array |
| int<0,1> | $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify) |
Definition at line 3747 of file html.lib.php.
| dol_htmloutput_events | ( | $disabledoutputofmessages = 0 | ) |
Print formatted messages to output (Used to show messages on html output).
Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function, so there is no need to call it explicitly.
| int | $disabledoutputofmessages | Clear all messages stored into session without displaying them |
Definition at line 3530 of file html.lib.php.
References dol_htmloutput_mesg().
Referenced by Documentation\docFooter(), and llxFooterSurvey().
| dol_htmloutput_mesg | ( | $mesgstring = '', | |
| $mesgarray = array(), | |||
| $style = 'ok', | |||
| $keepembedded = 0 ) |
Print formatted messages to output (Used to show messages on html output).
| string | $mesgstring | Message string or message key |
| string[] | $mesgarray | Array of message strings or message keys |
| string | $style | Which style to use ('ok', 'warning', 'error') |
| int | $keepembedded | Set to 1 if message must be kept embedded into its html place (this disable jnotify) |
Definition at line 3679 of file html.lib.php.
Referenced by ActionsStripeconnect\addMoreActionsButtons(), dol_htmloutput_events(), and ActionsStripeconnect\formObjectOptions().
| dol_print_error_email | ( | $prefixcode, | |
| $errormessage = '', | |||
| $errormessages = array(), | |||
| $morecss = 'error', | |||
| $email = '' ) |
Show a public email and error code to contact if technical error.
| string | $prefixcode | Prefix of public error code |
| string | $errormessage | Complete error message |
| string[] | $errormessages | Array of error messages |
| string | $morecss | More css |
| string |
Definition at line 2745 of file html.lib.php.
References dol_now(), dol_print_date(), and getDolGlobalString().
| dol_set_focus | ( | $selector | ) |
Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)
| string | $selector | Selector ('id' or 'input[name="ref"]') to use to find the HTML input field that must get the autofocus. You must use a CSS selector, so unique id preceding with the '#' char. |
Definition at line 4094 of file html.lib.php.
References dol_escape_js().
| dolButtonToOpenExportDialog | ( | $name, | |
| $label, | |||
| $buttonstring, | |||
| $exportSiteName, | |||
| $overwriteGitUrl, | |||
| $website ) |
Create a dialog with two buttons for export and overwrite of a website.
| string | $name | Unique identifier for the dialog |
| string | $label | Title of the dialog |
| string | $buttonstring | Text for the button that opens the dialog |
| string | $exportSiteName | Name of the "submit" input for site export |
| string | $overwriteGitUrl | URL for the link that triggers the overwrite action in GIT |
| Website | $website | Website object |
Definition at line 341 of file html.lib.php.
References dol_escape_htmltag(), dol_escape_js(), getNonce(), and newToken().
| dolButtonToOpenUrlInDialogPopup | ( | $name, | |
| $label, | |||
| $buttonstring, | |||
| $url, | |||
| $disabled = '', | |||
| $morecss = 'classlink button bordertransp', | |||
| $jsonopen = '', | |||
| $jsonclose = '', | |||
| $accesskey = '' ) |
Return HTML code to output a button to open a dialog popup box.
Such buttons must be included inside a HTML form.
| string | $name | A name for the html component |
| string | $label | Label shown in Popup title top bar |
| string | $buttonstring | button string (HTML text we can click on) |
| string | $url | Relative Url to open. For example '/project/card.php' |
| string | $disabled | Disabled text |
| string | $morecss | More CSS |
| string | $jsonopen | Some JS code to execute on click/open of popup |
| string | $jsonclose | Some JS code to execute on close of popup Value is 'keyforpopupid:Name_of_html_component_to_set_with id,Name_of_html_component_to_set_with_label' |
| string | $accesskey | A key to use shortcut |
Definition at line 435 of file html.lib.php.
References dol_escape_js().
Referenced by Form\selectCategories(), and top_menu_user().
| dolCompletUrlForDropdownButton | ( | string | $url, |
| array | $params, | ||
| bool | $addDolUrlRoot = true ) |
An function to complete dropdown url in dolGetButtonAction.
| string | $url | the Url to complete |
| array<string,mixed> | $params params of dolGetButtonAction function | |
| bool | $addDolUrlRoot | to add root url |
Definition at line 4836 of file html.lib.php.
| dolGetButtonTitle | ( | $label, | |
| $helpText = '', | |||
| $iconClass = 'fa fa-file', | |||
| $url = '', | |||
| $id = '', | |||
| $status = 1, | |||
| $params = array() ) |
Function dolGetButtonTitle : this kind of buttons are used in title in list.
| string | $label | label of button |
| string | $helpText | optional : content for help tooltip |
| string | $iconClass | class for icon element (Example: 'fa fa-file') |
| string | $url | the url for link |
| string | $id | attribute id of button |
| int<-2,2> | $status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled (deprecated, use -2 instead), -2 disable Other reason use param $helpText as tooltip help | |
| array<string,mixed> | $params various parameters for future : recommended rather than adding more function arguments |
Definition at line 4905 of file html.lib.php.
References $id, dol_escape_htmltag(), and getDolGlobalString().
Referenced by FormFile\list_of_documents(), FormFile\listOfLinks(), show_contacts(), show_contacts_projects(), show_projects(), and FormActions\showactions().
| dolGetButtonTitleSeparator | ( | $moreClass = "" | ) |
Add space between dolGetButtonTitle.
| string | $moreClass | more css class label |
Definition at line 4870 of file html.lib.php.
| dolOutputDates | ( | $datep, | |
| $datef = null, | |||
| $fullday = 0, | |||
| $addseconds = 0, | |||
| $pictotoadd = '', | |||
| $tzoutput = 'tzuserrel', | |||
| $reduceformat = 0 ) |
Print decorated date-hour.
| int | $datep | Date |
| int | null | $datef | Second date |
| int | $fullday | Set to 1 for full day (hours are hidden) |
| int | $addseconds | Add also seconds |
| string | $pictotoadd | Picto to add |
| string | bool | $tzoutput | true or 'gmt' => string is for Greenwich location false or 'tzserver' => output string is for local PHP server TZ usage 'tzuser' => output string is for user TZ (current browser TZ with current dst) => In a future, we should have same behaviour than 'tzuserrel' 'tzuserrel' => output string is for user TZ (current browser TZ with dst or not, depending on date position) |
| int | $reduceformat | Use 1 to use a reduce format |
Definition at line 1180 of file html.lib.php.
References dol_getdate(), and dol_print_date().
Referenced by show_actions_done(), and FormActions\showactions().
| fieldLabel | ( | $langkey, | |
| $fieldkey, | |||
| $fieldrequired = 0 ) |
Show a string with the label tag dedicated to the HTML edit field.
| string | $langkey | Translation key |
| string | $fieldkey | Key of the html select field the text refers to |
| int | $fieldrequired | 1=Field is mandatory |
Definition at line 1148 of file html.lib.php.
| finishSimpleTable | ( | $addLineBreak = false | ) |
Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)
| bool | $addLineBreak | (optional) Add a extra line break after the complete table (<br>) |
Definition at line 5064 of file html.lib.php.
| get_htmloutput_errors | ( | $mesgstring = '', | |
| $mesgarray = array(), | |||
| $keepembedded = 0 ) |
Get formatted error messages to output (Used to show messages on html output).
| string | $mesgstring | Error message |
| string[] | $mesgarray | Error messages array |
| int | $keepembedded | Set to 1 in error message must be kept embedded into its html place (this disable jnotify) |
Definition at line 3661 of file html.lib.php.
Referenced by ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), and ActionsCardService\assign_values().
| get_htmloutput_mesg | ( | $mesgstring = '', | |
| $mesgarray = [], | |||
| $style = 'ok', | |||
| $keepembedded = 0 ) |
Get formatted messages to output (Used to show messages on html output).
This include also the translation of the message key.
| string | $mesgstring | Message string or message key |
| string[] | $mesgarray | Array of message strings or message keys |
| string | $style | Style of message output ('ok', 'warning' or 'error') |
| int | $keepembedded | Set to 1 in error message must be kept embedded into its html place (this disable jnotify) |
Definition at line 3570 of file html.lib.php.
References $conf, dol_escape_js(), getDolGlobalString(), getNonce(), and type.
Referenced by ActionsCardCommon\assign_values().
| getAdvancedPreviewUrl | ( | $modulepart, | |
| $relativepath, | |||
| $alldata = 0, | |||
| $param = '' ) |
Return URL we can use for advanced preview links.
| string | $modulepart | propal, facture, facture_fourn, ... |
| string | $relativepath | Relative path of docs. |
| int<0,1> | $alldata Return array with all components (1 is recommended, then use a simple a href link with the class, target and mime attribute added. 'documentpreview' css class is handled by jquery code into main.inc.php) | |
| string | $param | More param on http links |
Definition at line 4215 of file html.lib.php.
Referenced by FormFile\getDocumentsLink(), FormFile\list_of_documents(), CommonObject\show_photos(), Form\showphoto(), FormFile\showPreview(), and showWebsiteTemplates().
| getFieldErrorIcon | ( | $fieldValidationErrorMsg | ) |
get field error icon
| string | $fieldValidationErrorMsg | Message to add in tooltip |
Definition at line 4881 of file html.lib.php.
References dol_escape_htmltag().
| getImgPictoConv | ( | $mode = 'fa' | ) |
Get array to convert the Dolibarr picto keys into Font awesome keys.
| string | $mode | 'fa' to get conversion array for Font-Awesome |
Definition at line 1728 of file html.lib.php.
References $conf.
| getListOfHtmlBooleanAttributes | ( | ) |
Returns a list of HTML boolean attributes.
Boolean attributes are attributes whose presence on an HTML element represents a true value, and absence represents false. They do not require a value like name="value"; simply including the attribute enables its behavior.
Examples of usage: <input type="checkbox" checked> <input type="text" readonly>
Definition at line 4787 of file html.lib.php.
Referenced by commonHtmlAttributeBuilder().
| getPictoForType | ( | $key, | |
| $morecss = '' ) |
Return the picto for a data type.
| string | $key | Key |
| string | $morecss | Add more css to the object |
Definition at line 1247 of file html.lib.php.
Referenced by FormAdmin\selectTypeOfFields(), and CommonObject\showOptionals().
| getTitleFieldOfList | ( | $name, | |
| $thead = 0, | |||
| $file = "", | |||
| $field = "", | |||
| $begin = "", | |||
| $moreparam = "", | |||
| $moreattrib = "", | |||
| $sortfield = "", | |||
| $sortorder = "", | |||
| $prefix = "", | |||
| $disablesortlink = 0, | |||
| $tooltip = '', | |||
| $forcenowrapcolumntitle = 0 ) |
Get title line of an array.
| ?string | $name | Translation key of field to show or complete HTML string to show |
| int<0,2> | $thead 0=To use with standard table format, 1=To use inside |
, 2=To use with
| string | $file | Url used when we click on sort picto |
| string | $field | Field to use for new sorting. Empty if this field is not sortable. Example "t.abc" or "t.abc,t.def" |
| string | $begin | ("" by default) |
| string | $moreparam | Add more parameters on sort url links ("" by default) |
| string | $moreattrib | Add more attributes on th ("" by default). To add more css class, use param $prefix. |
| ?string | $sortfield | Current field used to sort (Ex: 'd.datep,d.id') |
| ?string | $sortorder | Current sort order (Ex: 'asc,desc') |
| string | $prefix | Prefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '. |
| int<0,1> | $disablesortlink 1=Disable sort link | |
| ?string | $tooltip | Text of tooltip with syntax 'Tooltip' or 'Tooltip:[keytoenabledtheonclicktooltip]:[tooltipdirection]' |
| int<0,1> | $forcenowrapcolumntitle No need to use 'wrapcolumntitle' css style |
Definition at line 2808 of file html.lib.php.
References dol_textishtml(), dolBuildUrl(), getDolGlobalString(), img_down(), and img_up().
Referenced by print_liste_field_titre(), show_actions_done(), show_actions_messaging(), show_contacts(), and FormActions\showactions().
| img_action | ( | $titlealt, | |
| $numaction, | |||
| $picto = '', | |||
| $moreatt = '' ) |
Show logo action.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $numaction | Action id or code to show |
| string | $picto | Name of image file to show ('filenew', ...) If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory. Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1) |
| string | $moreatt | More attributes |
Definition at line 2042 of file html.lib.php.
Referenced by Societe\LibProspCommStatut(), Contact\libProspCommStatut(), and FormCompany\selectProspectStatus().
| img_allow | ( | $allow, | |
| $titlealt = 'default' ) |
Show tick logo if allowed.
| string | $allow | Allow |
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
Definition at line 2408 of file html.lib.php.
| img_credit_card | ( | $brand, | |
| $morecss = 'fa-2x inline-block valignmiddle' ) |
Return image of a credit card according to its brand name.
| string | $brand | Brand name of credit card |
| string | $morecss | More CSS |
Definition at line 2430 of file html.lib.php.
| img_down | ( | $titlealt = 'default', | |
| $selected = 0, | |||
| $moreclass = '' ) |
Show down arrow logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| int | $selected | Selected |
| string | $moreclass | Add more CSS classes |
Definition at line 2333 of file html.lib.php.
Referenced by form_constantes(), getTitleFieldOfList(), and FormFile\list_of_documents().
| img_left | ( | $titlealt = 'default', | |
| $selected = 0, | |||
| $moreatt = '' ) |
Show left arrow logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| int | $selected | Selected |
| string | $moreatt | Add more attribute on img tag (For example 'style="float: right"') |
Definition at line 2371 of file html.lib.php.
| img_mime | ( | $file, | |
| $titlealt = '', | |||
| $morecss = '' ) |
Show MIME img of a file.
| string | $file | Filename |
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $morecss | More css |
Definition at line 2463 of file html.lib.php.
References dol_mimetype().
Referenced by FormMail\get_form(), FormFile\getDocumentsLink(), FormWebPortal\getDocumentsLink(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), show_actions_messaging(), FormFile\showdocuments(), FormFile\showPreview(), and ActionsTicket\viewTicketMessages().
| img_next | ( | $titlealt = 'default', | |
| $moreatt = '' ) |
Show next logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $moreatt | Add more attribute on img tag (For example 'style="float: right"') |
Definition at line 2294 of file html.lib.php.
References dol_escape_htmltag().
| img_picto_common | ( | $titlealt, | |
| $picto, | |||
| $moreatt = '', | |||
| $pictoisfullpath = 0, | |||
| $notitle = 0 ) |
Show picto (generic function)
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $picto | Name of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory. |
| string | $moreatt | Add more attribute on img tag |
| int | $pictoisfullpath | If 1, image path is a full path |
| int | $notitle | 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip. |
Definition at line 1997 of file html.lib.php.
References $conf, dol_buildpath(), and getDolGlobalInt().
Referenced by tree_showpad().
| img_previous | ( | $titlealt = 'default', | |
| $moreatt = '' ) |
Show previous logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $moreatt | Add more attribute on img tag (For example 'style="float: right"') |
Definition at line 2313 of file html.lib.php.
References dol_escape_htmltag().
| img_printer | ( | $titlealt = "default", | |
| $other = '' ) |
Show printer logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $other | Add more attributes on img |
Definition at line 2180 of file html.lib.php.
| img_right | ( | $titlealt = 'default', | |
| $selected = 0, | |||
| $moreatt = '' ) |
Show right arrow logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| int | $selected | Selected |
| string | $moreatt | Add more attribute on img tag (For example 'style="float: right"') |
Definition at line 2390 of file html.lib.php.
| img_search | ( | $titlealt = 'default', | |
| $other = '' ) |
Show search logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $other | Add more attributes on img |
Definition at line 2487 of file html.lib.php.
References dol_escape_htmltag().
| img_searchclear | ( | $titlealt = 'default', | |
| $other = '' ) |
Show search logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $other | Add more attributes on img |
Definition at line 2510 of file html.lib.php.
References dol_escape_htmltag().
| img_split | ( | $titlealt = 'default', | |
| $other = 'class="pictosplit"' ) |
Show split logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | $other | Add more attributes on img |
Definition at line 2196 of file html.lib.php.
| img_up | ( | $titlealt = 'default', | |
| $selected = 0, | |||
| $moreclass = '' ) |
Show top arrow logo.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| int | $selected | Selected |
| string | $moreclass | Add more CSS classes |
Definition at line 2352 of file html.lib.php.
Referenced by getTitleFieldOfList(), and FormFile\list_of_documents().
| img_weather | ( | $titlealt, | |
| $picto, | |||
| $moreatt = '', | |||
| $pictoisfullpath = 0, | |||
| $morecss = '' ) |
Show weather picto.
| string | $titlealt | Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. |
| string | int | $picto | Name of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory. Or level of meteo image (0-4). |
| string | $moreatt | Add more attribute on img tag |
| int | $pictoisfullpath | If 1, image path is a full path |
| string | $morecss | More CSS |
Definition at line 1969 of file html.lib.php.
References $conf.
Referenced by showWeather().
| info_admin | ( | $text, | |
| $infoonimgalt = 0, | |||
| $nodiv = 0, | |||
| $admin = '1', | |||
| $morecss = 'hideonsmartphone', | |||
| $textfordropdown = '', | |||
| $picto = '', | |||
| $textonpictotooltip = '', | |||
| $cssfordropdown = 'info_admin' ) |
Show information in HTML for admin users or standard users.
| string | $text | Text info |
| integer | $infoonimgalt | Info is shown only on alt of star picto, otherwise it is shown on output after the star picto |
| int | $nodiv | No div |
| string | int | $admin | '1'=Info for admin users. '0'=Info for standard users (change only the look), 'info', 'error', 'warning', 'xxx'=Other |
| string | $morecss | More CSS ('', 'warning', 'error') |
| string | $textfordropdown | Show a text to click to dropdown the info box. |
| string | $picto | '' or 'warning' |
| string | $textonpictotooltip | Text to show in tooltip on picto |
| string | $cssfordropdown | An additional css to avoid conflict to manage the dropdown if $textfordropdown is set |
Definition at line 2540 of file html.lib.php.
References $conf, dol_escape_htmltag(), and getNonce().
Referenced by ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), FormFile\form_attach_new_file(), FormCompany\form_prospect_level(), FormCompany\formProspectContactLevel(), FormMail\get_form(), modBlockedLog\getDesc(), Form\getSelectConditionsPaiements(), Form\getSelectInvoiceSubtype(), main_area(), FormCompany\select_civility(), FormCompany\select_state(), FormResource\select_state(), FormActions\select_type_actions(), FormSocialContrib\select_type_socialcontrib(), Form\select_types_paiements(), FormResource\select_types_resource(), Form\selectAvailabilityDelay(), Form\selectCurrency(), Form\selectExpenseCategories(), FormTicket\selectGroupTickets(), Form\selectInputReason(), FormProjets\selectOpportunityStatus(), Form\selectShippingMethod(), Form\selectTransportMode(), FormWebsite\selectTypeOfContainer(), FormTicket\selectTypesTickets(), and show_actions_messaging().
| load_fiche_titre | ( | $title, | |
| $morehtmlright = '', | |||
| $picto = 'generic', | |||
| $pictoisfullpath = 0, | |||
| $id = '', | |||
| $morecssontable = '', | |||
| $morehtmlcenter = '', | |||
| $morecssonpicto = 'widthpictotitle' ) |
Load a title with picto.
| string | $title | Title to show (HTML sanitized content). Can be a string with a as a second string shown under the fmain title. |
| string | $morehtmlright | Added message to show on right |
| string | $picto | Icon to use before title (should be a 32x32 transparent png file) |
| int<0,1> | $pictoisfullpath 1=Icon name is a full absolute url of image | |
| string | $id | To force an id on html objects |
| string | $morecssontable | More css on table |
| string | $morehtmlcenter | Added message to show on center |
| string | $morecssonpicto | More css on picto |
Definition at line 2970 of file html.lib.php.
References $id, and dol_strlen().
Referenced by ActionsCardCompany\assign_values(), ActionsCardIndividual\assign_values(), displayPositionCard(), FormFile\form_attach_new_file(), Setup\getCheckIntegrity(), FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), FormFile\listOfLinks(), show_contacts(), show_contacts_projects(), show_projects(), show_subsidiaries(), FormActions\showactions(), FormFile\showdocuments(), and Form\showLinkedObjectBlock().
| picto_from_langcode | ( | $codelang, | |
| $moreatt = '', | |||
| $notitlealt = 0 ) |
Return img flag of country for a language code or country code.
| string | $codelang | Language code ('en_IN', 'fr_CA', ...) or ISO Country code on 2 characters in uppercase ('IN', 'FR') |
| string | $moreatt | Add more attribute on img tag (For example 'style="float: right"' or 'class="saturatemedium"') |
| int<0,1> | $notitlealt No title alt |
Definition at line 3762 of file html.lib.php.
Referenced by ActionsAdherentCardCommon\assign_values(), ActionsCardCommon\assign_values(), ActionsContactCardCommon\assign_values(), FormMail\get_form(), WebPortalMember\getBannerAddressForWebPortal(), KnowledgeRecord\getTooltipContentArray(), User\getTooltipContentArray(), box_last_knowledgerecord\loadBox(), box_last_modified_knowledgerecord\loadBox(), FormAdmin\select_language(), Form\selectPhoneCode(), Form\showrefnav(), top_menu_user(), and Form\widgetForTranslation().
| print_fleche_navigation | ( | $page, | |
| $file, | |||
| $options = '', | |||
| $nextpage = 0, | |||
| $betweenarrows = '', | |||
| $afterarrows = '', | |||
| $limit = -1, | |||
| $totalnboflines = 0, | |||
| $selectlimitsuffix = '', | |||
| $beforearrows = '', | |||
| $hidenavigation = 0 ) |
Function to show navigation arrows into lists.
| int | $page | Number of page |
| string | $file | Page URL (in most cases provided with $_SERVER["PHP_SELF"]) |
| string | $options | Other url parameters to propagate ("" by default, may include sortfield and sortorder) |
| integer | $nextpage | Do we show a next page button |
| string | $betweenarrows | HTML content to show between arrows. MUST contains ' ' tags or ' '. |
| string | $afterarrows | HTML content to show after arrows. Must NOT contains ' ' tags. |
| int | $limit | Max nb of record to show (-1 = no combo with limit, 0 = no limit, > 0 = limit) |
| int | $totalnboflines | Total number of records/lines for all pages (if known) |
| int | string | $selectlimitsuffix | A suffix for the limit ID, or -1 to hide the select of limit |
| string | $beforearrows | HTML content to show before arrows. Must NOT contains ' ' tags. |
| int | $hidenavigation | Force to hide the switch mode view and the navigation tool (hide limit section, html in $betweenarrows and $afterarrows but not $beforearrows) |
Definition at line 3217 of file html.lib.php.
References $conf, ajax_combobox(), dol_escape_htmltag(), and getDolGlobalString().
| print_liste_field_titre | ( | $name, | |
| $file = "", | |||
| $field = "", | |||
| $begin = "", | |||
| $param = "", | |||
| $moreattrib = "", | |||
| $sortfield = "", | |||
| $sortorder = "", | |||
| $prefix = "", | |||
| $tooltip = "", | |||
| $forcenowrapcolumntitle = 0 ) |
Show title line of an array.
| ?string | $name | Label of field |
| string | $file | Url used when we click on sort picto |
| string | $field | Field to use for new sorting |
| string | $begin | ("" by default) |
| string | $param | Add more parameters on sort url links ("" by default) |
| string | $moreattrib | Options of attribute td ("" by default) |
| ?string | $sortfield | Current field used to sort |
| ?string | $sortorder | Current sort order |
| string | $prefix | Prefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '. |
| ?string | $tooltip | Tooltip |
| int | $forcenowrapcolumntitle | No need to use 'wrapcolumntitle' css style |
Definition at line 2785 of file html.lib.php.
References getTitleFieldOfList().
Referenced by FormFile\list_of_autoecmfiles(), FormFile\list_of_documents(), FormFile\listOfLinks(), and print_projecttasks_array().
| printCommonFooter | ( | $zone = 'private' | ) |
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global->MAIN_GOOGLE_AN_ID js for conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"] js for conf->logbuffer.
| string | $zone | 'private' (for private pages) or 'public' (for public pages) |
Definition at line 3818 of file html.lib.php.
Referenced by llxFooterSurvey(), and llxFooterVierge().
| show_actions_messaging | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $filterobj, | |||
| $objcon = null, | |||
| $noprint = 0, | |||
| $actioncode = '', | |||
| $donetodo = 'done', | |||
| $filters = array(), | |||
| $sortfield = 'a.datep, | |||
| a.id' | , | ||
| $sortorder = 'DESC' ) |
Show html area with actions in messaging format.
Note: Global parameter $param must be defined.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Object db |
| ?CommonObject | $filterobj | Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object |
| ?Contact | $objcon | Filter on object contact to filter events on a contact |
| int | $noprint | Return string but does not output it |
| string | $actioncode | Filter on actioncode |
| string | $donetodo | Filter on event 'done' or 'todo' or ''=nofilter (all). |
| array<string,string> | $filters Filter on other fields | |
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
Definition at line 5186 of file html.lib.php.
References $conf, dol_buildpath(), dol_escape_htmltag(), dol_getdate(), dol_mimetype(), dol_now(), dol_print_date(), dol_print_phone(), dol_syslog(), dol_trunc(), dolCloseUnclosedHtmlTags(), dolGetElementUrl(), dolGetFirstLineOfText(), getActionCommEcmList(), getDolGlobalInt(), getDolGlobalString(), getEntity(), getTitleFieldOfList(), img_mime(), info_admin(), isModEnabled(), natural_search(), and newToken().
| showDimensionInBestUnit | ( | $dimension, | |
| $unit, | |||
| $type, | |||
| $outputlangs, | |||
| $round = -1, | |||
| $forceunitoutput = 'no', | |||
| $use_short_label = 0 ) |
Output a dimension with best unit.
| float | $dimension | Dimension |
| int | $unit | Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...) |
| string | $type | 'weight', 'volume', ... |
| Translate | $outputlangs | Translate language object |
| int<-1,max> | $round -1 = non rounding, x = number of decimal | |
| string | $forceunitoutput | 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT) |
| int<0,1> | $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. |
Definition at line 3336 of file html.lib.php.
References measuringUnitString(), and price().
Referenced by pdf_eagle\_tableau_tot(), pdf_espadon\_tableau_tot(), pdf_squille\_tableau_tot(), Form\constructProductListOption(), CommonDocGenerator\get_substitutionarray_shipment(), and Form\select_produits_fournisseurs_list().
| showDirectDownloadLink | ( | $object | ) |
Return string with full Url.
The file qualified is the one defined by relative path in $object->last_main_doc
| CommonObject | $object | Object |
Definition at line 4186 of file html.lib.php.
| showSimpleHTMLTable | ( | $outputlangs, | |
| $object ) |
Returns simple order table template as string.
| Translate | $outputlangs | Output language |
| Object | $object | Object |
Definition at line 4109 of file html.lib.php.
| showTotalAmount | ( | $amount | ) |
Style total amount of an object.
| string | float | $amount | Amount value to format |
Definition at line 3319 of file html.lib.php.
| showValueWithClipboardCPButton | ( | $valuetocopy, | |
| $showonlyonhover = 1, | |||
| $texttoshow = '' ) |
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
Code that handle the click is inside core/js/lib_foot.js.php.
| string | $valuetocopy | The value to print |
| int<0,1> | $showonlyonhover Show the copy-paste button only on hover | |
| string | $texttoshow | Replace the value to show with this text. Use 'none' to show no text (only the copy-paste picto) |
Definition at line 5143 of file html.lib.php.
References dol_escape_htmltag().
| startSimpleTable | ( | $header, | |
| $link = "", | |||
| $arguments = "", | |||
| $emptyColumns = 0, | |||
| $number = -1, | |||
| $pictofulllist = '' ) |
Start a table with headers and a optional clickable number (don't forget to use "finishSimpleTable()" after the last table row)
| string | $header | The first left header of the table (automatic translated) |
| string | $link | (optional) The link to a internal dolibarr page, where to go on clicking on the number or the ... (without the first "/") |
| string | $arguments | (optional) Additional arguments for the link (e.g. "search_status=0") |
| integer | $emptyColumns | (optional) Number of empty columns to add after the first column |
| integer | $number | (optional) The number that is shown right after the first header, when -1 the link is shown as '...' |
| string | $pictofulllist | (optional) The picto to use for the full list link |
Definition at line 5016 of file html.lib.php.