dolibarr 25.0.0-alpha
html.lib.php File Reference

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.
 

Detailed Description

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:

  • Icon and image rendering (img_*, picto_*)
  • HTML output functions (dolPrint*, dol_print_*)
  • Form and list rendering (fiche, barre_liste, etc.)
  • Button and badge rendering
  • Formatted output (price, vatrate, dates, etc.)
  • Error and message display

Definition in file html.lib.php.

Function Documentation

◆ addSummaryTableLine()

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")

Parameters
integer$tableColumnCountThe complete count columns of the table
integer$numThe 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
Returns
void

Definition at line 5085 of file html.lib.php.

References price().

◆ ajax_autoselect()

ajax_autoselect ( $htmlname,
$addlink = '',
$textonlink = 'Link' )

Make content of an input box selected when we click into input field.

Parameters
string$htmlnameId of html object ('#idvalue' or '.classvalue')
string$addlinkAdd a 'link to' after
string$textonlinkText to show on link or 'image'
Returns
string
See also
showValueWithClipboardCPButton()

Definition at line 4259 of file html.lib.php.

Referenced by dol_print_cron_urls(), FormFile\list_of_documents(), showDirectPublicLink(), and FormFile\showdocuments().

◆ commonHtmlAttributeBuilder()

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:

$attr = [
'href' => 'https://example.com?a=1&b=2',
'class' => 'btn btn-primary',
'title' => 'View details'
];
$result = commonHtmlAttributeBuilder($attr);
// Output:
// [
// 'href' => 'href="https://example.com?a=1&b=2"',
// 'class' => 'class="btn btn-primary"',
// 'title' => 'title="View details"'
// ]
commonHtmlAttributeBuilder($attr, array $unescapedAttr=[])
Builds an array of safe and properly escaped HTML attributes from a key-value pair list.
Parameters
array<string,string|int|float|null|bool>$attr Associative array of attribute names and their values.
string[]$unescapedAttrOptional list of attribute names that should not be escaped.
Returns
array<string, string> An array where each key corresponds to the attribute name and each value is a full 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()

dol_escape_htmltag ( $stringtoescape,
$keepb = 0,
$keepn = 0,
$noescapetags = '',
$escapeonlyhtmltags = 0,
$cleanalsojavascript = 0 )
Parameters
string[]$reg
Returns
string

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()

dol_get_fiche_end ( $notab = 0)

Return tab footer of a card.

Parameters
int<-1,1>$notab -1 or 0=Add tab footer, 1=no tab footer
Returns
string

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()

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.

Parameters
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$activeActive tab name (using the old numeric int is deprecated)
string$titleTitle
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$pictoAdd a picto on tab title
int$pictoisfullpathIf 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$morehtmlrightAdd more html content on right of tabs title
string$morecssMore CSS on the link
int$limittoshowLimit number of tabs to show. Use 0 to use automatic default value.
string$moretabssuffixA suffix to use when you have several dol_get_fiche_head() in same page
int$dragdropfile0 (default) or 1. 1 enable a drop zone for file to be upload, 0 disable it
string$morecssdivMore CSS on the div
Returns
string

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()

dol_htmloutput_errors ( $mesgstring = '',
$mesgarray = array(),
$keepembedded = 0 )

Print formatted error messages to output (Used to show messages on html output).

Parameters
string$mesgstringError message
string[]$mesgarrayError messages array
int<0,1>$keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
Returns
void
See also
dol_print_error()
dol_htmloutput_mesg()

Definition at line 3747 of file html.lib.php.

◆ dol_htmloutput_events()

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.

Parameters
int$disabledoutputofmessagesClear all messages stored into session without displaying them
Returns
void
See also
dol_htmloutput_mesg()

Definition at line 3530 of file html.lib.php.

References dol_htmloutput_mesg().

Referenced by Documentation\docFooter(), and llxFooterSurvey().

◆ dol_htmloutput_mesg()

dol_htmloutput_mesg ( $mesgstring = '',
$mesgarray = array(),
$style = 'ok',
$keepembedded = 0 )

Print formatted messages to output (Used to show messages on html output).

Parameters
string$mesgstringMessage string or message key
string[]$mesgarrayArray of message strings or message keys
string$styleWhich style to use ('ok', 'warning', 'error')
int$keepembeddedSet to 1 if message must be kept embedded into its html place (this disable jnotify)
Returns
void
See also
dol_print_error()
dol_htmloutput_errors()
setEventMessages()

Definition at line 3679 of file html.lib.php.

Referenced by ActionsStripeconnect\addMoreActionsButtons(), dol_htmloutput_events(), and ActionsStripeconnect\formObjectOptions().

◆ dol_print_error_email()

dol_print_error_email ( $prefixcode,
$errormessage = '',
$errormessages = array(),
$morecss = 'error',
$email = '' )

Show a public email and error code to contact if technical error.

Parameters
string$prefixcodePrefix of public error code
string$errormessageComplete error message
string[]$errormessagesArray of error messages
string$morecssMore css
string$emailEmail
Returns
void

Definition at line 2745 of file html.lib.php.

References dol_now(), dol_print_date(), and getDolGlobalString().

◆ dol_set_focus()

dol_set_focus ( $selector)

Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)

Parameters
string$selectorSelector ('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.
Returns
void

Definition at line 4094 of file html.lib.php.

References dol_escape_js().

◆ dolButtonToOpenExportDialog()

dolButtonToOpenExportDialog ( $name,
$label,
$buttonstring,
$exportSiteName,
$overwriteGitUrl,
$website )

Create a dialog with two buttons for export and overwrite of a website.

Parameters
string$nameUnique identifier for the dialog
string$labelTitle of the dialog
string$buttonstringText for the button that opens the dialog
string$exportSiteNameName of the "submit" input for site export
string$overwriteGitUrlURL for the link that triggers the overwrite action in GIT
Website$websiteWebsite object
Returns
string HTML and JavaScript code for the button and the dialog

Definition at line 341 of file html.lib.php.

References dol_escape_htmltag(), dol_escape_js(), getNonce(), and newToken().

◆ dolButtonToOpenUrlInDialogPopup()

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.

Parameters
string$nameA name for the html component
string$labelLabel shown in Popup title top bar
string$buttonstringbutton string (HTML text we can click on)
string$urlRelative Url to open. For example '/project/card.php'
string$disabledDisabled text
string$morecssMore CSS
string$jsonopenSome JS code to execute on click/open of popup
string$jsoncloseSome 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$accesskeyA key to use shortcut
Returns
string HTML component with button

Definition at line 435 of file html.lib.php.

References dol_escape_js().

Referenced by Form\selectCategories(), and top_menu_user().

◆ dolCompletUrlForDropdownButton()

dolCompletUrlForDropdownButton ( string $url,
array $params,
bool $addDolUrlRoot = true )

An function to complete dropdown url in dolGetButtonAction.

Parameters
string$urlthe Url to complete
array<string,mixed>$params params of dolGetButtonAction function
bool$addDolUrlRootto add root url
Returns
string

Definition at line 4836 of file html.lib.php.

◆ dolGetButtonTitle()

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.

Parameters
string$labellabel of button
string$helpTextoptional : content for help tooltip
string$iconClassclass for icon element (Example: 'fa fa-file')
string$urlthe url for link
string$idattribute 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
Returns
string html button

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()

dolGetButtonTitleSeparator ( $moreClass = "")

Add space between dolGetButtonTitle.

Parameters
string$moreClassmore css class label
Returns
string html of title separator

Definition at line 4870 of file html.lib.php.

◆ dolOutputDates()

dolOutputDates ( $datep,
$datef = null,
$fullday = 0,
$addseconds = 0,
$pictotoadd = '',
$tzoutput = 'tzuserrel',
$reduceformat = 0 )

Print decorated date-hour.

Parameters
int$datepDate
int | null$datefSecond date
int$fulldaySet to 1 for full day (hours are hidden)
int$addsecondsAdd also seconds
string$pictotoaddPicto to add
string | bool$tzoutputtrue 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$reduceformatUse 1 to use a reduce format
Returns
string Decorated date

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()

fieldLabel ( $langkey,
$fieldkey,
$fieldrequired = 0 )

Show a string with the label tag dedicated to the HTML edit field.

Parameters
string$langkeyTranslation key
string$fieldkeyKey of the html select field the text refers to
int$fieldrequired1=Field is mandatory
Returns
string
Deprecated
Form\editfieldkey

Definition at line 1148 of file html.lib.php.

◆ finishSimpleTable()

finishSimpleTable ( $addLineBreak = false)

Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)

Parameters
bool$addLineBreak(optional) Add a extra line break after the complete table (<br>)
Returns
void
See also
startSimpleTable()

Definition at line 5064 of file html.lib.php.

◆ get_htmloutput_errors()

get_htmloutput_errors ( $mesgstring = '',
$mesgarray = array(),
$keepembedded = 0 )

Get formatted error messages to output (Used to show messages on html output).

Parameters
string$mesgstringError message
string[]$mesgarrayError messages array
int$keepembeddedSet to 1 in error message must be kept embedded into its html place (this disable jnotify)
Returns
string Return html output
See also
dol_print_error()
dol_htmloutput_mesg()

Definition at line 3661 of file html.lib.php.

Referenced by ActionsCardCommon\assign_values(), ActionsCardProduct\assign_values(), and ActionsCardService\assign_values().

◆ get_htmloutput_mesg()

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.

Parameters
string$mesgstringMessage string or message key
string[]$mesgarrayArray of message strings or message keys
string$styleStyle of message output ('ok', 'warning' or 'error')
int$keepembeddedSet to 1 in error message must be kept embedded into its html place (this disable jnotify)
Returns
string Return html output
See also
dol_print_error()
dol_htmloutput_errors()
setEventMessages()

Definition at line 3570 of file html.lib.php.

References $conf, dol_escape_js(), getDolGlobalString(), getNonce(), and type.

Referenced by ActionsCardCommon\assign_values().

◆ getAdvancedPreviewUrl()

getAdvancedPreviewUrl ( $modulepart,
$relativepath,
$alldata = 0,
$param = '' )

Return URL we can use for advanced preview links.

Parameters
string$modulepartpropal, facture, facture_fourn, ...
string$relativepathRelative 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$paramMore param on http links
Returns
string|array{}|array{target:string,css:string,url:string,mime:string} Output string with href link or array with all components of link

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()

getFieldErrorIcon ( $fieldValidationErrorMsg)

get field error icon

Parameters
string$fieldValidationErrorMsgMessage to add in tooltip
Returns
string html output

Definition at line 4881 of file html.lib.php.

References dol_escape_htmltag().

◆ getImgPictoConv()

getImgPictoConv ( $mode = 'fa')

Get array to convert the Dolibarr picto keys into Font awesome keys.

Parameters
string$mode'fa' to get conversion array for Font-Awesome
Returns
string[] Array of conversion
See also
img_picto()

Definition at line 1728 of file html.lib.php.

References $conf.

◆ getListOfHtmlBooleanAttributes()

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>

Returns
string[] An array of HTML boolean attribute names.

Definition at line 4787 of file html.lib.php.

Referenced by commonHtmlAttributeBuilder().

◆ getPictoForType()

getPictoForType ( $key,
$morecss = '' )

Return the picto for a data type.

Parameters
string$keyKey
string$morecssAdd more css to the object
Returns
string Picto for the key

Definition at line 1247 of file html.lib.php.

Referenced by FormAdmin\selectTypeOfFields(), and CommonObject\showOptionals().

◆ getTitleFieldOfList()

getTitleFieldOfList ( $name,
$thead = 0,
$file = "",
$field = "",
$begin = "",
$moreparam = "",
$moreattrib = "",
$sortfield = "",
$sortorder = "",
$prefix = "",
$disablesortlink = 0,
$tooltip = '',
$forcenowrapcolumntitle = 0 )

Get title line of an array.

Parameters
?string$nameTranslation 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

Parameters
string$fileUrl used when we click on sort picto
string$fieldField 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$moreparamAdd more parameters on sort url links ("" by default)
string$moreattribAdd more attributes on th ("" by default). To add more css class, use param $prefix.
?string$sortfieldCurrent field used to sort (Ex: 'd.datep,d.id')
?string$sortorderCurrent sort order (Ex: 'asc,desc')
string$prefixPrefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '.
int<0,1>$disablesortlink 1=Disable sort link
?string$tooltipText of tooltip with syntax 'Tooltip' or 'Tooltip:[keytoenabledtheonclicktooltip]:[tooltipdirection]'
int<0,1>$forcenowrapcolumntitle No need to use 'wrapcolumntitle' css style
Returns
string

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()

img_action ( $titlealt,
$numaction,
$picto = '',
$moreatt = '' )

Show logo action.

Parameters
string$titlealtText 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$numactionAction id or code to show
string$pictoName 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$moreattMore attributes
Returns
string Return an img tag

Definition at line 2042 of file html.lib.php.

Referenced by Societe\LibProspCommStatut(), Contact\libProspCommStatut(), and FormCompany\selectProspectStatus().

◆ img_allow()

img_allow ( $allow,
$titlealt = 'default' )

Show tick logo if allowed.

Parameters
string$allowAllow
string$titlealtText 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.
Returns
string Return img tag

Definition at line 2408 of file html.lib.php.

◆ img_credit_card()

img_credit_card ( $brand,
$morecss = 'fa-2x inline-block valignmiddle' )

Return image of a credit card according to its brand name.

Parameters
string$brandBrand name of credit card
string$morecssMore CSS
Returns
string Return img tag

Definition at line 2430 of file html.lib.php.

◆ img_down()

img_down ( $titlealt = 'default',
$selected = 0,
$moreclass = '' )

Show down arrow logo.

Parameters
string$titlealtText 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$selectedSelected
string$moreclassAdd more CSS classes
Returns
string Return img tag

Definition at line 2333 of file html.lib.php.

Referenced by form_constantes(), getTitleFieldOfList(), and FormFile\list_of_documents().

◆ img_left()

img_left ( $titlealt = 'default',
$selected = 0,
$moreatt = '' )

Show left arrow logo.

Parameters
string$titlealtText 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$selectedSelected
string$moreattAdd more attribute on img tag (For example 'style="float: right"')
Returns
string Return img tag

Definition at line 2371 of file html.lib.php.

◆ img_mime()

img_mime ( $file,
$titlealt = '',
$morecss = '' )

Show MIME img of a file.

Parameters
string$fileFilename
string$titlealtText 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$morecssMore css
Returns
string Return img tag

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()

img_next ( $titlealt = 'default',
$moreatt = '' )

Show next logo.

Parameters
string$titlealtText 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$moreattAdd more attribute on img tag (For example 'style="float: right"')
Returns
string Return img tag

Definition at line 2294 of file html.lib.php.

References dol_escape_htmltag().

◆ img_picto_common()

img_picto_common ( $titlealt,
$picto,
$moreatt = '',
$pictoisfullpath = 0,
$notitle = 0 )

Show picto (generic function)

Parameters
string$titlealtText 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$pictoName of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory.
string$moreattAdd more attribute on img tag
int$pictoisfullpathIf 1, image path is a full path
int$notitle1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
Returns
string Return img tag
See also
img_object(), img_picto()

Definition at line 1997 of file html.lib.php.

References $conf, dol_buildpath(), and getDolGlobalInt().

Referenced by tree_showpad().

◆ img_previous()

img_previous ( $titlealt = 'default',
$moreatt = '' )

Show previous logo.

Parameters
string$titlealtText 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$moreattAdd more attribute on img tag (For example 'style="float: right"')
Returns
string Return img tag

Definition at line 2313 of file html.lib.php.

References dol_escape_htmltag().

◆ img_printer()

img_printer ( $titlealt = "default",
$other = '' )

Show printer logo.

Parameters
string$titlealtText 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$otherAdd more attributes on img
Returns
string Retourne tag img

Definition at line 2180 of file html.lib.php.

◆ img_right()

img_right ( $titlealt = 'default',
$selected = 0,
$moreatt = '' )

Show right arrow logo.

Parameters
string$titlealtText 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$selectedSelected
string$moreattAdd more attribute on img tag (For example 'style="float: right"')
Returns
string Return img tag

Definition at line 2390 of file html.lib.php.

◆ img_search()

img_search ( $titlealt = 'default',
$other = '' )

Show search logo.

Parameters
string$titlealtText 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$otherAdd more attributes on img
Returns
string Retourne tag img

Definition at line 2487 of file html.lib.php.

References dol_escape_htmltag().

◆ img_searchclear()

img_searchclear ( $titlealt = 'default',
$other = '' )

Show search logo.

Parameters
string$titlealtText 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$otherAdd more attributes on img
Returns
string Retourne tag img

Definition at line 2510 of file html.lib.php.

References dol_escape_htmltag().

◆ img_split()

img_split ( $titlealt = 'default',
$other = 'class="pictosplit"' )

Show split logo.

Parameters
string$titlealtText 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$otherAdd more attributes on img
Returns
string Retourne tag img

Definition at line 2196 of file html.lib.php.

◆ img_up()

img_up ( $titlealt = 'default',
$selected = 0,
$moreclass = '' )

Show top arrow logo.

Parameters
string$titlealtText 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$selectedSelected
string$moreclassAdd more CSS classes
Returns
string Return img tag

Definition at line 2352 of file html.lib.php.

Referenced by getTitleFieldOfList(), and FormFile\list_of_documents().

◆ img_weather()

img_weather ( $titlealt,
$picto,
$moreatt = '',
$pictoisfullpath = 0,
$morecss = '' )

Show weather picto.

Parameters
string$titlealtText 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$pictoName 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$moreattAdd more attribute on img tag
int$pictoisfullpathIf 1, image path is a full path
string$morecssMore CSS
Returns
string Return img tag
See also
img_object(), img_picto()

Definition at line 1969 of file html.lib.php.

References $conf.

Referenced by showWeather().

◆ info_admin()

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.

Parameters
string$textText info
integer$infoonimgaltInfo is shown only on alt of star picto, otherwise it is shown on output after the star picto
int$nodivNo div
string | int$admin'1'=Info for admin users. '0'=Info for standard users (change only the look), 'info', 'error', 'warning', 'xxx'=Other
string$morecssMore CSS ('', 'warning', 'error')
string$textfordropdownShow a text to click to dropdown the info box.
string$picto'' or 'warning'
string$textonpictotooltipText to show in tooltip on picto
string$cssfordropdownAn additional css to avoid conflict to manage the dropdown if $textfordropdown is set
Returns
string String with info text

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()

load_fiche_titre ( $title,
$morehtmlright = '',
$picto = 'generic',
$pictoisfullpath = 0,
$id = '',
$morecssontable = '',
$morehtmlcenter = '',
$morecssonpicto = 'widthpictotitle' )

Load a title with picto.

Parameters
string$titleTitle to show (HTML sanitized content). Can be a string with a
as a second string shown under the fmain title.
string$morehtmlrightAdded message to show on right
string$pictoIcon 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$idTo force an id on html objects
string$morecssontableMore css on table
string$morehtmlcenterAdded message to show on center
string$morecssonpictoMore css on picto
Returns
string
See also
print_barre_liste()

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()

picto_from_langcode ( $codelang,
$moreatt = '',
$notitlealt = 0 )

Return img flag of country for a language code or country code.

Parameters
string$codelangLanguage code ('en_IN', 'fr_CA', ...) or ISO Country code on 2 characters in uppercase ('IN', 'FR')
string$moreattAdd more attribute on img tag (For example 'style="float: right"' or 'class="saturatemedium"')
int<0,1>$notitlealt No title alt
Returns
string HTML img string with flag.

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()

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.

Parameters
int$pageNumber of page
string$filePage URL (in most cases provided with $_SERVER["PHP_SELF"])
string$optionsOther url parameters to propagate ("" by default, may include sortfield and sortorder)
integer$nextpageDo we show a next page button
string$betweenarrowsHTML content to show between arrows. MUST contains ' ' tags or ' '.
string$afterarrowsHTML content to show after arrows. Must NOT contains ' ' tags.
int$limitMax nb of record to show (-1 = no combo with limit, 0 = no limit, > 0 = limit)
int$totalnboflinesTotal number of records/lines for all pages (if known)
int | string$selectlimitsuffixA suffix for the limit ID, or -1 to hide the select of limit
string$beforearrowsHTML content to show before arrows. Must NOT contains ' ' tags.
int$hidenavigationForce to hide the switch mode view and the navigation tool (hide limit section, html in $betweenarrows and $afterarrows but not $beforearrows)
Returns
void

Definition at line 3217 of file html.lib.php.

References $conf, ajax_combobox(), dol_escape_htmltag(), and getDolGlobalString().

◆ print_liste_field_titre()

print_liste_field_titre ( $name,
$file = "",
$field = "",
$begin = "",
$param = "",
$moreattrib = "",
$sortfield = "",
$sortorder = "",
$prefix = "",
$tooltip = "",
$forcenowrapcolumntitle = 0 )

Show title line of an array.

Parameters
?string$nameLabel of field
string$fileUrl used when we click on sort picto
string$fieldField to use for new sorting
string$begin("" by default)
string$paramAdd more parameters on sort url links ("" by default)
string$moreattribOptions of attribute td ("" by default)
?string$sortfieldCurrent field used to sort
?string$sortorderCurrent sort order
string$prefixPrefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '.
?string$tooltipTooltip
int$forcenowrapcolumntitleNo need to use 'wrapcolumntitle' css style
Returns
void

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()

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.

Parameters
string$zone'private' (for private pages) or 'public' (for public pages)
Returns
void

Definition at line 3818 of file html.lib.php.

Referenced by llxFooterSurvey(), and llxFooterVierge().

◆ show_actions_messaging()

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.

Parameters
Conf$confObject conf
Translate$langsObject langs
DoliDB$dbObject db
?CommonObject$filterobjFilter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket|... to list events linked to an object
?Contact$objconFilter on object contact to filter events on a contact
int$noprintReturn string but does not output it
string$actioncodeFilter on actioncode
string$donetodoFilter on event 'done' or 'todo' or ''=nofilter (all).
array<string,string>$filters Filter on other fields
string$sortfieldSort field
string$sortorderSort order
Returns
?string Return html part or void if noprint is 1

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()

showDimensionInBestUnit ( $dimension,
$unit,
$type,
$outputlangs,
$round = -1,
$forceunitoutput = 'no',
$use_short_label = 0 )

Output a dimension with best unit.

Parameters
float$dimensionDimension
int$unitUnit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...)
string$type'weight', 'volume', ...
Translate$outputlangsTranslate 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.
Returns
string String to show dimensions

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()

showDirectDownloadLink ( $object)

Return string with full Url.

The file qualified is the one defined by relative path in $object->last_main_doc

Parameters
CommonObject$objectObject
Returns
string Url string

Definition at line 4186 of file html.lib.php.

◆ showSimpleHTMLTable()

showSimpleHTMLTable ( $outputlangs,
$object )

Returns simple order table template as string.

Parameters
Translate$outputlangsOutput language
Object$objectObject
Returns
string template

Definition at line 4109 of file html.lib.php.

◆ showTotalAmount()

showTotalAmount ( $amount)

Style total amount of an object.

Parameters
string | float$amountAmount value to format
Returns
string String to show amount with style of total

Definition at line 3319 of file html.lib.php.

◆ showValueWithClipboardCPButton()

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.

Parameters
string$valuetocopyThe value to print
int<0,1>$showonlyonhover Show the copy-paste button only on hover
string$texttoshowReplace the value to show with this text. Use 'none' to show no text (only the copy-paste picto)
Returns
string The string to print for the button

Definition at line 5143 of file html.lib.php.

References dol_escape_htmltag().

◆ startSimpleTable()

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)

Parameters
string$headerThe 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
Returns
void
See also
finishSimpleTable()

Definition at line 5016 of file html.lib.php.