|
dolibarr 24.0.0-beta
|
Class to manage generation of HTML components Only common components must be here. More...

Public Member Functions | |
| __construct ($db) | |
| Constructor. | |
| getDurationTypes (Translate $langs, $plurial=true, $reverse=false) | |
| Return an array of Duration Types. | |
| editfieldkey ($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0, $paramid='id', $help='') | |
| Output key field for an editable field. | |
| editfieldval ($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=1, $formatfunc='', $paramid='id', $gm='auto', $moreoptions=array(), $editaction='') | |
| Output value of a field for an editable field. | |
| widgetForTranslation ($fieldname, $object, $perm, $typeofdata='string', $check='', $morecss='') | |
| Output edit in place form. | |
| textwithtooltip ($text, $htmltext, $tooltipon=1, $direction=0, $img='', $extracss='', $notabs=3, $incbefore='', $noencodehtmltext=0, $tooltiptrigger='', $forcenowrap=0) | |
| Show a text and picto with tooltip on text or picto. | |
| textwithpicto ($text, $htmltooltip, $direction=1, $type='help', $extracss='valignmiddle', $noencodehtmltext=0, $notabs=3, $tooltiptrigger='', $forcenowrap=0) | |
| Show a text with a picto and a tooltip on picto. | |
| selectMassAction ($selected, $arrayofaction, $alwaysvisible=0, $name='massaction', $cssclass='checkforselect') | |
| Generate select HTML to choose massaction. | |
| selectPhoneCode ($selected='', $htmlname='phone_code', $morecss='maxwidth150', $showempty=0, $country_id_hint=0) | |
| Return a select list of country phone calling codes. | |
| showPhoneInput ($phoneValue, $htmlname, $country_id_hint=0, $picto='object_phoning', $morecss='maxwidth150', $maxlength=0, $countrySelectorId='selectcountry_id') | |
| Show a self-contained phone input: hidden field + country code dropdown + number text field + JS. | |
| select_incoterms ($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array(), $disableautocomplete=0) | |
| Return select list of incoterms. | |
| select_type_of_lines ($selected='', $htmlname='type', $showempty=0, $hidetext=0, $forceall=0, $morecss="", $useajaxcombo=1) | |
| Return list of types of lines (product or service) Example: 0=product, 1=service, 9=other (for external module) | |
| load_cache_types_fees () | |
| Load into cache cache_types_fees, array of types of fees. | |
| select_type_fees ($selected='', $htmlname='type', $showempty=0) | |
| Return list of types of notes. | |
| select_company ($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false, $excludeids=array(), $showcode=0) | |
| Output html form to select a third party This call select_thirdparty_list() or ajax depending on setup. | |
| select_contact ($socid, $selected='', $htmlname='contactid', $showempty=0, $exclude='', $limitto='', $showfunction=0, $morecss='', $nokeyifsocid=true, $showsoc=0, $forcecombo=0, $events=array(), $moreparam='', $htmlid='', $selected_input_value='', $filter='') | |
| Output html form to select a contact This call select_contacts() or ajax depending on setup. | |
| select_thirdparty_list ($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false, $excludeids=array(), $showcode=0) | |
| Output html form to select a third party. | |
| selectcontacts ($socid, $selected=array(), $htmlname='contactid', $showempty=0, $exclude='', $limitto='', $showfunction=0, $morecss='', $options_only=0, $showsoc=0, $forcecombo=0, $events=array(), $moreparam='', $htmlid='', $multiple=false, $disableifempty=0, $filter='') | |
| Return HTML code of the SELECT of list of all contacts (for a third party or all). | |
| select_remises ($selected, $htmlname, $filter, $socid, $maxvalue=0) | |
| Return HTML combo list of absolute discounts. | |
| select_users ($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly=array(), $force_entity='0') | |
| Return the HTML select list of users. | |
| select_dolusers ($userselected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='', $maxlength=0, $showstatus=0, $morefilter='', $showalso=0, $enableonlytext='', $morecss='', $notdisabled=0, $outputmode=0, $multiple=false, $forcecombo=0) | |
| Return select list of users. | |
| select_dolusers_forevent ($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include=array(), $enableonly=array(), $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array(), $canremoveowner=1) | |
| Return select list of users. | |
| select_dolresources_forevent ($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include=array(), $enableonly=array(), $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofresourceid=array()) | |
| Return select list of resources. | |
| select_produits ($selected=0, $htmlname='productid', $filtertype='', $limit=0, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations=null, $nooutput=0, $status_purchase=-1, $warehouseId=0) | |
| Return list of products. | |
| select_bom ($selected='', $htmlname='bom_id', $limit=0, $status=1, $type=0, $showempty='1', $morecss='', $nooutput='', $forcecombo=0, $TProducts=[]) | |
| Return list of BOM for customer in Ajax if Ajax activated or go to select_produits_list. | |
| select_produits_list ($selected=0, $htmlname='productid', $filtertype='', $limit=1000, $price_level=0, $filterkey='', $status=1, $finished=2, $outputmode=0, $socid=0, $showempty='1', $forcecombo=0, $morecss='maxwidth500', $hidepriceinlabel=0, $warehouseStatus='', $status_purchase=-1, $warehouseId=0) | |
| Return list of products for a customer. | |
| select_produits_fournisseurs ($socid, $selected='', $htmlname='productid', $filtertype='', $notused='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0, $morecss='', $placeholder='', $nooutput=0) | |
| Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list) | |
| select_produits_fournisseurs_list ($socid, $selected='', $htmlname='productid', $filtertype='', $notused='', $filterkey='', $statut=-1, $outputmode=0, $limit=100, $alsoproductwithnosupplierprice=0, $morecss='', $showstockinlist=0, $placeholder='') | |
| Return list of suppliers products. | |
| select_product_fourn_price ($productid, $htmlname='productfournpriceid', $selected_supplier=0) | |
| Return list of suppliers prices for a product. | |
| load_cache_conditions_paiements () | |
| Load into cache list of payment terms. | |
| load_cache_rule_for_lines_dates () | |
| Loads into a cache property the list of possible rules for line dates. | |
| load_cache_availability () | |
| Load int a cache property the list of possible delivery delays. | |
| selectAvailabilityDelay ($selected='', $htmlname='availid', $filtertype='', $addempty=0, $morecss='', $noouput=0) | |
| Return the list of type of delay available. | |
| selectInputReason ($selected='', $htmlname='demandreasonid', $exclude='', $addempty=0, $morecss='', $notooltip=0) | |
| Return list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason. | |
| load_cache_types_paiements () | |
| Load into the cacha array all possible payment modes. | |
| select_conditions_paiements ($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='', $deposit_percent=-1, $noprint=0) | |
| print list of payment modes. | |
| getSelectConditionsPaiements ($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='', $deposit_percent=-1) | |
| Return list of payment modes. | |
| getSelectRuleForLinesDates ($selected='', $htmlname='rule_for_lines_dates', $addempty=0) | |
| Returns select with rule for lines dates. | |
| select_types_paiements ($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='', $nooutput=0) | |
| Return list of payment methods Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want. | |
| selectPriceBaseType ($selected='', $htmlname='price_base_type', $addjscombo=0) | |
| Selection HT or TTC. | |
| load_cache_transport_mode () | |
| selectTransportMode ($selected='', $htmlname='transportmode', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') | |
| Return list of transport mode for intracomm report. | |
| selectShippingMethod ($selected='', $htmlname='shipping_method_id', $filtre='', $useempty=0, $moreattrib='', $noinfoadmin=0, $morecss='') | |
| Return a HTML select list of shipping mode. | |
| formSelectShippingMethod ($page, $selected='', $htmlname='shipping_method_id', $addempty=0) | |
| Display form to select shipping mode. | |
| selectSituationInvoices ($selected='', $socid=0) | |
| Creates HTML last in cycle situation invoices selector. | |
| selectUnits ($selected='', $htmlname='units', $showempty=0, $unit_type='') | |
| Creates HTML units selector (code => label) | |
| select_comptes ($selected='', $htmlname='accountid', $status=0, $filtre='', $useempty=0, $moreattrib='', $showcurrency=0, $morecss='', $nooutput=0, $addentrynone=0) | |
| Return a HTML select list of bank accounts. | |
| selectRib ($selected='', $htmlname='ribcompanyid', $filtre='', $useempty=0, $moreattrib='', $showibanbic=0, $morecss='', $nooutput=0) | |
| Return a HTML select list of bank accounts customer. | |
| selectEstablishments ($selected='', $htmlname='entity', $status=0, $filtre='', $useempty=0, $moreattrib='') | |
| Return a HTML select list of establishment. | |
| formSelectAccount ($page, $selected='', $htmlname='fk_account', $addempty=0) | |
| Display form to select bank account. | |
| formRib ($page, $selected='', $htmlname='ribcompanyid', $filtre='', $addempty=0, $showibanbic=0) | |
| Display form to select bank customer account. | |
| selectCategories ($categtype, $htmlname, $object=null) | |
| Return HTML component to select a category. | |
| select_all_categories ($type, $selected='', $htmlname="parent", $maxlength=64, $fromid=0, $outputmode=0, $include=0, $morecss='', $useempty=1) | |
| Return list of categories having chosen type. | |
| getHelpBlock ($content, $icon='fa-question-circle') | |
| Generate a collapsible help block with a standard '?' icon. | |
| form_confirm ($page, $title, $question, $action, $formquestion=array(), $selectedchoice="", $useajax=0, $height=170, $width=500) | |
| formconfirm ($page, $title, $question, $action, $formquestion='', $selectedchoice='', $useajax=0, $height=0, $width=600, $disableformtag=0, $labelbuttonyes='Yes', $labelbuttonno='No', $helpContent='') | |
| Show a confirmation HTML form or AJAX popup. | |
| form_project ($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0, $textifnoproject='', $morecss='', $option='') | |
| Show a form to select a project. | |
| form_conditions_reglement ($page, $selected='', $htmlname='cond_reglement_id', $addempty=0, $type='', $filtertype=-1, $deposit_percent=-1, $nooutput=0) | |
| Show a form to select payment conditions. | |
| form_rule_for_lines_dates ($page, $selected='', $htmlname='rule_for_lines_dates', $addempty=0, $nooutput=0) | |
| Form select for rule for lines dates. | |
| form_availability ($page, $selected='', $htmlname='availability', $addempty=0) | |
| Show a form to select a delivery delay. | |
| formInputReason ($page, $selected='', $htmlname='demandreason', $addempty=0, $morecss='') | |
| Output HTML form to select list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason. | |
| form_date ($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0, $type='') | |
| Show a form + html select a date. | |
| form_users ($page, $selected='', $htmlname='userid', $exclude=array(), $include=array()) | |
| Show a select form to choose a user. | |
| form_modes_reglement ($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1, $addempty=0, $type='', $nooutput=0) | |
| Show form with payment mode. | |
| formSelectTransportMode ($page, $selected='', $htmlname='transport_mode_id', $active=1, $addempty=0) | |
| Show form with transport mode. | |
| form_multicurrency_code ($page, $selected='', $htmlname='multicurrency_code') | |
| Show form with multicurrency code. | |
| form_multicurrency_rate ($page, $rate=0.0, $htmlname='multicurrency_tx', $currency='', $rate_direct=0.0) | |
| Show form with multicurrency rate. | |
| form_remise_dispo ($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0, $filterabsolutediscount=0, $filtercreditnote=0) | |
| Show a select box with available absolute discounts. | |
| form_contacts ($page, $societe, $selected='', $htmlname='contactid') | |
| Show forms to select a contact. | |
| form_thirdparty ($page, $selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $nooutput=0, $excludeids=array(), $textifnothirdparty='') | |
| Output html select to select thirdparty. | |
| select_currency ($selected='', $htmlname='currency_id') | |
| Returns the list of currencies in the user's language. | |
| selectCurrency ($selected='', $htmlname='currency_id', $mode=0, $useempty='') | |
| Returns the list of currencies in the user's language. | |
| selectMultiCurrency ($selected='', $htmlname='multicurrency_code', $useempty=0, $filter='', $excludeConfCurrency=false, $morecss='maxwidth200 widthcentpercentminusx') | |
| Return array of currencies in user language. | |
| load_cache_vatrates ($country_code) | |
| Load into the cache ->cache_vatrates, all the vat rates of a country. | |
| load_tva ($htmlname='tauxtva', $selectedrate='', $societe_vendeuse=null, $societe_acheteuse=null, $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0, $type_vat=0) | |
| Output an HTML select vat rate. | |
| select_date ($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday=0, $addplusone='', $adddateof='') | |
| Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes. | |
| selectDateToDate ($set_time='', $set_time_end='', $prefix='re', $empty=0, $forcenewline=0) | |
| Show 2 HTML widget to input a date or combo list for day, month, years and optionally hours and minutes. | |
| selectDate ($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $disabled=0, $fullday='', $addplusone='', $adddateof='', $openinghours='', $stepminutes=1, $labeladddateof='', $placeholder='', $gm='auto', $calendarpicto='') | |
| Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes. | |
| selectTypeDuration ($prefix, $selected='i', $excludetypes=array(), $morecss='minwidth75 maxwidth100') | |
| selectTypeDuration | |
| select_duration ($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) | |
| Function to show a form to select a duration on a page. | |
| selectTickets ($selected='', $htmlname='ticketid', $filtertype='', $limit=0, $status=1, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $selected_combinations=null, $nooutput=0) | |
| Return list of tickets in Ajax if Ajax activated or go to selectTicketsList. | |
| selectTicketsList ($selected='', $htmlname='ticketid', $filtertype='', $limit=20, $filterkey='', $status=1, $outputmode=0, $showempty='1', $forcecombo=0, $morecss='') | |
| Return list of tickets. | |
| selectProjects ($selected='', $htmlname='projectid', $filtertype='', $limit=0, $status=1, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $selected_combinations=null, $nooutput=0) | |
| Return list of projects in Ajax if Ajax activated or go to selectTicketsList. | |
| selectProjectsList ($selected='', $htmlname='projectid', $filtertype='', $limit=20, $filterkey='', $status=1, $outputmode=0, $showempty='1', $forcecombo=0, $morecss='') | |
| Return list of projects. | |
| selectMembers ($selected='', $htmlname='adherentid', $filtertype='', $limit=0, $status=1, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $selected_combinations=null, $nooutput=0, $excludeids=array()) | |
| Return list of members in Ajax if Ajax activated or go to selectTicketsList. | |
| selectMembersList ($selected='', $htmlname='adherentid', $filtertype='', $limit=20, $filterkey='', $status=1, $outputmode=0, $showempty='1', $forcecombo=0, $morecss='', $excludeids=array()) | |
| Return list of adherents. | |
| selectForFormsList ($objecttmp, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0, $outputmode=0, $disabled=0, $sortfield='', $filter='', $sortorder='ASC') | |
| Output html form to select an object. | |
| showCategories ($id, $type, $rendermode=0, $nolink=0) | |
| Render list of categories linked to object with id $id and type $type. | |
| showLinkedObjectBlock ($object, $morehtmlright='', $compatibleImportElementsList=array(), $title='RelatedObjects') | |
| Show linked object block. | |
| showLinkToObjectBlock ($object, $restrictlinksto=array(), $excludelinksto=array(), $nooutput=0) | |
| Show block with links "to link to" other objects. | |
| selectyesno ($htmlname, $value='', $option=0, $disabled=false, $useempty=0, $addjscombo=0, $morecss='yesno width75', $labelyes='Yes', $labelno='No') | |
| Return an html string with a select combo box to choose yes or no. | |
| select_export_model ($selected='', $htmlname='exportmodelid', $type='', $useempty=0) | |
| Return list of export templates. | |
| showrefnav ($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $morehtmlright='') | |
| Return a HTML area with the reference of object and a navigation bar for a business object Note: To complete search with a particular filter on select, you can set $object->next_prev_filter set to define SQL criteria. | |
| showbarcode (&$object, $width=100, $morecss='') | |
| Return HTML code to output a barcode. | |
| select_dolgroups ($selected=0, $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly=array(), $force_entity='0', $multiple=false, $morecss='minwidth200') | |
| Return select list of user groups. | |
| showFilterButtons ($pos='') | |
| Return HTML to show the search and clear search button. | |
| showCheckAddButtons ($cssclass='checkforaction', $calljsfunction=0, $massactionname="massaction") | |
| Return HTML to show the search and clear search button. | |
| showFilterAndCheckAddButtons ($addcheckuncheckall=0, $cssclass='checkforaction', $calljsfunction=0, $massactionname="massaction") | |
| Return HTML to show the search and clear search button. | |
| selectExpenseCategories ($selected='', $htmlname='fk_c_exp_tax_cat', $useempty=0, $excludeid=array(), $target='', $default_selected=0, $params=array(), $info_admin=1) | |
| Return HTML to show the select of expense categories. | |
| selectExpenseRanges ($selected='', $htmlname='fk_range', $useempty=0) | |
| Return HTML to show the select ranges of expense range. | |
| selectExpenseFees ($selected='', $htmlname='fk_c_type_fees', $useempty=0, $allchoice=1, $useid=0) | |
| Return HTML to show a select of expense. | |
| selectInvoiceForTimeProject ($socid=-1, $selected='', $htmlname='invoiceid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $projectsListId='', $showproject='all', $usertofilter=null) | |
| Output a combo list with invoices for a project. | |
| selectInvoiceRec ($selected='', $htmlname='facrecid', $maxlength=24, $option_only=0, $show_empty='1', $forcefocus=0, $disabled=0, $morecss='maxwidth500') | |
| Output a combo list with invoices qualified for a third party TODO Bad method. | |
| searchComponent ($arrayofcriterias, $search_component_params, $arrayofinputfieldsalreadyoutput=array(), $search_component_params_hidden='', $arrayoffiltercriterias=array()) | |
| Output the component to make advanced search criteria. | |
| selectModelMail ($prefix, $modelType='', $default=0, $addjscombo=0, $selected=0, $morecss='') | |
| selectModelMail | |
| buttonsSaveCancel ($save_label='Save', $cancel_label='Cancel', $morebuttons=array(), $withoutdiv=false, $morecss='', $dol_openinpopup='') | |
| Output the buttons to submit a creation/edit form. | |
| load_cache_invoice_subtype () | |
| Load into cache list of invoice subtypes. | |
| getSelectInvoiceSubtype ($selected=0, $htmlname='subtypeid', $addempty=0, $noinfoadmin=0, $morecss='') | |
| Return list of invoice subtypes. | |
| getSearchFilterToolInput ($dataTarget, $htmlName='search-tools-input', $value='', $params=[]) | |
| inputType ($type, $name, $value='', $id='', $morecss='', $moreparam='', $label='', $addInputLabel='') | |
| Html for input with label. | |
| inputSelectAjax ($htmlName, $array, $id, $ajaxUrl, $ajaxData=[], $morecss='minwidth75', $moreparam='') | |
| Html for select with get options by AJAX. | |
| inputHtml ($htmlName, $value, $morecss='', $moreparam='') | |
| Html for HTML area. | |
| inputText ($htmlName, $value, $morecss='', $moreparam='', $options=array()) | |
| Html for HTML area. | |
| inputRadio ($htmlName, $options, $selectedValue, $morecss='', $moreparam='') | |
| Html for input radio. | |
| inputStars ($htmlName, $size, $value, $morecss='', $moreparam='') | |
| Html for input stars. | |
| inputIcon ($htmlName, $value, $morecss='', $moreparam='') | |
| Html for input icon. | |
| inputGeoPoint ($htmlName, $value, $type='') | |
| Html for input geo point. | |
| outputMultiValues ($values) | |
| Html for show selected multiple values. | |
| outputStars ($size, $value) | |
| Html for show stars. | |
| outputIcon ($value) | |
| Html for show icon. | |
| outputGeoPoint ($value, $type) | |
| Html for show geo point. | |
| getNomUrl (&$object, $withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0, $morecss='', $add_label=0, $sep=' - ') | |
| Return link of object. | |
Static Public Member Functions | |
| static | radio ($htmlName, $radioItems, $selected='', $moreGlobalParams=[]) |
| Generates a set of HTML radio inputs from an array of key-value items. | |
| static | selectarray ($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='minwidth75', $addjscombo=1, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0) |
| Return a HTML select string, built from an array of key+value. | |
| static | selectArrayAjax ($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0) |
| Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL. | |
| static | selectArrayFilter ($htmlname, $array, $id='', $moreparam='', $disableFiltering=0, $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0, $textfortitle='') |
| Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter. | |
| static | multiselectarray ($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='', $nu='', $placeholder='', $addjscombo=-1) |
| Show a multiselect form from an array. | |
| static | multiSelectArrayWithCheckbox ($htmlname, &$array, $varpage, $pos='', $draganddrop=0) |
| Show a multiselect dropbox from an array. | |
| static | showphoto ($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='', $noexternsourceoverwrite=0, $usesharelinkifavailable=0) |
| Return HTML code to output a photo. | |
Protected Member Functions | |
| editInPlace ($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null) | |
| Output edit in place form. | |
| constructProductListOption (&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel=0, $filterkey='', $novirtualstock=0) | |
| Function to forge the string with OPTIONs of SELECT. | |
| constructTicketListOption (&$objp, &$opt, &$optJson, $selected, $filterkey='') | |
| constructTicketListOption. | |
| constructProjectListOption (&$objp, &$opt, &$optJson, $selected, $filterkey='') | |
| constructProjectListOption. | |
| constructMemberListOption (&$objp, &$opt, &$optJson, $selected, $filterkey='') | |
| constructMemberListOption. | |
Private Member Functions | |
| getPhoneInputFieldJs ($htmlname, $codename) | |
| Return inline JS that syncs the hidden phone field from select + text input. | |
| getPhoneInputSharedJs ($countrySelectorId) | |
| Return inline JS for country-selector → phone code sync (output once per page). | |
| makeAddLinkToObject ($object, $key, $possiblelink, $num, $resqllist) | |
| Generate HTML table rows for standard object linking (invoices, orders, proposals, etc.). | |
| makeAddLinkToAttendee ($object, $key, $possiblelink, $num, $resqllist) | |
| Generate HTML table rows for conference/booth attendee linking. | |
Class to manage generation of HTML components Only common components must be here.
TODO Merge all function load_cache_* and loadCache* (except load_cache_vatrates) into one generic function loadCacheTable
Definition at line 58 of file html.form.class.php.
| Form::__construct | ( | $db | ) |
Constructor.
Reimplemented in FormAccounting, FormAdvTargetEmailing, FormAI, FormCron, FormFiscalYear, FormMail, FormProjets, and FormWebPortal.
Definition at line 113 of file html.form.class.php.
| Form::buttonsSaveCancel | ( | $save_label = 'Save', | |
| $cancel_label = 'Cancel', | |||
| $morebuttons = array(), | |||
| $withoutdiv = false, | |||
| $morecss = '', | |||
| $dol_openinpopup = '' ) |
Output the buttons to submit a creation/edit form.
| string | $save_label | Alternative label for save button |
| string | $cancel_label | Alternative label for cancel button |
| array<array{addclass?:string,name?:string,label_key?:string}> | $morebuttons Add additional buttons between save and cancel | |
| bool|int<0,1> | $withoutdiv Option to remove enclosing centered div | |
| string | $morecss | More CSS |
| string | $dol_openinpopup | If the button are shown in a context of a page shown inside a popup, we put here the string name of popup. |
Definition at line 13011 of file html.form.class.php.
References dol_escape_htmltag(), dol_escape_js(), and getDolGlobalInt().
|
protected |
constructMemberListOption.
This define value for &$opt and &$optJson.
| object | $objp | Result set of fetch |
| string | $opt | Option (var used for returned value in string option format) |
| array{key?:string,value?:mixed,type?:int} | $optJson Option (var used for returned value in json format) | |
| string | $selected | Preselected value |
| string | $filterkey | Filter key to highlight |
Definition at line 9533 of file html.form.class.php.
|
protected |
Function to forge the string with OPTIONs of SELECT.
This define value for &$opt and &$optJson. This function is called by select_produits_list().
| stdClass | $objp | Resultset of fetch |
| string | $opt | Option (var used for returned value in string option format) |
| array{key?:string,value?:string,label?:string,label2?:string,desc?:string,type?:string,price_ht?:string,price_ttc?:string,price_ht_locale?:string,price_ttc_locale?:string,pricebasetype?:string,tva_tx?:string,default_vat_code?:string,qty?:string,discount?:string,duration_value?:string,duration_unit?:string,pbq?:string,labeltrans?:string,desctrans?:string,ref_customer?:string} | $optJson Option (var used for returned value in json format) | |
| int | $price_level | Price level |
| int | $selected | Preselected value |
| int<0,1> | $hidepriceinlabel Hide price in label | |
| string | $filterkey | Filter key to highlight |
| int<0,1> | $novirtualstock Do not load virtual stock, even if slow option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO is on. |
Definition at line 4020 of file html.form.class.php.
References $conf, dol_escape_htmltag(), dol_print_error(), dol_strlen(), dol_syslog(), dol_trunc(), getCountry(), getDolGlobalInt(), getDolGlobalString(), getEntity(), isModEnabled(), measuringUnitString(), price(), price2num(), showDimensionInBestUnit(), Product\TYPE_PRODUCT, Product\TYPE_SERVICE, and vatrate().
Referenced by select_produits_list().
|
protected |
constructProjectListOption.
This define value for &$opt and &$optJson.
| stdClass | $objp | Result set of fetch |
| string | $opt | Option (var used for returned value in string option format) |
| array{} | $optJson Option (var used for returned value in json format) @phan-output-reference @phan-param array{key:string,value:string,type:string} $optJson Option (var used for returned value in json format) @phan-output-reference @phpstan-param-out array{key:string,value:string,type:string} $optJson | |
| string | $selected | Preselected value |
| string | $filterkey | Filter key to highlight |
Definition at line 9293 of file html.form.class.php.
|
protected |
constructTicketListOption.
This define value for &$opt and &$optJson.
| object | $objp | Result set of fetch |
| string | $opt | Option (var used for returned value in string option format) |
| array{key?:string,value?:mixed,type?:int} | $optJson Option (var used for returned value in json format) | |
| string | $selected | Preselected value |
| string | $filterkey | Filter key to highlight |
Definition at line 9067 of file html.form.class.php.
| Form::editfieldkey | ( | $text, | |
| $htmlname, | |||
| $preselected, | |||
| $object, | |||
| $perm, | |||
| $typeofdata = 'string', | |||
| $moreparam = '', | |||
| $fieldrequired = 0, | |||
| $notabletag = 0, | |||
| $paramid = 'id', | |||
| $help = '' ) |
Output key field for an editable field.
| string | $text | Text of label or key to translate |
| string | $htmlname | Name of select field ('edit' prefix will be added) |
| string | $preselected | Value to show/edit (not used in this function) |
| ?object | $object | Object (on the page we show) |
| int<0,1>|boolean | $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field. | |
| string | $typeofdata | Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datehourpicker' 'checkbox:ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) |
| string | $moreparam | More param to add on a href URL. |
| int<0,1> | $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS. | |
| int<0,3> | $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' ' | |
| 'id'|'socid'|'projectid' | $paramid Key of parameter for id ('id', 'socid') | |
| string | $help | Tooltip help |
Definition at line 172 of file html.form.class.php.
References $object, dolBuildUrl(), getDolGlobalString(), GETPOST(), img_edit(), and textwithpicto().
| Form::editfieldval | ( | $text, | |
| $htmlname, | |||
| $value, | |||
| $object, | |||
| $perm, | |||
| $typeofdata = 'string', | |||
| $editvalue = '', | |||
| $extObject = null, | |||
| $custommsg = null, | |||
| $moreparam = '', | |||
| $notabletag = 1, | |||
| $formatfunc = '', | |||
| $paramid = 'id', | |||
| $gm = 'auto', | |||
| $moreoptions = array(), | |||
| $editaction = '' ) |
Output value of a field for an editable field.
| string | $text | Text of label (not used in this function) |
| string | $htmlname | Name of select field |
| string | int | $value | Value to show/edit |
| CommonObject | ActionsCardProduct | ActionsCardService | $object | Object (that we want to show) |
| bool|int<0,1> | $perm Permission to allow button to edit parameter | |
| string | $typeofdata | Type of data ('string' by default, 'checkbox', 'email', 'phone', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'safehtmlstring', 'restricthtml', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datehourpicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select;xkey:xval,ykey:yval,...') |
| ?string | $editvalue | When in edit mode, use this value as $value instead of value (for example, you can provide here a formatted price instead of numeric value, or a select combo). Use '' to use same than $value |
| ?CommonObject | $extObject | External object ??? |
| string|array<string,string>|null | $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') | |
| string | $moreparam | More param to add on the form on action href URL parameter |
| int<0,1> | $notabletag Do no output table tags | |
| string | $formatfunc | Call a specific method of $object->$formatfunc to output field in view mode (For example: 'dol_print_email') |
| string | $paramid | Key of parameter for id ('id', 'socid') |
| string | $gm | 'auto' or 'tzuser' or 'tzuserrel' or 'tzserver' (when $typeofdata is a date) |
| array<string,int> | $moreoptions Array with more options. For example array('addnowlink'=>1), array('valuealreadyhtmlescaped'=>1) | |
| string | $editaction | [=''] use GETPOST default action or set action to edit mode |
Definition at line 281 of file html.form.class.php.
References $conf, $object, dol_escape_htmltag(), dol_htmlentitiesbr(), dol_htmlwithnojs(), dol_print_date(), dol_print_email(), dol_print_phone(), dol_print_url(), dol_string_neverthesehtmltags(), dol_string_onlythesehtmltags(), editInPlace(), getDolGlobalString(), GETPOST(), img_picto(), price(), price2num(), selectarray(), and selectDate().
|
protected |
Output edit in place form.
| CommonObject | $object | Object |
| string | $value | Value to show/edit |
| string | $htmlname | DIV ID (field name) |
| int | $condition | Condition to edit |
| string | $inputType | Type of input ('string', 'numeric', 'datepicker' ('day' do not work, don't know why), 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:loadmethod:savemethod:buttononly') |
| ?string | $editvalue | When in edit mode, use this value as $value instead of value |
| ?CommonObject | $extObject | External object |
| string|array<string,string>|null | $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') |
Definition at line 556 of file html.form.class.php.
References $object, dol_nl2br(), dol_print_date(), isModEnabled(), and price().
Referenced by editfieldval().
| Form::form_availability | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'availability', | |||
| $addempty = 0 ) |
Show a form to select a delivery delay.
| string | $page | Page |
| string | $selected | Preselected I for condition |
| string | $htmlname | Name of select html field |
| int<0,1>|string | $addempty Add an empty entry |
Definition at line 7199 of file html.form.class.php.
References dol_syslog().
| Form::form_conditions_reglement | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'cond_reglement_id', | |||
| $addempty = 0, | |||
| $type = '', | |||
| $filtertype = -1, | |||
| $deposit_percent = -1, | |||
| $nooutput = 0 ) |
Show a form to select payment conditions.
| string | $page | Page |
| string | $selected | Id of preselected payment term |
| string | $htmlname | Name of select html field |
| int<0,1> | $addempty Add empty entry | |
| ''|'direct-debit'|'bank-transfer' | $type Type ('direct-debit' or 'bank-transfer') | |
| int | $filtertype | If > 0, include payment terms with deposit percentage (for objects other than invoices and invoice templates) |
| float | $deposit_percent | < 0 : deposit_percent input makes no sense (for example, in list filters) 0 : use default deposit percentage from entry > 0 : force deposit percentage (for example, from company object) |
| int<0,1> | $nooutput No print is done. String is returned. |
Definition at line 7095 of file html.form.class.php.
References dol_escape_htmltag().
| Form::form_confirm | ( | $page, | |
| $title, | |||
| $question, | |||
| $action, | |||
| $formquestion = array(), | |||
| $selectedchoice = "", | |||
| $useajax = 0, | |||
| $height = 170, | |||
| $width = 500 ) |
Show a confirmation HTML form or AJAX popup
| string | $page | Url of page to call if confirmation is OK |
| string | $title | Title |
| string | $question | Question |
| string | $action | Action |
| array<array{name?:string,value?:string|float|bool,values?:string[],default?:string,label?:string,type:string,size?:int|string,morecss?:string,moreattr?:string,style?:string,inputko?:int<0,1>}>|string|null | $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...')) 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss', 'other', 'onecolumn' or 'hidden'... | |
| string | $selectedchoice | "" or "no" or "yes" |
| int<0,2>|string | $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx | |
| int | $height | Force height of box |
| int | $width | Force width of box |
Definition at line 6563 of file html.form.class.php.
References dol_syslog(), and formconfirm().
| Form::form_contacts | ( | $page, | |
| $societe, | |||
| $selected = '', | |||
| $htmlname = 'contactid' ) |
Show forms to select a contact.
| string | $page | Page |
| Societe | $societe | Filter on third party |
| string | $selected | Preselected contact Id |
| string | $htmlname | Name of HTML select. If 'none', we just show contact link. |
Definition at line 7622 of file html.form.class.php.
References getDolGlobalString().
| Form::form_date | ( | $page, | |
| $selected, | |||
| $htmlname, | |||
| $displayhour = 0, | |||
| $displaymin = 0, | |||
| $nooutput = 0, | |||
| $type = '' ) |
Show a form + html select a date.
| string | $page | Page |
| int|'' | $selected Date preselected | |
| string | $htmlname | Html name of date input fields or 'none' |
| int | $displayhour | Display hour selector |
| int | $displaymin | Display minutes selector |
| int<0,1> | $nooutput 1=No print output, return string | |
| string | $type | 'direct-debit' or 'bank-transfer' |
Definition at line 7278 of file html.form.class.php.
References dol_escape_htmltag(), and dol_print_date().
| Form::form_modes_reglement | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'mode_reglement_id', | |||
| $filtertype = '', | |||
| $active = 1, | |||
| $addempty = 0, | |||
| $type = '', | |||
| $nooutput = 0 ) |
Show form with payment mode.
| string | $page | Page |
| string | $selected | Preselected Id for mode |
| string | $htmlname | Name of select html field |
| string | $filtertype | To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz)) |
| int<-1,1> | $active Active or not, -1 = all | |
| int<0,1> | $addempty 1=Add empty entry | |
| string | $type | Type ('direct-debit' or 'bank-transfer') |
| int<0,1> | $nooutput 1=Return string, no output |
Definition at line 7365 of file html.form.class.php.
References dol_escape_htmltag().
| Form::form_multicurrency_code | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'multicurrency_code' ) |
Show form with multicurrency code.
| string | $page | Page |
| string | $selected | Preselected code |
| string | $htmlname | Name of select html field |
Definition at line 7438 of file html.form.class.php.
References currency_name().
| Form::form_multicurrency_rate | ( | $page, | |
| $rate = 0.0, | |||
| $htmlname = 'multicurrency_tx', | |||
| $currency = '', | |||
| $rate_direct = 0.0 ) |
Show form with multicurrency rate.
| string | $page | Page |
| double | $rate | Current rate |
| string | $htmlname | Name of select html field |
| string | $currency | Currency code to explain the rate |
| double | $rate_direct | Current rate_direct |
Direct : 1 Divisa Currency = X Currency Main. Indirect : 1 Currency Main = X Divisa Currency. Then for Dolibarr use is Indirect for default
Definition at line 7467 of file html.form.class.php.
References $conf, ajax_combobox(), getDolGlobalString(), price(), and price2num().
| Form::form_project | ( | $page, | |
| $socid, | |||
| $selected = '', | |||
| $htmlname = 'projectid', | |||
| $discard_closed = 0, | |||
| $maxlength = 20, | |||
| $forcefocus = 0, | |||
| $nooutput = 0, | |||
| $textifnoproject = '', | |||
| $morecss = '', | |||
| $option = '' ) |
Show a form to select a project.
| string | $page | Page |
| int | $socid | Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) |
| int | string | Project | $selected | Id of the preselected project |
| string | $htmlname | Name of select field |
| int<0,2> | $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable) | |
| int | $maxlength | Max length |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int<0,1> | $nooutput No print is done. String is returned. | |
| string | $textifnoproject | Text to show if no project |
| string | $morecss | More CSS |
| string | $option | Variant where the link point to ('', 'nolink') |
Definition at line 7037 of file html.form.class.php.
| Form::form_remise_dispo | ( | $page, | |
| $selected, | |||
| $htmlname, | |||
| $socid, | |||
| $amount, | |||
| $filter = '', | |||
| $maxvalue = 0, | |||
| $more = '', | |||
| $hidelist = 0, | |||
| $discount_type = 0, | |||
| $filterabsolutediscount = 0, | |||
| $filtercreditnote = 0 ) |
Show a select box with available absolute discounts.
| string | $page | Page URL where form is shown |
| int | $selected | Value preselected |
| string | $htmlname | Name of SELECT component. If 'none', not changeable. Example 'remise_id'. |
| int | $socid | Third party id |
| float | $amount | Total amount available |
| string | $filter | SQL filter on discounts. TODO Replace this param with 2 params to add: $filterabsolutediscount = 1 or or $filtercreditnote = 1 |
| int | $maxvalue | Max value for lines that can be selected |
| string | $more | More string to add |
| int | $hidelist | 1=Hide list |
| int | $discount_type | 0 => customer discount, 1 => supplier discount |
| int | $filterabsolutediscount | Filter absolute discount |
| int | $filtercreditnote | Filter credit note |
Definition at line 7524 of file html.form.class.php.
References $conf, dol_escape_htmltag(), getDolGlobalString(), and price().
| Form::form_rule_for_lines_dates | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'rule_for_lines_dates', | |||
| $addempty = 0, | |||
| $nooutput = 0 ) |
Form select for rule for lines dates.
| string | $page | Page |
| string | $selected | Preselected Id |
| string | $htmlname | Name of select html field |
| int | $addempty | Add empty entry |
| int | $nooutput | No print is done. String is returned. |
Definition at line 7154 of file html.form.class.php.
| Form::form_thirdparty | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'socid', | |||
| $filter = '', | |||
| $showempty = 0, | |||
| $showtype = 0, | |||
| $forcecombo = 0, | |||
| $events = array(), | |||
| $nooutput = 0, | |||
| $excludeids = array(), | |||
| $textifnothirdparty = '' ) |
Output html select to select thirdparty.
| string | $page | Page |
| string | $selected | Id preselected |
| string | $htmlname | Name of HTML select |
| string | $filter | Optional filter criteria. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here (example: 's.rowid <> x', 's.client IN (1,3)'). Do not use a filter coming from input of users. |
| string|int<0,1> | $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty') | |
| int<0,1> | $showtype Show third party type in combolist (customer, prospect or supplier) | |
| int<0,1> | $forcecombo Force to use combo box | |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| int<0,1> | $nooutput No print output. Return it only. | |
| int[] | $excludeids | Exclude IDs from the select combo |
| string | $textifnothirdparty | Text to show if no thirdparty |
Definition at line 7672 of file html.form.class.php.
References getDolGlobalInt().
| Form::form_users | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'userid', | |||
| $exclude = array(), | |||
| $include = array() ) |
Show a select form to choose a user.
| string | $page | Page |
| string | $selected | Id of user preselected |
| string | $htmlname | Name of input html field. If 'none', we just output the user link. |
| int[] | $exclude | List of users id to exclude |
| int[] | $include | List of users id to include |
Definition at line 7325 of file html.form.class.php.
| Form::formconfirm | ( | $page, | |
| $title, | |||
| $question, | |||
| $action, | |||
| $formquestion = '', | |||
| $selectedchoice = '', | |||
| $useajax = 0, | |||
| $height = 0, | |||
| $width = 600, | |||
| $disableformtag = 0, | |||
| $labelbuttonyes = 'Yes', | |||
| $labelbuttonno = 'No', | |||
| $helpContent = '' ) |
Show a confirmation HTML form or AJAX popup.
Easiest way to use this is with useajax=1. If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters) just after calling this method. For example: print '<script nonce="'.getNonce().'" type="text/javascript">'."\n"; print 'jQuery(document).ready(function() {'."\n"; print 'jQuery(".xxxlink").click(function(e) { jQuery("#aparamid").val(jQuery(this).attr("rel")); jQuery("#dialog-confirm-xxx").dialog("open"); return false; });'."\n"; print '});'."\n"; print '</script>'."\n";
| string | $page | Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformatted) |
| string | $title | Title |
| string | $question | Question |
| string | $action | Action |
| null|string|array<array{name?:string,value?:string|float|bool,values?:string[],default?:string,label?:string,type:string,size?:int|string,morecss?:string,moreattr?:string,style?:string,inputko?:int<0,1>,tdclass?:string}>|array{text:string,0?:array{name:string,value?:string|float|bool,values?:string[],default?:string,label?:string,type:string,size?:int|string,morecss?:string,moreattr?:string,style?:string,inputko?:int<0,1>,tdclass?:string},1?:array{name:string,value?:string|float|bool,values?:string[],default?:string,label?:string,type:string,size?:int|string,morecss?:string,moreattr?:string,style?:string,inputko?:int<0,1>,tdclass?:string}} | $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...')) 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss', 'other', 'onecolumn' or 'hidden'... | |
| int<0,1>|''|'no'|'yes'|'1'|'0' | $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0 | |
| int<0,2>|string | $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx | |
| int | string | $height | Force height of box (0 = auto) |
| int | $width | Force width of box ('999' or '90'). Ignored and forced to 90% on smartphones. |
| int | $disableformtag | 1=Disable form tag. Can be used if we are already inside a <form> section. |
| string | $labelbuttonyes | Label for Yes |
| string | $labelbuttonno | Label for No |
| string | $helpContent | Optional help text to display in a collapsible block at the bottom left of the dialog. If set, a standard '?' icon with the label "Help" will appear. Clicking it expands the content provided here. Supports HTML. |
Definition at line 6599 of file html.form.class.php.
References $conf, button, dol_escape_htmltag(), dol_escape_js(), dol_nboflines_bis(), getHelpBlock(), img_help(), multiselectarray(), selectarray(), and selectDate().
Referenced by form_confirm().
| Form::formInputReason | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'demandreason', | |||
| $addempty = 0, | |||
| $morecss = '' ) |
Output HTML form to select list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason.
| string | $page | Page |
| string | $selected | Preselected Id for condition |
| string | $htmlname | Name of select html field |
| int | $addempty | Add empty entry |
| string | $morecss | More CSS |
Definition at line 7238 of file html.form.class.php.
| Form::formRib | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'ribcompanyid', | |||
| $filtre = '', | |||
| $addempty = 0, | |||
| $showibanbic = 0 ) |
Display form to select bank customer account.
| string | $page | Page |
| string | $selected | Id of bank customer account |
| string | $htmlname | Name of select html field |
| string | $filtre | filtre for rib selected |
| int | $addempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
| int | $showibanbic | Show iban/bic in label |
Definition at line 6303 of file html.form.class.php.
References selectRib().
| Form::formSelectAccount | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'fk_account', | |||
| $addempty = 0 ) |
Display form to select bank account.
| string | $page | Page |
| string | $selected | Id of bank account |
| string | $htmlname | Name of select html field |
| int<0,2> | $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
Definition at line 6263 of file html.form.class.php.
References img_picto(), and select_comptes().
| Form::formSelectShippingMethod | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'shipping_method_id', | |||
| $addempty = 0 ) |
Display form to select shipping mode.
| string | $page | Page |
| string | $selected | Id of shipping mode |
| string | $htmlname | Name of select html field |
| int | $addempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
Definition at line 5866 of file html.form.class.php.
References selectShippingMethod().
| Form::formSelectTransportMode | ( | $page, | |
| $selected = '', | |||
| $htmlname = 'transport_mode_id', | |||
| $active = 1, | |||
| $addempty = 0 ) |
Show form with transport mode.
| string | $page | Page |
| int|'' | $selected Id mode preselect | |
| string | $htmlname | Name of select html field |
| int<-1,1> | $active Active or not, -1 = all | |
| int<0,1> | $addempty 1=Add empty entry |
Definition at line 7408 of file html.form.class.php.
| Form::getDurationTypes | ( | Translate | $langs, |
| $plurial = true, | |||
| $reverse = false ) |
Return an array of Duration Types.
| Translate | $langs | Translation to be used |
| bool | $plurial | return plurial or singular |
| bool | $reverse | change order of duration types |
Definition at line 126 of file html.form.class.php.
| Form::getHelpBlock | ( | $content, | |
| $icon = 'fa-question-circle' ) |
Generate a collapsible help block with a standard '?' icon.
Designed for use in formconfirm() to provide context without clutter.
| string | $content | The detailed explanation text (HTML allowed) |
| string | $icon | FontAwesome icon class (default: 'fa-question-circle') |
Definition at line 6523 of file html.form.class.php.
Referenced by formconfirm().
| Form::getNomUrl | ( | & | $object, |
| $withpicto = 0, | |||
| $option = '', | |||
| $maxlength = 0, | |||
| $save_lastsearch_value = -1, | |||
| $notooltip = 0, | |||
| $morecss = '', | |||
| $add_label = 0, | |||
| $sep = ' - ' ) |
Return link of object.
| CommonObject | $object | Object handler |
| int | $withpicto | Add picto into link |
| string | $option | Where point the link ('stock', 'composition', 'category', 'supplier', '') |
| int | $maxlength | Maxlength of ref |
| int | $save_lastsearch_value | -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking |
| int | $notooltip | No tooltip |
| string | $morecss | ''=Add more css on link |
| int | $add_label | 0=Default, 1=Add label into string, >1=Add first chars into string |
| string | $sep | ' - '=Separator between ref and label if option 'add_label' is set |
Reimplemented in FormWebPortal.
Definition at line 13632 of file html.form.class.php.
References $object.
|
private |
Return inline JS that syncs the hidden phone field from select + text input.
Strips formatting chars and trunk prefix from the number, then builds the hidden value as "{code} {number}" or just "{number}" if no code.
| string | $htmlname | Base name (e.g. "phone_pro") |
| string | $codename | Code select name (e.g. "phone_pro_code") |
Definition at line 1336 of file html.form.class.php.
References dol_escape_js().
Referenced by showPhoneInput().
|
private |
Return inline JS for country-selector → phone code sync (output once per page).
When the country select changes, fetches the phone code via AJAX and updates all .phone_code_select dropdowns, which in turn triggers per-field sync.
| string | $countrySelectorId | ID of the country select element |
Definition at line 1378 of file html.form.class.php.
Referenced by showPhoneInput().
| Form::getSearchFilterToolInput | ( | $dataTarget, | |
| $htmlName = 'search-tools-input', | |||
| $value = '', | |||
| $params = [] ) |
| string | $dataTarget | a css target like '.element-item-to-search-in' OR 'id-of-parent .class-of-container > .element-item-to-search-in' Ex : search element in a table row : 'table-id tr' |
| string | $htmlName | the html name attribute |
| string | $value | the html value attribute |
| array<mixed> | $params a mixed array of params |
Definition at line 13171 of file html.form.class.php.
References dol_htmlentities(), and dolPrintHTMLForAttribute().
| Form::getSelectConditionsPaiements | ( | $selected = 0, | |
| $htmlname = 'condid', | |||
| $filtertype = -1, | |||
| $addempty = 0, | |||
| $noinfoadmin = 0, | |||
| $morecss = '', | |||
| $deposit_percent = -1 ) |
Return list of payment modes.
Constant MAIN_DEFAULT_PAYMENT_TERM_ID can be used to set default value but scope is all application, probably not what you want. See instead to force the default value by the caller.
| int | $selected | Id of payment term to preselect by default |
| string | $htmlname | Name of the select zone |
| int | $filtertype | If > 0, include payment terms with deposit percentage (for objects other than invoices and invoice templates) |
| int | $addempty | Add an empty entry |
| int | $noinfoadmin | 0=Add admin info, 1=Disable admin info |
| string | $morecss | Add more CSS on select tag |
| float | $deposit_percent | If < 0 : deposit_percent input makes no sense (for example, in list filters) If 0 : use default deposit percentage from entry If > 0 : force deposit percentage (for example, from company object) |
Definition at line 5408 of file html.form.class.php.
References $id, ajax_combobox(), dol_syslog(), getDolGlobalInt(), info_admin(), and load_cache_conditions_paiements().
Referenced by select_conditions_paiements().
| Form::getSelectInvoiceSubtype | ( | $selected = 0, | |
| $htmlname = 'subtypeid', | |||
| $addempty = 0, | |||
| $noinfoadmin = 0, | |||
| $morecss = '' ) |
Return list of invoice subtypes.
| int | $selected | Id of invoice subtype to preselect by default |
| string | $htmlname | Select field name |
| int<0,1> | $addempty Add an empty entry | |
| int<0,1> | $noinfoadmin 0=Add admin info, 1=Disable admin info | |
| string | $morecss | Add more CSS on select tag |
Definition at line 13128 of file html.form.class.php.
References ajax_combobox(), dol_syslog(), and info_admin().
| Form::getSelectRuleForLinesDates | ( | $selected = '', | |
| $htmlname = 'rule_for_lines_dates', | |||
| $addempty = 0 ) |
Returns select with rule for lines dates.
| string | $selected | Selected value |
| string | $htmlname | HTML element name |
| int | $addempty | Add empty option ? |
Definition at line 5492 of file html.form.class.php.
References ajax_combobox(), and load_cache_rule_for_lines_dates().
| Form::inputGeoPoint | ( | $htmlName, | |
| $value, | |||
| $type = '' ) |
Html for input geo point.
| string | $htmlName | Html name |
| string | $value | Value |
| string | $type | Type (linestrg, multipts, point, polygon) |
Reimplemented in FormWebPortal.
Definition at line 13523 of file html.form.class.php.
References getDolGlobalString().
| Form::inputHtml | ( | $htmlName, | |
| $value, | |||
| $morecss = '', | |||
| $moreparam = '' ) |
Html for HTML area.
| string | $htmlName | Html name |
| string | $value | [=''] Value |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
Reimplemented in FormWebPortal.
Definition at line 13318 of file html.form.class.php.
References getDolGlobalInt(), and isModEnabled().
| Form::inputIcon | ( | $htmlName, | |
| $value, | |||
| $morecss = '', | |||
| $moreparam = '' ) |
Html for input icon.
| string | $htmlName | Html name |
| string | $value | Value |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
Reimplemented in FormWebPortal.
Definition at line 13483 of file html.form.class.php.
References dolPrintHTMLForAttribute(), getDolGlobalInt(), and string.
| Form::inputRadio | ( | $htmlName, | |
| $options, | |||
| $selectedValue, | |||
| $morecss = '', | |||
| $moreparam = '' ) |
Html for input radio.
| string | $htmlName | Html name |
| array<string,string> | $options List of option | |
| string | $selectedValue | Selected value |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
Reimplemented in FormWebPortal.
Definition at line 13410 of file html.form.class.php.
References dolPrintHTMLForAttribute(), and string.
| Form::inputSelectAjax | ( | $htmlName, | |
| $array, | |||
| $id, | |||
| $ajaxUrl, | |||
| $ajaxData = [], | |||
| $morecss = 'minwidth75', | |||
| $moreparam = '' ) |
Html for select with get options by AJAX.
| string | $htmlName | Name |
| array<string,mixed> | $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) | |
| string | $id | Preselected key or preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record. |
| string | $ajaxUrl | Ajax page Url |
| array<string,string> | $ajaxData Additional data send to the AJAX page | |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
Reimplemented in FormWebPortal.
Definition at line 13276 of file html.form.class.php.
References $id.
| Form::inputStars | ( | $htmlName, | |
| $size, | |||
| $value, | |||
| $morecss = '', | |||
| $moreparam = '' ) |
Html for input stars.
| string | $htmlName | Html name |
| int | $size | Number of stars |
| int | $value | Value |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
Reimplemented in FormWebPortal.
Definition at line 13432 of file html.form.class.php.
References dolPrintHTMLForAttribute(), and img_picto().
| Form::inputText | ( | $htmlName, | |
| $value, | |||
| $morecss = '', | |||
| $moreparam = '', | |||
| $options = array() ) |
Html for HTML area.
| string | $htmlName | Html name |
| string | $value | [=''] Value |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
| array<string,mixed> | $options Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) |
Reimplemented in FormWebPortal.
Definition at line 13336 of file html.form.class.php.
References string.
| Form::inputType | ( | $type, | |
| $name, | |||
| $value = '', | |||
| $id = '', | |||
| $morecss = '', | |||
| $moreparam = '', | |||
| $label = '', | |||
| $addInputLabel = '' ) |
Html for input with label.
| string | $type | Type of input : button, checkbox, color, email, hidden, month, number, password, radio, range, tel, text, time, url, week |
| string | $name | Name |
| string | $value | [=''] Value |
| string | $id | [=''] Id |
| string | $morecss | [=''] Class |
| string | $moreparam | [=''] Add attributes (checked, required, etc) |
| string | $label | [=''] Label |
| string | $addInputLabel | [=''] Add label for input |
Reimplemented in FormWebPortal.
Definition at line 13242 of file html.form.class.php.
References $id, and dolPrintHTMLForAttribute().
| Form::load_cache_availability | ( | ) |
Load int a cache property the list of possible delivery delays.
Definition at line 5108 of file html.form.class.php.
References dol_print_error(), dol_sort_array(), dol_syslog(), and string.
Referenced by selectAvailabilityDelay().
| Form::load_cache_conditions_paiements | ( | ) |
Load into cache list of payment terms.
Definition at line 5023 of file html.form.class.php.
References dol_print_error(), dol_syslog(), getEntity(), and string.
Referenced by getSelectConditionsPaiements().
| Form::load_cache_invoice_subtype | ( | ) |
Load into cache list of invoice subtypes.
Definition at line 13077 of file html.form.class.php.
References dol_print_error(), dol_sort_array(), and dol_syslog().
| Form::load_cache_rule_for_lines_dates | ( | ) |
Loads into a cache property the list of possible rules for line dates.
Definition at line 5087 of file html.form.class.php.
Referenced by getSelectRuleForLinesDates().
| Form::load_cache_transport_mode | ( | ) |
Load in cache list of transport mode
Definition at line 5675 of file html.form.class.php.
References dol_print_error(), dol_sort_array(), dol_syslog(), getEntity(), and string.
Referenced by selectTransportMode().
| Form::load_cache_types_fees | ( | ) |
Load into cache cache_types_fees, array of types of fees.
Definition at line 1729 of file html.form.class.php.
References dol_print_error(), and dol_syslog().
Referenced by select_type_fees().
| Form::load_cache_types_paiements | ( | ) |
Load into the cacha array all possible payment modes.
Definition at line 5304 of file html.form.class.php.
References dol_print_error(), dol_sort_array(), dol_syslog(), getEntity(), and string.
Referenced by select_types_paiements().
| Form::load_cache_vatrates | ( | $country_code | ) |
Load into the cache ->cache_vatrates, all the vat rates of a country.
| string | $country_code | Country code with quotes ("'CA'", or "'CA,IN,...'") |
Definition at line 7852 of file html.form.class.php.
References dol_getIdFromCode(), and dol_syslog().
| Form::load_tva | ( | $htmlname = 'tauxtva', | |
| $selectedrate = '', | |||
| $societe_vendeuse = null, | |||
| $societe_acheteuse = null, | |||
| $idprod = 0, | |||
| $info_bits = 0, | |||
| $type = '', | |||
| $options_only = false, | |||
| $mode = 0, | |||
| $type_vat = 0 ) |
Output an HTML select vat rate.
The name of this function should be selectVat. We keep bad name for compatibility purpose.
| string | $htmlname | Name of HTML select field |
| float | string | $selectedrate | Force preselected vat rate. Can be '8.5' or '8.5 (CODE)' for example. Use -1 or '' for no forcing (auto mode). |
| ?Societe | $societe_vendeuse | Thirdparty seller |
| ?Societe | $societe_acheteuse | Thirdparty buyer |
| int | $idprod | Id product. O if unknown of NA. |
| int | $info_bits | Miscellaneous information on line (1 for NPR) |
| int<0,1>|'' | $type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined) If seller not subject to VAT, default VAT=0. End of rule. If (seller country==buyer country), then default VAT=product's VAT. End of rule. If (seller and buyer in EU) and sold product = new means of transportation (car, boat, airplane), default VAT =0 (VAT must be paid by the buyer to his country's tax office and not the seller). End of rule. If (seller and buyer in EU) and buyer=private person, then default VAT=VAT of sold product. End of rule. If (seller and buyer in EU) and buyer=company then default VAT =0. End of rule. Else, default proposed VAT==0. End of rule. | |
| bool | $options_only | Return HTML options lines only (for ajax treatment) |
| int<-1,1> | $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key | |
| int<0,2> | $type_vat 0=All types, 1=VAT rate for sales, 2=VAT rate for purchases |
Definition at line 7955 of file html.form.class.php.
References $mysoc, dol_escape_htmltag(), dol_strlen(), get_default_npr(), get_default_tva(), getDolGlobalString(), isInEEC(), Product\TYPE_SERVICE, and vatrate().
|
private |
Generate HTML table rows for conference/booth attendee linking.
This method creates custom table body rows specifically for ConferenceOrBoothAttendee objects. It displays Ref, Name, Email, Company, DateOfRegistration, and Project columns. Uses getNomUrl() for clickable links to attendee, company, and project records.
| CommonObject | $object | The source object we are linking from (e.g., propal, order) |
| string | $key | The element type key ('conferenceorboothattendee') |
| array{enabled:bool,perms:int,label:string,sql:string,linkname?:string} | $possiblelink Array containing link configuration | |
| int | $num | Number of records returned from the SQL query |
| mysqli_result | resource | true | $resqllist | Database result resource from the SQL query |
Definition at line 1484 of file html.form.class.php.
References $object, dol_syslog(), and img_picto().
|
private |
Generate HTML table rows for standard object linking (invoices, orders, proposals, etc.).
This method creates the table body rows with checkboxes for selecting objects to link. It displays Ref, RefCustomer, AmountHTShort, and Company columns.
| CommonObject | $object | The source object we are linking from |
| string | $key | The element type key (e.g., 'invoice', 'order', 'propal') |
| array{enabled:bool,perms:int,label:string,sql:string,linkname?:string} | $possiblelink Array containing link configuration | |
| int | $num | Number of records returned from the SQL query |
| mysqli_result | resource | true | $resqllist | Database result resource from the SQL query |
Definition at line 1418 of file html.form.class.php.
References $object, dol_syslog(), img_picto(), and price().
|
static |
Show a multiselect form from an array.
WARNING: Use this only for short lists.
| string | $htmlname | Name of select |
| array<string|int,string|array<string,mixed>> | $array Array(key=>value) or Array(key=>array('id'=>key, 'label'=>value, 'labelhtml'=> , 'color'=> , 'picto'=> , )) | |
| string[] | $selected | Array of keys preselected |
| int<0,1> | $key_in_label 1 to show key like in "[key] value" | |
| int<0,1> | $value_as_key 1 to use value as key | |
| string | $morecss | Add more css style |
| int<0,1> | $translate Translate and encode value | |
| int | string | $width | Force width of select box. May be used only when using jquery couch. Example: 250, '95' |
| string | $moreattrib | Add more options on select component. Example: 'disabled' |
| string | $nu | Not used |
| string | $placeholder | String to use as placeholder |
| int<-1,1> | $addjscombo Add js combo |
Definition at line 10484 of file html.form.class.php.
Referenced by formconfirm(), FormCategory\getFilterBox(), FormAccounting\multi_select_journal(), selectCategories(), FormOrder\selectOrderStatus(), FormProjets\selectProjectsStatus(), FormOrder\selectSupplierOrderStatus(), and FormCompany\showRoles().
|
static |
Show a multiselect dropbox from an array.
If a saved selection of fields exists for user (into $user->conf->MAIN_SELECTEDFIELDS_contextofpage), we use this one instead of default.
| string | $htmlname | Name of HTML field |
| array<string,array{label:string,checked?:string,enabled?:string,type?:string,langfile?:string,position?:int,help?:string}> | $array Array with array of fields we could show. This array may be modified according to setup of user. | |
| string | $varpage | Id of context for page. Can be set by caller with $varpage=(empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage); |
| int | string | $pos | Position of the colon in list: 1 or 'left' or '' (meaning 'right'). |
| int<0,1> | $draganddrop Enable drag and drop feature (0 by default and drag and drop disabled), !=0 drag and drop enabled |
Definition at line 10648 of file html.form.class.php.
| Form::outputGeoPoint | ( | $value, | |
| $type ) |
Html for show geo point.
| string | $value | Value |
| string | $type | Type (linestrg, multipts, point, polygon) |
Reimplemented in FormWebPortal.
Definition at line 13601 of file html.form.class.php.
| Form::outputIcon | ( | $value | ) |
Html for show icon.
| string | $value | Value |
Reimplemented in FormWebPortal.
Definition at line 13587 of file html.form.class.php.
References dolPrintHTMLForAttribute().
| Form::outputMultiValues | ( | $values | ) |
Html for show selected multiple values.
| string[] | $values | Values |
Reimplemented in FormWebPortal.
Definition at line 13547 of file html.form.class.php.
| Form::outputStars | ( | $size, | |
| $value ) |
Html for show stars.
| int | $size | Number of stars |
| int | $value | Value |
Reimplemented in FormWebPortal.
Definition at line 13570 of file html.form.class.php.
References dolPrintHTMLForAttribute(), and img_picto().
|
static |
Generates a set of HTML radio inputs from an array of key-value items.
| string | $htmlName | Name of the HTML input group |
| array<string,string|array{label | string,value?: string|int,attr?: array<string, string|int|bool|null>, unescapedAttr?: string[],attrLabel?: array<string, string|int|bool|null>,unescapedAttrLabel?: string[],disabled?: bool,css?: string,labelIsHtml?: bool}> $radioItems Array of items in the form key => label or key => array of item properties | |
| string | int | $selected | Preselected key for selection. |
| array<string,array<string,string|int|bool|null>|string|bool> | $moreGlobalParams Additional global parameters applied to all items (e.g., attributes) |
Definition at line 10017 of file html.form.class.php.
| Form::searchComponent | ( | $arrayofcriterias, | |
| $search_component_params, | |||
| $arrayofinputfieldsalreadyoutput = array(), | |||
| $search_component_params_hidden = '', | |||
| $arrayoffiltercriterias = array() ) |
Output the component to make advanced search criteria.
| array<array<string,array{type:string}>> | $arrayofcriterias Array of available search criteria. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...) | |
| array<int,string> | $search_component_params Array of selected search criteria | |
| string[] | $arrayofinputfieldsalreadyoutput | Array of input fields already inform. The component will not generate a hidden input field if it is in this list. |
| string | $search_component_params_hidden | String with $search_component_params criteria |
| array<string,array{type:string}> | $arrayoffiltercriterias Array of available filter criteria for an object and linked objects |
Definition at line 12586 of file html.form.class.php.
References dol_escape_htmltag(), dol_escape_js(), dolPrintHTML(), img_picto(), and removeGlobalParenthesis().
| Form::select_all_categories | ( | $type, | |
| $selected = '', | |||
| $htmlname = "parent", | |||
| $maxlength = 64, | |||
| $fromid = 0, | |||
| $outputmode = 0, | |||
| $include = 0, | |||
| $morecss = '', | |||
| $useempty = 1 ) |
Return list of categories having chosen type.
| string | int | $type | Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) should be avoid and is kept for internal use only. |
| int|'auto'|'' | $selected Id of category preselected or 'auto' (autoselect category if there is only one element). Not used if $outputmode = 1. | |
| string | $htmlname | HTML field name |
| int | $maxlength | Maximum length for labels |
| int | string | int[] | $fromid | Keep only or Exclude (depending on $include parameter) all categories (including the leaf $fromid) into the tree after this id $fromid. $fromid can be an :
|
| int<0,3> | $outputmode 0=HTML select string, 1=Array with full label only, 2=Array extended, 3=Array with full picto + label | |
| int<0,1> | $include [=0] Removed or 1=Keep only | |
| string | $morecss | More CSS |
| int<0,2> | $useempty 0=No empty value, 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. Default is 1. |
Definition at line 6439 of file html.form.class.php.
References dol_escape_htmltag(), dol_trunc(), and img_picto().
Referenced by FormCategory\getFilterBox(), and selectCategories().
| Form::select_bom | ( | $selected = '', | |
| $htmlname = 'bom_id', | |||
| $limit = 0, | |||
| $status = 1, | |||
| $type = 0, | |||
| $showempty = '1', | |||
| $morecss = '', | |||
| $nooutput = '', | |||
| $forcecombo = 0, | |||
| $TProducts = [] ) |
Return list of BOM for customer in Ajax if Ajax activated or go to select_produits_list.
| string | $selected | Preselected BOM id |
| string | $htmlname | Name of HTML select field (must be unique in page). |
| int | $limit | Limit on number of returned lines |
| int | $status | Sell status -1=Return all bom, 0=Draft BOM, 1=Validated BOM |
| int | $type | Type of the BOM (-1=Return all BOM, 0=Return disassemble BOM, 1=Return manufacturing BOM) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| string | $morecss | Add more css on select |
| string | $nooutput | No print, return the output into a string |
| int | $forcecombo | Force to use combo box |
| string[] | $TProducts | Add filter on a defined product |
Definition at line 3506 of file html.form.class.php.
References ajax_combobox(), dol_print_error(), getDolGlobalInt(), and getEntity().
| Form::select_company | ( | $selected = '', | |
| $htmlname = 'socid', | |||
| $filter = '', | |||
| $showempty = '', | |||
| $showtype = 0, | |||
| $forcecombo = 0, | |||
| $events = array(), | |||
| $limit = 0, | |||
| $morecss = 'minwidth100', | |||
| $moreparam = '', | |||
| $selected_input_value = '', | |||
| $hidelabel = 1, | |||
| $ajaxoptions = array(), | |||
| $multiple = false, | |||
| $excludeids = array(), | |||
| $showcode = 0 ) |
Output html form to select a third party This call select_thirdparty_list() or ajax depending on setup.
This component is not able to support multiple select.
| int | string | $selected | Preselected ID |
| string | $htmlname | Name of field in form |
| string | $filter | Optional filter criteria. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here. Example: ((s.client:IN:1,3) AND (s.status:=:1)). Do not use a filter coming from input of users. |
| string|int<1,1> | $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty') | |
| int<0,1> | $showtype Show third party type in combolist (customer, prospect or supplier) | |
| int<0,1> | $forcecombo Force to load all values and output a standard combobox (with no beautification) | |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| int | $limit | Maximum number of elements |
| string | $morecss | Add more css styles to the SELECT component |
| string | $moreparam | Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int<0,3> | $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder 'Search', 3 search icon after) | |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| bool | $multiple | add [] in the name of element and add 'multiple' attribute (not working with ajax_autocompleter) |
| string[] | $excludeids | Exclude IDs from the select combo |
| int<0,1> | $showcode Show code |
Definition at line 1839 of file html.form.class.php.
References $conf, ajax_autocompleter(), ajax_event(), dol_escape_htmltag(), getDolGlobalInt(), getDolGlobalString(), img_picto(), and select_thirdparty_list().
| Form::select_comptes | ( | $selected = '', | |
| $htmlname = 'accountid', | |||
| $status = 0, | |||
| $filtre = '', | |||
| $useempty = 0, | |||
| $moreattrib = '', | |||
| $showcurrency = 0, | |||
| $morecss = '', | |||
| $nooutput = 0, | |||
| $addentrynone = 0 ) |
Return a HTML select list of bank accounts.
| int|'' | $selected Id account preselected | |
| string | $htmlname | Name of select zone |
| int<0,2> | $status Status of searched accounts (0=open, 1=closed, 2=both) | |
| string | $filtre | To filter the list. This parameter must not come from input of users. Must use USF syntax. |
| int<0,2>|string | $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. | |
| string | $moreattrib | To add more attribute on select |
| int<0,1> | $showcurrency Show currency in label | |
| string | $morecss | More CSS |
| int<0,1> | $nooutput 1=Return string, do not send to output | |
| int<0,1> | $addentrynone Add an entry None |
Definition at line 6018 of file html.form.class.php.
References ajax_combobox(), dol_print_error(), dol_syslog(), dolPrintHTMLForAttribute(), and getEntity().
Referenced by formSelectAccount().
| Form::select_conditions_paiements | ( | $selected = 0, | |
| $htmlname = 'condid', | |||
| $filtertype = -1, | |||
| $addempty = 0, | |||
| $noinfoadmin = 0, | |||
| $morecss = '', | |||
| $deposit_percent = -1, | |||
| $noprint = 0 ) |
print list of payment modes.
Constant MAIN_DEFAULT_PAYMENT_TERM_ID can be used to set default value but scope is all application, probably not what you want. See instead to force the default value by the caller.
| int | $selected | Id of payment term to preselect by default |
| string | $htmlname | Nom de la zone select |
| int | $filtertype | If > 0, include payment terms with deposit percentage (for objects other than invoices and invoice templates) |
| int | $addempty | Add an empty entry |
| int | $noinfoadmin | 0=Add admin info, 1=Disable admin info |
| string | $morecss | Add more CSS on select tag |
| float | $deposit_percent | < 0 : deposit_percent input makes no sense (for example, in list filters) 0 : use default deposit percentage from entry > 0 : force deposit percentage (for example, from company object) |
| int | $noprint | if set to one we return the html to print, if 0 (default) we print it |
Definition at line 5380 of file html.form.class.php.
References getSelectConditionsPaiements().
| Form::select_contact | ( | $socid, | |
| $selected = '', | |||
| $htmlname = 'contactid', | |||
| $showempty = 0, | |||
| $exclude = '', | |||
| $limitto = '', | |||
| $showfunction = 0, | |||
| $morecss = '', | |||
| $nokeyifsocid = true, | |||
| $showsoc = 0, | |||
| $forcecombo = 0, | |||
| $events = array(), | |||
| $moreparam = '', | |||
| $htmlid = '', | |||
| $selected_input_value = '', | |||
| $filter = '' ) |
Output html form to select a contact This call select_contacts() or ajax depending on setup.
This component is not able to support multiple select.
Return HTML code of the SELECT of list of all contacts (for a third party or all). This also set the number of contacts found into $this->num if not using ajax mode.
| int | $socid | Id of third party or 0 for all or -1 for empty list |
| int | string | $selected | ID of preselected contact id |
| string | $htmlname | Name of HTML field ('none' for a not editable field) |
| int<0,3>|string | $showempty 0=no empty value, 1=add an empty value, 2=add line 'Internal' (used by user edit), 3=add an empty value only if more than one record into list | |
| string | $exclude | List of contacts id to exclude |
| string | $limitto | Not used |
| int<0,1> | $showfunction Add function into label | |
| string | $morecss | Add more class to class style |
| bool | $nokeyifsocid | When 1, we force the option "Press a key to show list" to 0 if there is a value for $socid |
| integer | $showsoc | Add company into label |
| int<0,1> | $forcecombo 1=Force to use combo box (so no ajax beautify effect) | |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| string | $moreparam | Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container |
| string | $htmlid | Html id to use instead of htmlname |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| string | $filter | Optional filter criteria. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here. Example: ((s.client:IN:1,3) AND (s.status:=:1)). Do not use a filter coming from input of users. |
Definition at line 1921 of file html.form.class.php.
References $conf, ajax_autocompleter(), ajax_event(), dol_escape_htmltag(), getDolGlobalInt(), getDolGlobalString(), and selectcontacts().
| Form::select_currency | ( | $selected = '', | |
| $htmlname = 'currency_id' ) |
Returns the list of currencies in the user's language.
| string | $selected | preselected currency code |
| string | $htmlname | name of HTML select list |
Definition at line 7717 of file html.form.class.php.
| Form::select_date | ( | $set_time = '', | |
| $prefix = 're', | |||
| $h = 0, | |||
| $m = 0, | |||
| $empty = 0, | |||
| $form_name = "", | |||
| $d = 1, | |||
| $addnowlink = 0, | |||
| $nooutput = 0, | |||
| $disabled = 0, | |||
| $fullday = 0, | |||
| $addplusone = '', | |||
| $adddateof = '' ) |
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
| integer | string | $set_time | Preselected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). |
| string | $prefix | Prefix for fields name |
| int | $h | 1 or 2=Show also hours (2=hours on a new line), -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show hour always empty |
| int | $m | 1=Show also minutes, -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show minutes always empty |
| int | $empty | 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only |
| string | $form_name | Not used |
| int | $d | 1=Show days, month, years |
| int | $addnowlink | Add a link "Now" |
| int<0,1> | $nooutput Do not output html string but return it | |
| int | $disabled | Disable input fields |
| int | $fullday | When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 |
| string | $addplusone | Add a link "+1 hour". Value must be name of another select_date field. |
| int | string | $adddateof | Add a link "Date of invoice" using the following date. |
Definition at line 8208 of file html.form.class.php.
References dol_syslog().
| Form::select_dolgroups | ( | $selected = 0, | |
| $htmlname = 'groupid', | |||
| $show_empty = 0, | |||
| $exclude = '', | |||
| $disabled = 0, | |||
| $include = '', | |||
| $enableonly = array(), | |||
| $force_entity = '0', | |||
| $multiple = false, | |||
| $morecss = 'minwidth200' ) |
Return select list of user groups.
| int|object|array<int|object> | $selected Id group or group(s) preselected | |
| string | $htmlname | Field name in form |
| int<0,1> | $show_empty 0=list without null value, 1=add an unknown value | |
| string | int[] | $exclude | Array list of groups id to exclude |
| int<0,1> | $disabled If select list must be disabled | |
| string | int[] | $include | Array list of groups id to include |
| int[] | $enableonly | Array list of groups id to be enabled. All other must be disabled |
| string | $force_entity | '0' or Ids of environment to force |
| bool | $multiple | Add [] in the name of element and add 'multiple' attribute (not working with ajax_autocompleter) |
| string | $morecss | More css to add to html component |
Definition at line 11960 of file html.form.class.php.
References $conf, ajax_combobox(), dol_print_error(), dol_syslog(), getDolGlobalInt(), and isModEnabled().
| Form::select_dolresources_forevent | ( | $action = '', | |
| $htmlname = 'userid', | |||
| $show_empty = 0, | |||
| $exclude = null, | |||
| $disabled = 0, | |||
| $include = array(), | |||
| $enableonly = array(), | |||
| $force_entity = '0', | |||
| $maxlength = 0, | |||
| $showstatus = 0, | |||
| $morefilter = '', | |||
| $showproperties = 0, | |||
| $listofresourceid = array() ) |
Return select list of resources.
Selected resources are stored into session. List of resources are provided into $_SESSION['assignedtoresource'].
| string | $action | Value for $action |
| string | $htmlname | Field name in form |
| int<0,1> | $show_empty 0=list without the empty value, 1=add empty value | |
| int[] | $exclude | Array list of users id to exclude |
| int<0,1> | $disabled If select list must be disabled | |
| int[] | string | $include | Array list of users id to include or 'hierarchy' to have only supervised users |
| int[] | $enableonly | Array list of users id to be enabled. All other must be disabled |
| string | $force_entity | '0' or Ids of environment to force |
| int | $maxlength | Maximum length of string into list (0=no limit) |
| int<-1,1> | $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status | |
| string | $morefilter | Add more filters into sql request |
| int<0,1> | $showproperties Show properties of each attendees | |
| array<int,array{transparency:bool|int<0,1>}> | $listofresourceid Array with properties of each resource |
Definition at line 3148 of file html.form.class.php.
References dol_escape_htmltag(), and img_picto().
| Form::select_dolusers | ( | $userselected = '', | |
| $htmlname = 'userid', | |||
| $show_empty = 0, | |||
| $exclude = null, | |||
| $disabled = 0, | |||
| $include = '', | |||
| $enableonly = '', | |||
| $force_entity = '', | |||
| $maxlength = 0, | |||
| $showstatus = 0, | |||
| $morefilter = '', | |||
| $showalso = 0, | |||
| $enableonlytext = '', | |||
| $morecss = '', | |||
| $notdisabled = 0, | |||
| $outputmode = 0, | |||
| $multiple = false, | |||
| $forcecombo = 0 ) |
Return select list of users.
| string|int|User|array<int,int> | $userselected User id or User object of user preselected or Array of user selected. If 0 or < -4, we use id of current user. If -1 or '', keep unselected (if empty is allowed) | |
| string | $htmlname | Field name in form |
| int<0,1>|string | $show_empty 0=list with no empty value, 1=add also an empty value into list | |
| int[] | null | $exclude | Array list of users id to exclude |
| int | $disabled | If select list must be disabled |
| int[]|''|'hierarchy'|'hierarchyme' | $include Array list of users id to include. Use '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me | |
| int[]|'' | $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled | |
| string | $force_entity | '0' or list of Ids of environment to force, separated by a comma, or 'default' = do no extend to all entities allowed to superadmin. |
| int | $maxlength | Maximum length of string into list (0=no limit) |
| int<-1,1> | $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status | |
| string | $morefilter | Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input. |
| int<0,3> | $showalso 0=default list, 1=add also a value "Everybody" at beginning of list, 2=add also a value "My team" at beginning of list (if user has at least 1 people), 3=add also "Everybody" + "My Team" | |
| string | $enableonlytext | If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. |
| string | $morecss | More css |
| int<0,1> | $notdisabled Show only active users (note: this will also happen, whatever is this option, if USER_HIDE_INACTIVE_IN_COMBOBOX is on). | |
| int<0,2> | $outputmode 0=HTML select string, 1=Array, 2=Detailed array | |
| bool | $multiple | add [] in the name of element and add 'multiple' attribute |
| int<0,1> | $forcecombo Force the component to be a simple combo box without ajax |
Definition at line 2651 of file html.form.class.php.
References $conf, ajax_combobox(), dol_escape_htmltag(), dol_print_error(), dol_syslog(), getDolGlobalInt(), getDolGlobalString(), getEntity(), and isModEnabled().
Referenced by select_dolusers_forevent(), and select_users().
| Form::select_dolusers_forevent | ( | $action = '', | |
| $htmlname = 'userid', | |||
| $show_empty = 0, | |||
| $exclude = null, | |||
| $disabled = 0, | |||
| $include = array(), | |||
| $enableonly = array(), | |||
| $force_entity = '0', | |||
| $maxlength = 0, | |||
| $showstatus = 0, | |||
| $morefilter = '', | |||
| $showproperties = 0, | |||
| $listofuserid = array(), | |||
| $listofcontactid = array(), | |||
| $listofotherid = array(), | |||
| $canremoveowner = 1 ) |
Return select list of users.
Selected users are stored into session. List of users are provided into $_SESSION['assignedtouser'].
| string | $action | Value for $action |
| string | $htmlname | Field name in form |
| int<0,1> | $show_empty 0=list without the empty value, 1=add empty value | |
| int[] | $exclude | Array list of users id to exclude |
| int<0,1> | $disabled If select list must be disabled | |
| int[]|''|'hierarchy'|'hierarchyme' | $include Array list of users id to include or 'hierarchy' to have only supervised users | |
| int[] | int | $enableonly | Array list of users id to be enabled. All other must be disabled |
| string | $force_entity | '0' or Ids of environment to force |
| int | $maxlength | Maximum length of string into list (0=no limit) |
| int<0,1> | $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status | |
| string | $morefilter | Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input. |
| int | $showproperties | Show properties of each attendees |
| int[] | $listofuserid | Array with properties of each user |
| int[] | $listofcontactid | Array with properties of each contact |
| int[] | $listofotherid | Array with properties of each other contact |
| int | $canremoveowner | 1 if we can remove owner, 0=no way |
Definition at line 3026 of file html.form.class.php.
References dol_escape_htmltag(), img_picto(), and select_dolusers().
| Form::select_duration | ( | $prefix, | |
| $iSecond = '', | |||
| $disabled = 0, | |||
| $typehour = 'select', | |||
| $minunderhours = 0, | |||
| $nooutput = 0 ) |
Function to show a form to select a duration on a page.
| string | $prefix | Prefix for input fields |
| int | string | $iSecond | Default preselected duration (number of seconds or '') |
| int | $disabled | Disable the combo box |
| string | $typehour | If 'select' then input hour and input min is a combo, If 'text' input hour is in text and input min is a text, If 'textselect' input hour is in text and input min is a combo |
| integer | $minunderhours | If 1, show minutes selection under the hours |
| int<0,1> | $nooutput Do not output html string but return it |
Definition at line 8783 of file html.form.class.php.
| Form::select_export_model | ( | $selected = '', | |
| $htmlname = 'exportmodelid', | |||
| $type = '', | |||
| $useempty = 0 ) |
Return list of export templates.
| string | $selected | Id of preselected template |
| string | $htmlname | Name of HTML select |
| string | $type | Type of searched templates |
| int | $useempty | Show an empty value in list |
Definition at line 11428 of file html.form.class.php.
References dol_print_error().
| Form::select_incoterms | ( | $selected = '', | |
| $location_incoterms = '', | |||
| $page = '', | |||
| $htmlname = 'incoterm_id', | |||
| $htmloption = '', | |||
| $forcecombo = 1, | |||
| $events = array(), | |||
| $disableautocomplete = 0 ) |
Return select list of incoterms.
| string | $selected | Id or Code of preselected incoterm |
| string | $location_incoterms | Value of input location |
| string | $page | Defined the form action |
| string | $htmlname | Name of html select object |
| string | $htmloption | Options html on select object |
| int<0,1> | $forcecombo Force to load all values and output a standard combobox (with no beautification) | |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| int<0,1> | $disableautocomplete Disable autocomplete |
Definition at line 1571 of file html.form.class.php.
References $conf, ajax_combobox(), ajax_multiautocompleter(), dol_print_error(), and dol_syslog().
| Form::select_product_fourn_price | ( | $productid, | |
| $htmlname = 'productfournpriceid', | |||
| $selected_supplier = 0 ) |
Return list of suppliers prices for a product.
| int | $productid | Id of product |
| string | $htmlname | Name of HTML field |
| int | $selected_supplier | Preselected supplier if more than 1 result |
Definition at line 4916 of file html.form.class.php.
References $conf, dol_print_error(), dol_syslog(), getDolGlobalString(), getEntity(), isModEnabled(), and price().
| Form::select_produits | ( | $selected = 0, | |
| $htmlname = 'productid', | |||
| $filtertype = '', | |||
| $limit = 0, | |||
| $price_level = 0, | |||
| $status = 1, | |||
| $finished = 2, | |||
| $selected_input_value = '', | |||
| $hidelabel = 0, | |||
| $ajaxoptions = array(), | |||
| $socid = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '', | |||
| $hidepriceinlabel = 0, | |||
| $warehouseStatus = '', | |||
| $selected_combinations = null, | |||
| $nooutput = 0, | |||
| $status_purchase = -1, | |||
| $warehouseId = 0 ) |
Return list of products.
Use Ajax if Ajax activated or go to select_produits_list
| int | $selected | Preselected products |
| string | $htmlname | Name of HTML select field (must be unique in page). |
| int|'' | $filtertype Filter on product type (''=nofilter, 0=product, 1=service) | |
| int | $limit | Limit on number of returned lines |
| int | $price_level | Level of price to show |
| int<-1,1> | $status Sell status: -1=No filter on sell status, 0=Products not on sell, 1=Products on sell | |
| int<0,2> | $finished 2=all, 1=finished, 0=raw material | |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int<0,3> | $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) | |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int<0,1> | $forcecombo Force to use combo box. | |
| string | $morecss | Add more css on select |
| int<0,1> | $hidepriceinlabel 1=Hide prices in label | |
| string | $warehouseStatus | Warehouse status filter to count the quantity in stock. Following comma separated filter options can be used 'warehouseopen' = count products from open warehouses, 'warehouseclosed' = count products from closed warehouses, 'warehouseinternal' = count products from warehouses for internal correct/transfer only |
| ?array<string,mixed> | $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) | |
| int<0,1> | $nooutput No print if 1, return the output into a string | |
| int<-1,1> | $status_purchase Purchase status: -1=No filter on purchase status, 0=Products not on purchase, 1=Products on purchase | |
| int | $warehouseId | Filter by Warehouses Id where there is real stock |
Definition at line 3262 of file html.form.class.php.
References $conf, ajax_autocompleter(), dolPrintHTMLForAttribute(), getDolGlobalInt(), getDolGlobalString(), img_picto(), isModEnabled(), and select_produits_list().
| Form::select_produits_fournisseurs | ( | $socid, | |
| $selected = '', | |||
| $htmlname = 'productid', | |||
| $filtertype = '', | |||
| $notused = '', | |||
| $ajaxoptions = array(), | |||
| $hidelabel = 0, | |||
| $alsoproductwithnosupplierprice = 0, | |||
| $morecss = '', | |||
| $placeholder = '', | |||
| $nooutput = 0 ) |
Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
| int | $socid | Id third party |
| string | int | $selected | Preselected product |
| string | $htmlname | Name of HTML Select |
| string | $filtertype | Filter on product type (''=nofilter, 0=product, 1=service) |
| string | $notused | Deprecated. Not used. |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| int<0,1> | $hidelabel Hide label (0=no, 1=yes) | |
| int<0,1> | $alsoproductwithnosupplierprice 1=Add also product without supplier prices | |
| string | $morecss | More CSS |
| string | $placeholder | Placeholder |
| int | $nooutput | 1=do not output but return string instead |
Definition at line 4398 of file html.form.class.php.
References $conf, ajax_autocompleter(), getDolGlobalInt(), getDolGlobalString(), and select_produits_fournisseurs_list().
| Form::select_produits_fournisseurs_list | ( | $socid, | |
| $selected = '', | |||
| $htmlname = 'productid', | |||
| $filtertype = '', | |||
| $notused = '', | |||
| $filterkey = '', | |||
| $statut = -1, | |||
| $outputmode = 0, | |||
| $limit = 100, | |||
| $alsoproductwithnosupplierprice = 0, | |||
| $morecss = '', | |||
| $showstockinlist = 0, | |||
| $placeholder = '' ) |
Return list of suppliers products.
| int | $socid | Id of supplier thirdparty (0 = no filter) |
| string | $selected | Product price preselected (must be 'id' in product_fournisseur_price or 'idprod_IDPROD') |
| string | $htmlname | Name of HTML select |
| ''|int<0,1> | $filtertype Filter on product type (''=nofilter, 0=product, 1=service) | |
| string | $notused | Deprecated. Not used. |
| string | $filterkey | Filter of produdts |
| int | $statut | -1=Return all products, 0=Products not on buy, 1=Products on buy |
| int | $outputmode | 0=HTML select string, 1=Array |
| int | $limit | Limit of line number |
| int | $alsoproductwithnosupplierprice | 1=Add also product without supplier prices |
| string | $morecss | Add more CSS |
| int | $showstockinlist | Show stock information (slower). |
| string | $placeholder | Placeholder |
Definition at line 4455 of file html.form.class.php.
References $conf, ajax_combobox(), dol_escape_htmltag(), dol_print_error(), dol_strlen(), dol_syslog(), dol_trunc(), getDolGlobalInt(), getDolGlobalString(), getEntity(), img_object(), isModEnabled(), measuringUnitString(), price(), price2num(), showDimensionInBestUnit(), Product\TYPE_PRODUCT, Product\TYPE_SERVICE, and vatrate().
Referenced by select_produits_fournisseurs().
| Form::select_produits_list | ( | $selected = 0, | |
| $htmlname = 'productid', | |||
| $filtertype = '', | |||
| $limit = 1000, | |||
| $price_level = 0, | |||
| $filterkey = '', | |||
| $status = 1, | |||
| $finished = 2, | |||
| $outputmode = 0, | |||
| $socid = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = 'maxwidth500', | |||
| $hidepriceinlabel = 0, | |||
| $warehouseStatus = '', | |||
| $status_purchase = -1, | |||
| $warehouseId = 0 ) |
Return list of products for a customer.
Not optimized for high number of product, use instead select_produits() for large databases (so select_produits will call this function with a $limit parameter).
| int | $selected | Preselected product |
| string | $htmlname | Name of select html |
| string | $filtertype | Filter on product type (''=nofilter, 0=product, 1=service) |
| int | $limit | Limit on number of returned lines |
| int | $price_level | Level of price to show |
| string | $filterkey | Filter on product |
| int<-1,1> | $status -1=Return all products, 0=Products not on sell, 1=Products on sell | |
| int | $finished | Filter on finished field: 2=No filter |
| int | $outputmode | 0=HTML select string, 1=Array |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int | $forcecombo | Force to use combo box |
| string | $morecss | Add more css on select |
| int<0,1> | $hidepriceinlabel 1=Hide prices in label | |
| ''|'warehouseopen'|'warehouseclosed'|'warehouseinternal' | $warehouseStatus Warehouse status filter to group/count stock. Following comma separated filter options can be used. 'warehouseopen' = count products from open warehouses, 'warehouseclosed' = count products from closed warehouses, 'warehouseinternal' = count products from warehouses for internal correct/transfer only | |
| int<-1,1> | $status_purchase Purchase status -1=Return all products, 0=Products not on purchase, 1=Products on purchase | |
| int | $warehouseId | Filter by Warehouses Id where there is real stock |
Definition at line 3595 of file html.form.class.php.
References ajax_combobox(), constructProductListOption(), dol_now(), dol_print_error(), dol_syslog(), getDolGlobalInt(), getDolGlobalString(), getEntity(), isModEnabled(), price2num(), Entrepot\STATUS_CLOSED, Entrepot\STATUS_OPEN_ALL, and Entrepot\STATUS_OPEN_INTERNAL.
Referenced by select_produits().
| Form::select_remises | ( | $selected, | |
| $htmlname, | |||
| $filter, | |||
| $socid, | |||
| $maxvalue = 0 ) |
Return HTML combo list of absolute discounts.
| string | $selected | Id Fixed reduction preselected |
| string | $htmlname | Name of the form field |
| string | $filter | Optional filter criteria. Must be a sanitized string. |
| int | $socid | Id of thirdparty |
| int | $maxvalue | Max value for lines that can be selected |
Definition at line 2525 of file html.form.class.php.
References $conf, ajax_combobox(), dol_print_error(), dol_syslog(), dol_trunc(), getDolGlobalString(), and price().
| Form::select_thirdparty_list | ( | $selected = '', | |
| $htmlname = 'socid', | |||
| $filter = '', | |||
| $showempty = '', | |||
| $showtype = 0, | |||
| $forcecombo = 0, | |||
| $events = array(), | |||
| $filterkey = '', | |||
| $outputmode = 0, | |||
| $limit = 0, | |||
| $morecss = 'minwidth100', | |||
| $moreparam = '', | |||
| $multiple = false, | |||
| $excludeids = array(), | |||
| $showcode = 0 ) |
Output html form to select a third party.
Note: you must use the select_company() to get the component to select a third party. This function must only be called by select_company.
| string | $selected | Preselected type |
| string | $htmlname | Name of field in form |
| string | $filter | Optional filter criteria. WARNING: Must be a USF syntax. |
| string|int<0,1> | $showempty Add an empty field (Can be '1' or text to use on empty line like 'SelectThirdParty') | |
| int<0,1> | $showtype Show third party nature in combolist (customer, prospect or supplier) | |
| int | $forcecombo | Force to use standard HTML select component without beautification |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| string | $filterkey | Filter on key value |
| int<0,1> | $outputmode 0=HTML select string, 1=Array | |
| int | $limit | Limit number of answers |
| string | $morecss | Add more css styles to the SELECT component |
| string | $moreparam | Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container |
| bool | $multiple | add [] in the name of element and add 'multiple' attribute |
| string[] | $excludeids | Exclude IDs from the select combo |
| int<0,1> | $showcode Show code in list |
Definition at line 2003 of file html.form.class.php.
References ajax_combobox(), dol_escape_htmltag(), dol_print_error(), dol_syslog(), getDolGlobalInt(), getDolGlobalString(), getEntity(), isModEnabled(), and testSqlAndScriptInject().
Referenced by select_company().
| Form::select_type_fees | ( | $selected = '', | |
| $htmlname = 'type', | |||
| $showempty = 0 ) |
Return list of types of notes.
| string | $selected | Preselected type |
| string | $htmlname | Name of field in form |
| int | $showempty | Add an empty field |
Definition at line 1780 of file html.form.class.php.
References dol_syslog(), info_admin(), and load_cache_types_fees().
| Form::select_type_of_lines | ( | $selected = '', | |
| $htmlname = 'type', | |||
| $showempty = 0, | |||
| $hidetext = 0, | |||
| $forceall = 0, | |||
| $morecss = "", | |||
| $useajaxcombo = 1 ) |
Return list of types of lines (product or service) Example: 0=product, 1=service, 9=other (for external module)
| string | $selected | Preselected type |
| string | $htmlname | Name of field in html form |
| int<0,1>|string | $showempty Add an empty field | |
| int | $hidetext | Do not show label 'Type' before combo box (used only if there is at least 2 choices to select) |
| integer | $forceall | 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service') |
| string | $morecss | More css |
| int | $useajaxcombo | 1=Use ajaxcombo |
Definition at line 1661 of file html.form.class.php.
References ajax_combobox(), getDolGlobalString(), and isModEnabled().
| Form::select_types_paiements | ( | $selected = '', | |
| $htmlname = 'paiementtype', | |||
| $filtertype = '', | |||
| $format = 0, | |||
| $empty = 1, | |||
| $noadmininfo = 0, | |||
| $maxlength = 0, | |||
| $active = 1, | |||
| $morecss = '', | |||
| $nooutput = 0 ) |
Return list of payment methods Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want.
| string | $selected | Id or code or preselected payment mode |
| string | $htmlname | Name of select field |
| string | $filtertype | To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz)) |
| int | $format | 0=id+label, 1=code+code, 2=code+label, 3=id+code |
| int | $empty | 1=can be empty, 0 otherwise |
| int | $noadmininfo | 0=Add admin info, 1=Disable admin info |
| int | $maxlength | Max length of label |
| int | $active | Active or not, -1 = all |
| string | $morecss | Add more CSS on select tag |
| int<0,1> | $nooutput 1=Return string, do not send to output |
Definition at line 5542 of file html.form.class.php.
References $id, ajax_combobox(), dol_syslog(), dol_trunc(), getDolGlobalString(), info_admin(), and load_cache_types_paiements().
| Form::select_users | ( | $selected = '', | |
| $htmlname = 'userid', | |||
| $show_empty = 0, | |||
| $exclude = null, | |||
| $disabled = 0, | |||
| $include = '', | |||
| $enableonly = array(), | |||
| $force_entity = '0' ) |
Return the HTML select list of users.
| string | $selected | Id user preselected |
| string | $htmlname | Field name in form |
| int<0,1> | $show_empty 0=list without null value, 1=add an unknown value | |
| int[] | $exclude | Array list of users id to exclude |
| int<0,1> | $disabled If select list must be disabled | |
| int[]|''|'hierarchy'|'hierarchyme' | $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me | |
| int[] | int | $enableonly | Array list of users id to be enabled. All other must be disabled |
| string | $force_entity | '0' or Ids of environment to force |
Definition at line 2619 of file html.form.class.php.
References select_dolusers().
|
static |
Return a HTML select string, built from an array of key+value.
Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
| string | $htmlname | Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect |
| array<int|string,array{label:string,data-html?:string,data-noparam?:int<0,1>,data-placeholder?:string,disable?:int<0,1>,css?:string}>|string[] | $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) | |
| string | string[] | int | $id | Preselected key or array of preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record. |
| int<0,1>|string | $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or ' ', If 'Placeholder string': key is -1 and value is the string), <0 to add an empty value with key that is this value. | |
| int<0,1> | $key_in_label 1 to show key into label with format "[key] value" | |
| int<0,1> | $value_as_key 1 to use value as key | |
| string | $moreparam | Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container |
| int<0,1> | $translate 1=Translate and encode value | |
| int<0,max> | $maxlen Length maximum for labels | |
| int<0,1> | $disabled Html select box is disabled | |
| ''|'ASC'|'DESC'|'NONE'|'POS' | $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' or 'POS' = Do not sort, we keep original order | |
| string | $morecss | Add more class to css styles |
| int<0,1> | $addjscombo Add js combo | |
| string | $moreparamonempty | Add more param on the empty option line. Not used if show_empty not set |
| int<0,2> | $disablebademail 1=Check if a not valid email, 2=Check string '—', and if found into value, disable and colorize entry | |
| int<0,1> | $nohtmlescape No html escaping (not recommended, use 'data-html' if you need to use label with HTML content). |
Reimplemented in FormWebPortal.
Definition at line 10104 of file html.form.class.php.
References $conf, $id, ajax_combobox(), dol_escape_htmltag(), dol_trunc(), dolPrintHTMLForAttribute(), getDolGlobalString(), and string.
Referenced by ActionsCardCommon\assign_values(), editfieldval(), FormCompany\form_prospect_level(), formconfirm(), FormCompany\formProspectContactLevel(), FormCompany\formThirdpartyType(), FormMail\get_form(), Ticket\printSelectStatus(), BookKeeping\select_account(), FormAccounting\select_account(), FormAccounting\select_auxaccount(), FormAccounting\select_bookkeeping_importkey(), FormAccounting\select_journal(), FormMailing\selectDestinariesStatus(), FormOrder\selectInputMethod(), dolReceiptPrinter\selectProfilePrinter(), FormOrder\selectSupplierOrderStatus(), FormBank\selectTypeOfBankAccount(), dolReceiptPrinter\selectTypePrinter(), and FormAccounting\selectyear_accountancy_bookkepping().
|
static |
Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL.
Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice.
| string | $htmlname | Name of html select area |
| string | $url | Url. Must return a json_encode of array(key=>array('text'=>'A text', 'url'=>'An url'), ...) |
| string | $id | Preselected key |
| string | $moreparam | Add more parameters onto the select tag |
| string | $moreparamtourl | Add more parameters onto the Ajax called URL |
| int | $disabled | Html select box is disabled |
| int | $minimumInputLength | Minimum Input Length |
| string | $morecss | Add more class to css styles |
| int | $callurlonselect | If set to 1, some code is added so an url return by the ajax is called when value is selected. |
| string | $placeholder | String to use as placeholder |
| int<0,1> | $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) |
Definition at line 10258 of file html.form.class.php.
References $conf, dol_escape_js(), and getDolGlobalString().
|
static |
Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter.
Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice.
| string | $htmlname | Name of html select area |
| array<string,array{text:string,url:string}> | $array Array (key=>array('text'=>'A text', 'url'=>'An url'), ...) | |
| string | $id | Preselected key |
| string | $moreparam | Add more parameters onto the select tag |
| int<0,1> | $disableFiltering If set to 1, results are not filtered with searched string | |
| int<0,1> | $disabled Html select box is disabled | |
| int | $minimumInputLength | Minimum Input Length |
| string | $morecss | Add more class to css styles |
| int<0,1> | $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. | |
| string | $placeholder | String to use as placeholder |
| int<0,1> | $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) | |
| string | $textfortitle | Text to show on title. |
Definition at line 10363 of file html.form.class.php.
References dol_escape_js().
| Form::selectAvailabilityDelay | ( | $selected = '', | |
| $htmlname = 'availid', | |||
| $filtertype = '', | |||
| $addempty = 0, | |||
| $morecss = '', | |||
| $noouput = 0 ) |
Return the list of type of delay available.
| ''|int | $selected Id for preselected delay typ | |
| string | $htmlname | Name for the selected zone |
| string|int<0,1> | $filtertype To add a filter | |
| int<0,1>|string | $addempty Add empty entry | |
| string | $morecss | More CSS |
| int | $noouput | Use 1 to return the output and not print it. |
Definition at line 5164 of file html.form.class.php.
References $id, ajax_combobox(), dol_escape_htmltag(), dol_syslog(), info_admin(), and load_cache_availability().
| Form::selectCategories | ( | $categtype, | |
| $htmlname, | |||
| $object = null ) |
Return HTML component to select a category.
| string | $categtype | Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) should be avoid and is keptfor internal use only. |
| string | $htmlname | Html name |
| ?CommonObject | $object | Object |
Definition at line 6343 of file html.form.class.php.
References $c, $object, dol_escape_htmltag(), dol_escape_js(), dolButtonToOpenUrlInDialogPopup(), getDolGlobalString(), GETPOST(), GETPOSTISARRAY(), img_picto(), multiselectarray(), select_all_categories(), and type.
| Form::selectcontacts | ( | $socid, | |
| $selected = array(), | |||
| $htmlname = 'contactid', | |||
| $showempty = 0, | |||
| $exclude = '', | |||
| $limitto = '', | |||
| $showfunction = 0, | |||
| $morecss = '', | |||
| $options_only = 0, | |||
| $showsoc = 0, | |||
| $forcecombo = 0, | |||
| $events = array(), | |||
| $moreparam = '', | |||
| $htmlid = '', | |||
| $multiple = false, | |||
| $disableifempty = 0, | |||
| $filter = '' ) |
Return HTML code of the SELECT of list of all contacts (for a third party or all).
This also set the number of contacts found into $this->num Note: you must use the select_contact() to get the component to select a contact. This function must only be called by select_contact.
| int | $socid | Id of third party or 0 for all or -1 for empty list |
| string[] | int | string | $selected | Array of ID of preselected contact id |
| string | $htmlname | Name of HTML field ('none' for a not editable field) |
| int<0,3>|string | $showempty 0=no empty value, 1=add an empty value, 2=add line 'Internal' (used by user edit), 3=add an empty value only if more than one record into list | |
| string | $exclude | List of contacts id to exclude |
| string | $limitto | Disable answers that are not id in this array list |
| int<0,1> | $showfunction Add function into label | |
| string | $morecss | Add more class to class style |
| int | $options_only | 1=Return options only (for ajax treatment), 2=Return array |
| int<0,1> | $showsoc Add company into label | |
| int | $forcecombo | Force to use combo box (so no ajax beautify effect) |
| array<array{method:string,url:string,htmlname:string,params:array<string,string>}> | $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) | |
| string | $moreparam | Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container |
| string | $htmlid | Html id to use instead of htmlname |
| bool | $multiple | add [] in the name of element and add 'multiple' attribute |
| integer | $disableifempty | Set tag 'disabled' on select if there is no choice |
| string | $filter | Optional filter criteria. You must use the USF (Universal Search Filter) syntax, example: '(s.client:in:1,3)' Do not use a filter coming from input of users. |
Definition at line 2252 of file html.form.class.php.
References $conf, ajax_combobox(), dol_print_error(), dol_syslog(), getDolGlobalInt(), getDolGlobalString(), getEntity(), and testSqlAndScriptInject().
Referenced by select_contact().
| Form::selectCurrency | ( | $selected = '', | |
| $htmlname = 'currency_id', | |||
| $mode = 0, | |||
| $useempty = '' ) |
Returns the list of currencies in the user's language.
| string | $selected | Preselected currency code |
| string | $htmlname | Name of HTML select list |
| int | $mode | 0 = Add currency symbol into label, 1 = Add 3 letter iso code, 2 = Add both symbol and code |
| string | $useempty | '1'=Allow empty value |
Reimplemented in FormWebPortal.
Definition at line 7732 of file html.form.class.php.
References ajax_combobox(), dol_escape_htmltag(), dol_string_nohtmltag(), and info_admin().
| Form::selectDate | ( | $set_time = '', | |
| $prefix = 're', | |||
| $h = 0, | |||
| $m = 0, | |||
| $empty = 0, | |||
| $form_name = "", | |||
| $d = 1, | |||
| $addnowlink = 0, | |||
| $disabled = 0, | |||
| $fullday = '', | |||
| $addplusone = '', | |||
| $adddateof = '', | |||
| $openinghours = '', | |||
| $stepminutes = 1, | |||
| $labeladddateof = '', | |||
| $placeholder = '', | |||
| $gm = 'auto', | |||
| $calendarpicto = '' ) |
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
| int|'' | $set_time Preselected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). Using a "string date" is deprecated and excluded from the param type. | |
| string | $prefix | Prefix for fields name |
| int | $h | 1 or 2=Show also hours (2=hours on a new line), -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 or 4 (4=hours on a new line)=Show hour always empty |
| int | $m | 1=Show also minutes, -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show minutes always empty |
| int | $empty | 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only |
| string | $form_name | Not used |
| int<0,1> | $d 1=Show days, month, years | |
| int<0,2> | $addnowlink Add a link "Now", 1 with server time, 2 with local computer time | |
| int<0,1> | $disabled Disable input fields | |
| int | string | $fullday | When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if 'fulldaystart') or 23:59 (if value is 'fulldayend') |
| string | $addplusone | Add a link "+1 hour". Value must be name of another selectDate field. |
| int|string|array<array{adddateof:int,labeladddateof?:string}> | $adddateof Add a link "Date of ..." using the following date. Must be array(array('adddateof' => ..., 'labeladddateof' => ...)) | |
| string | $openinghours | Specify hour start and hour end for the select ex 8,20 |
| int | $stepminutes | Specify step for minutes between 1 and 30 |
| string | $labeladddateof | Label to use for the $adddateof parameter. Deprecated. Used only when $adddateof is not an array. |
| string | $placeholder | Placeholder |
| 'auto'|'gmt'|'tzserver'|'tzuserrel' | $gm 'auto' (for backward compatibility, avoid this), 'gmt' or 'tzserver' or 'tzuserrel' | |
| string | $calendarpicto | URL of the icon/image used to display the calendar |
Definition at line 8276 of file html.form.class.php.
References $conf, button, dol_escape_htmltag(), dol_escape_js(), dol_now(), dol_print_date(), getDolGlobalInt(), getDolGlobalString(), getDolUserString(), and getServerTimeZoneInt().
Referenced by editfieldval(), formconfirm(), and FormWebPortal\inputDate().
| Form::selectDateToDate | ( | $set_time = '', | |
| $set_time_end = '', | |||
| $prefix = 're', | |||
| $empty = 0, | |||
| $forcenewline = 0 ) |
Show 2 HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
| int|'' | $set_time Preselected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). | |
| integer | string | $set_time_end | Preselected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). |
| string | $prefix | Prefix for fields name |
| int<0,2> | $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only | |
| int | $forcenewline | Force new line between the 2 dates. |
Definition at line 8236 of file html.form.class.php.
| Form::selectEstablishments | ( | $selected = '', | |
| $htmlname = 'entity', | |||
| $status = 0, | |||
| $filtre = '', | |||
| $useempty = 0, | |||
| $moreattrib = '' ) |
Return a HTML select list of establishment.
| string | $selected | Id establishment preselected |
| string | $htmlname | Name of select zone |
| int | $status | Status of searched establishment (0=open, 1=closed, 2=both) |
| string | $filtre | To filter list. This parameter must not come from input of users |
| int | $useempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
| string | $moreattrib | To add more attribute on select |
Definition at line 6195 of file html.form.class.php.
References dol_print_error(), and dol_syslog().
| Form::selectExpenseCategories | ( | $selected = '', | |
| $htmlname = 'fk_c_exp_tax_cat', | |||
| $useempty = 0, | |||
| $excludeid = array(), | |||
| $target = '', | |||
| $default_selected = 0, | |||
| $params = array(), | |||
| $info_admin = 1 ) |
Return HTML to show the select of expense categories.
| string | $selected | preselected category |
| string | $htmlname | name of HTML select list |
| int<0,1> | $useempty 1=Add empty line | |
| int[] | $excludeid | id to exclude |
| string | $target | htmlname of target select to bind event |
| int | $default_selected | default category to select if fk_c_type_fees change = EX_KME |
| array<string,int|string> | $params param to give | |
| int<0,1> | $info_admin Show the tooltip help picto to setup list |
Definition at line 12167 of file html.form.class.php.
References ajax_combobox(), getEntity(), and info_admin().
| Form::selectExpenseFees | ( | $selected = '', | |
| $htmlname = 'fk_c_type_fees', | |||
| $useempty = 0, | |||
| $allchoice = 1, | |||
| $useid = 0 ) |
Return HTML to show a select of expense.
| string | $selected | preselected category |
| string | $htmlname | name of HTML select list |
| integer | $useempty | 1=Add empty choice |
| integer | $allchoice | 1=Add all choice |
| integer | $useid | 0=use 'code' as key, 1=use 'id' as key |
Definition at line 12293 of file html.form.class.php.
| Form::selectExpenseRanges | ( | $selected = '', | |
| $htmlname = 'fk_range', | |||
| $useempty = 0 ) |
Return HTML to show the select ranges of expense range.
| string | $selected | Preselected category |
| string | $htmlname | Name of HTML select list |
| integer | $useempty | 1=Add empty line |
Definition at line 12257 of file html.form.class.php.
| Form::selectForFormsList | ( | $objecttmp, | |
| $htmlname, | |||
| $preselectedvalue, | |||
| $showempty = '', | |||
| $searchkey = '', | |||
| $placeholder = '', | |||
| $morecss = '', | |||
| $moreparams = '', | |||
| $forcecombo = 0, | |||
| $outputmode = 0, | |||
| $disabled = 0, | |||
| $sortfield = '', | |||
| $filter = '', | |||
| $sortorder = 'ASC' ) |
Output html form to select an object.
Note, this function is called by selectForForms or by ajax selectobject.php
| CommonObject | $objecttmp | Object to know the table to scan for combo. |
| string | $htmlname | Name of HTML select component |
| int | $preselectedvalue | Preselected value (ID of element) |
| string|int<0,1> | $showempty ''=empty values not allowed, 'string'=value show if we allow empty values (for example 'All', ...) | |
| string | $searchkey | Search value |
| string | $placeholder | Place holder |
| string | $morecss | More CSS |
| string | $moreparams | More params provided to ajax call |
| int | $forcecombo | Force to load all values and output a standard combobox (with no beautification) |
| int | $outputmode | 0=HTML select string, 1=Array |
| int | $disabled | 1=Html component is disabled |
| string | $sortfield | Sort field |
| string | $filter | Add more filter (Universal Search Filter) |
| string | $sortorder | Sort order field |
Definition at line 9783 of file html.form.class.php.
References ajax_combobox(), dol_escape_htmltag(), dol_eval(), dol_print_error(), getDolGlobalInt(), getEntity(), and natural_search().
Referenced by FormWebPortal\selectForForms().
| Form::selectInputReason | ( | $selected = '', | |
| $htmlname = 'demandreasonid', | |||
| $exclude = '', | |||
| $addempty = 0, | |||
| $morecss = '', | |||
| $notooltip = 0 ) |
Return list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason.
| string | $selected | Id or code of type origin to select by default |
| string | $htmlname | Nom de la zone select |
| string | $exclude | To exclude a code value (Example: SRC_PROP) |
| int | $addempty | Add an empty entry |
| string | $morecss | Add more css to the HTML select component |
| int | $notooltip | Do not show the tooltip for admin |
Definition at line 5266 of file html.form.class.php.
References $id, ajax_combobox(), and info_admin().
| Form::selectInvoiceForTimeProject | ( | $socid = -1, | |
| $selected = '', | |||
| $htmlname = 'invoiceid', | |||
| $maxlength = 24, | |||
| $option_only = 0, | |||
| $show_empty = '1', | |||
| $discard_closed = 0, | |||
| $forcefocus = 0, | |||
| $disabled = 0, | |||
| $morecss = 'maxwidth500', | |||
| $projectsListId = '', | |||
| $showproject = 'all', | |||
| $usertofilter = null ) |
Output a combo list with invoices for a project.
| int | $socid | Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) |
| string | $selected | Id invoice preselected |
| string | $htmlname | Name of HTML select |
| int | $maxlength | Maximum length of label |
| int | $option_only | Return only html options lines without the select tag |
| string | $show_empty | Add an empty line ('1' or string to show for empty line) |
| int | $discard_closed | Discard closed projects (0=Keep,1=hide completely,2=Disable) |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int | $disabled | Disabled |
| string | $morecss | More css added to the select component |
| string | $projectsListId | ''=Automatic filter on project allowed. List of id=Filter on project ids. |
| string | $showproject | 'all' = Show project info, ''=Hide project info |
| User | $usertofilter | User object to use for filtering |
Definition at line 12349 of file html.form.class.php.
| Form::selectInvoiceRec | ( | $selected = '', | |
| $htmlname = 'facrecid', | |||
| $maxlength = 24, | |||
| $option_only = 0, | |||
| $show_empty = '1', | |||
| $forcefocus = 0, | |||
| $disabled = 0, | |||
| $morecss = 'maxwidth500' ) |
Output a combo list with invoices qualified for a third party TODO Bad method.
This is used by viewcat.php. We must use a generic method in viewcat to use an ajax search ad remove this one that download all the database.
| string | $selected | Id invoice preselected |
| string | $htmlname | Name of HTML select |
| int | $maxlength | Maximum length of label |
| int | $option_only | Return only html options lines without the select tag |
| string | $show_empty | Add an empty line ('1' or string to show for empty line) |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int | $disabled | Disabled |
| string | $morecss | More css added to the select component |
Definition at line 12494 of file html.form.class.php.
References $conf, ajax_combobox(), dol_syslog(), dol_trunc(), and getEntity().
| Form::selectMassAction | ( | $selected, | |
| $arrayofaction, | |||
| $alwaysvisible = 0, | |||
| $name = 'massaction', | |||
| $cssclass = 'checkforselect' ) |
Generate select HTML to choose massaction.
| string | $selected | Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. |
| array<string,string> | $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. | |
| int | $alwaysvisible | 1=select button always visible |
| string | $name | Name for massaction |
| string | $cssclass | CSS class used to check for select |
Definition at line 889 of file html.form.class.php.
References $conf, ajax_combobox(), and dol_escape_htmltag().
| Form::selectMembers | ( | $selected = '', | |
| $htmlname = 'adherentid', | |||
| $filtertype = '', | |||
| $limit = 0, | |||
| $status = 1, | |||
| $selected_input_value = '', | |||
| $hidelabel = 0, | |||
| $ajaxoptions = array(), | |||
| $socid = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '', | |||
| $selected_combinations = null, | |||
| $nooutput = 0, | |||
| $excludeids = array() ) |
Return list of members in Ajax if Ajax activated or go to selectTicketsList.
| string | $selected | Preselected tickets |
| string | $htmlname | Name of HTML select field (must be unique in page). |
| string | $filtertype | To add a filter |
| int | $limit | Limit on number of returned lines |
| int | $status | Ticket status |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int<0,3> | $hidelabel Hide label (0=no, 1=yes, 2=show search icon before and placeholder, 3 search icon after) | |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int | $forcecombo | Force to use combo box |
| string | $morecss | Add more css on select |
| array<string,string> | $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) | |
| int<0,1> | $nooutput No print, return the output into a string | |
| string[] | $excludeids | Exclude IDs from the select combo |
Definition at line 9340 of file html.form.class.php.
| Form::selectMembersList | ( | $selected = '', | |
| $htmlname = 'adherentid', | |||
| $filtertype = '', | |||
| $limit = 20, | |||
| $filterkey = '', | |||
| $status = 1, | |||
| $outputmode = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '', | |||
| $excludeids = array() ) |
Return list of adherents.
Called by selectMembers.
| string | $selected | Preselected adherent |
| string | $htmlname | Name of select html |
| string | $filtertype | Filter on adherent type |
| int | $limit | Limit on number of returned lines |
| string | $filterkey | Filter on member status |
| int | $status | Member status |
| int | $outputmode | 0=HTML select string, 1=Array |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int | $forcecombo | Force to use combo box |
| string | $morecss | Add more css on select |
| string[] | $excludeids | Exclude IDs from the select combo |
Definition at line 9409 of file html.form.class.php.
| Form::selectModelMail | ( | $prefix, | |
| $modelType = '', | |||
| $default = 0, | |||
| $addjscombo = 0, | |||
| $selected = 0, | |||
| $morecss = '' ) |
selectModelMail
| string | $prefix | Prefix |
| string | $modelType | Model type |
| int<0,1> | $default 1=Show also Default mail template | |
| int<0,1> | $addjscombo Add js combobox | |
| int | string | $selected | Selected model mail |
| string | $morecss | More css added to the select component |
Definition at line 12960 of file html.form.class.php.
References ajax_combobox().
| Form::selectMultiCurrency | ( | $selected = '', | |
| $htmlname = 'multicurrency_code', | |||
| $useempty = 0, | |||
| $filter = '', | |||
| $excludeConfCurrency = false, | |||
| $morecss = 'maxwidth200 widthcentpercentminusx' ) |
Return array of currencies in user language.
| string | $selected | Preselected currency code |
| string | $htmlname | Name of HTML select list |
| integer | $useempty | 1=Add empty line |
| string | $filter | Optional filter criteria (example: 'code <> x', ' in (1,3)'). Do not use external string here. |
| bool | $excludeConfCurrency | false = If company current currency not in table, we add it into list. Should always be available. true = we are in currency_rate update , we don't want to see conf->currency in select |
| string | $morecss | More css |
Definition at line 7790 of file html.form.class.php.
References $conf, ajax_combobox(), and getEntity().
| Form::selectPhoneCode | ( | $selected = '', | |
| $htmlname = 'phone_code', | |||
| $morecss = 'maxwidth150', | |||
| $showempty = 0, | |||
| $country_id_hint = 0 ) |
Return a select list of country phone calling codes.
| string | $selected | Preselected phone code value (e.g. "+33") |
| string | $htmlname | Name of HTML select element |
| string | $morecss | More CSS classes |
| int | $showempty | Show empty option (1) or not (0) |
| int | $country_id_hint | Country ID to prefer when multiple countries share a code |
Definition at line 1136 of file html.form.class.php.
References ajax_combobox(), dol_print_error(), dol_string_nohtmltag(), dol_string_unaccent(), dol_syslog(), and picto_from_langcode().
Referenced by showPhoneInput().
| Form::selectPriceBaseType | ( | $selected = '', | |
| $htmlname = 'price_base_type', | |||
| $addjscombo = 0 ) |
Selection HT or TTC.
| string | $selected | Preselected Id |
| string | $htmlname | Name of the selected zone |
| int | $addjscombo | Add js combo |
Definition at line 5643 of file html.form.class.php.
References $id, and ajax_combobox().
| Form::selectProjects | ( | $selected = '', | |
| $htmlname = 'projectid', | |||
| $filtertype = '', | |||
| $limit = 0, | |||
| $status = 1, | |||
| $selected_input_value = '', | |||
| $hidelabel = 0, | |||
| $ajaxoptions = array(), | |||
| $socid = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '', | |||
| $selected_combinations = null, | |||
| $nooutput = 0 ) |
Return list of projects in Ajax if Ajax activated or go to selectTicketsList.
| string | $selected | Preselected tickets |
| string | $htmlname | Name of HTML select field (must be unique in page). |
| string | $filtertype | To add a filter |
| int<0,max> | $limit Limit on number of returned lines | |
| int | $status | Not used |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int<0,3> | $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) | |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int<0,1> | $forcecombo Force to use combo box | |
| string | $morecss | Add more css on select |
| array<string,string> | $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) | |
| int<0,1> | $nooutput No print, return the output into a string |
Definition at line 9108 of file html.form.class.php.
| Form::selectProjectsList | ( | $selected = '', | |
| $htmlname = 'projectid', | |||
| $filtertype = '', | |||
| $limit = 20, | |||
| $filterkey = '', | |||
| $status = 1, | |||
| $outputmode = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '' ) |
Return list of projects.
Called by selectProjects.
| string | $selected | Preselected project |
| string | $htmlname | Name of select html |
| string | $filtertype | Filter on project type |
| int | $limit | Limit on number of returned lines |
| string | $filterkey | Filter on project ref or subject |
| int | $status | Not used |
| int | $outputmode | 0=HTML select string, 1=Array |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int | $forcecombo | Force to use combo box |
| string | $morecss | Add more css on select |
Definition at line 9173 of file html.form.class.php.
| Form::selectRib | ( | $selected = '', | |
| $htmlname = 'ribcompanyid', | |||
| $filtre = '', | |||
| $useempty = 0, | |||
| $moreattrib = '', | |||
| $showibanbic = 0, | |||
| $morecss = '', | |||
| $nooutput = 0 ) |
Return a HTML select list of bank accounts customer.
| int|'' | $selected Id account preselected | |
| string | $htmlname | Name of select zone |
| string | $filtre | To filter the list. This parameter must not come from input of users. Use USF syntax. |
| int | string | $useempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
| string | $moreattrib | To add more attribute on select |
| int | $showibanbic | Show iban/bic in label |
| string | $morecss | More CSS |
| int<0,1> | $nooutput 1=Return string, do not send to output |
Definition at line 6118 of file html.form.class.php.
References ajax_combobox(), dol_print_error(), dol_syslog(), and dolDecrypt().
Referenced by formRib().
| Form::selectShippingMethod | ( | $selected = '', | |
| $htmlname = 'shipping_method_id', | |||
| $filtre = '', | |||
| $useempty = 0, | |||
| $moreattrib = '', | |||
| $noinfoadmin = 0, | |||
| $morecss = '' ) |
Return a HTML select list of shipping mode.
| string | $selected | Id shipping mode preselected |
| string | $htmlname | Name of select zone |
| string | $filtre | To filter list. This parameter must not come from input of users. Use USF syntax. |
| int | $useempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
| string | $moreattrib | To add more attribute on select |
| int | $noinfoadmin | 0=Add admin info, 1=Disable admin info |
| string | $morecss | More CSS |
Definition at line 5807 of file html.form.class.php.
References ajax_combobox(), dol_print_error(), dol_syslog(), and info_admin().
Referenced by formSelectShippingMethod().
| Form::selectSituationInvoices | ( | $selected = '', | |
| $socid = 0 ) |
Creates HTML last in cycle situation invoices selector.
| string | $selected | Preselected ID |
| int | $socid | Company ID |
Definition at line 5897 of file html.form.class.php.
References dol_syslog(), and getEntity().
| Form::selectTickets | ( | $selected = '', | |
| $htmlname = 'ticketid', | |||
| $filtertype = '', | |||
| $limit = 0, | |||
| $status = 1, | |||
| $selected_input_value = '', | |||
| $hidelabel = 0, | |||
| $ajaxoptions = array(), | |||
| $socid = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '', | |||
| $selected_combinations = null, | |||
| $nooutput = 0 ) |
Return list of tickets in Ajax if Ajax activated or go to selectTicketsList.
| string | $selected | Preselected tickets |
| string | $htmlname | Name of HTML select field (must be unique in page). |
| string | $filtertype | To add a filter |
| int | $limit | Limit on number of returned lines |
| int | $status | Ticket status |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int<0,3> | $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) | |
| array<string,string|string[]> | $ajaxoptions Options for ajax_autocompleter | |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int<0,1> | $forcecombo Force to use combo box | |
| string | $morecss | Add more css on select |
| array<string,string> | $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) | |
| int<0,1> | $nooutput No print, return the output into a string |
Definition at line 8882 of file html.form.class.php.
| Form::selectTicketsList | ( | $selected = '', | |
| $htmlname = 'ticketid', | |||
| $filtertype = '', | |||
| $limit = 20, | |||
| $filterkey = '', | |||
| $status = 1, | |||
| $outputmode = 0, | |||
| $showempty = '1', | |||
| $forcecombo = 0, | |||
| $morecss = '' ) |
Return list of tickets.
Called by selectTickets.
| string | $selected | Preselected ticket |
| string | $htmlname | Name of select html |
| string | $filtertype | Filter on ticket type |
| int | $limit | Limit on number of returned lines |
| string | $filterkey | Filter on ticket ref or subject |
| int | $status | Ticket status |
| int | $outputmode | 0=HTML select string, 1=Array |
| string|int<0,1> | $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. | |
| int | $forcecombo | Force to use combo box |
| string | $morecss | Add more css on select |
Definition at line 8948 of file html.form.class.php.
| Form::selectTransportMode | ( | $selected = '', | |
| $htmlname = 'transportmode', | |||
| $format = 0, | |||
| $empty = 1, | |||
| $noadmininfo = 0, | |||
| $maxlength = 0, | |||
| $active = 1, | |||
| $morecss = '' ) |
Return list of transport mode for intracomm report.
| string | $selected | Id of the transport mode preselected |
| string | $htmlname | Name of the select field |
| int | $format | 0=id+label, 1=code+code, 2=code+label, 3=id+code |
| int | $empty | 1=can be empty, 0 else |
| int | $noadmininfo | 0=Add admin info, 1=Disable admin info |
| int | $maxlength | Max length of label |
| int | $active | Active or not, -1 = all |
| string | $morecss | Add more CSS on select tag |
Definition at line 5734 of file html.form.class.php.
References $id, ajax_combobox(), dol_syslog(), dol_trunc(), info_admin(), and load_cache_transport_mode().
| Form::selectTypeDuration | ( | $prefix, | |
| $selected = 'i', | |||
| $excludetypes = array(), | |||
| $morecss = 'minwidth75 maxwidth100' ) |
selectTypeDuration
| string | $prefix | Prefix |
| string | $selected | Selected duration type |
| string[] | $excludetypes | Array of duration types to exclude. Example array('y', 'm') |
| string | $morecss | Additional css on select |
Definition at line 8742 of file html.form.class.php.
| Form::selectUnits | ( | $selected = '', | |
| $htmlname = 'units', | |||
| $showempty = 0, | |||
| $unit_type = '' ) |
Creates HTML units selector (code => label)
| int|'' | $selected Preselected Unit ID | |
| string | $htmlname | Select name |
| int<0,1> | $showempty Add an empty line | |
| string | $unit_type | Restrict to one given unit type |
Definition at line 5961 of file html.form.class.php.
References ajax_combobox().
| Form::selectyesno | ( | $htmlname, | |
| $value = '', | |||
| $option = 0, | |||
| $disabled = false, | |||
| $useempty = 0, | |||
| $addjscombo = 0, | |||
| $morecss = 'yesno width75', | |||
| $labelyes = 'Yes', | |||
| $labelno = 'No' ) |
Return an html string with a select combo box to choose yes or no.
| string | $htmlname | Name of html select field |
| string|int<min,1> | $value Preselected value | |
| int<0,1> | $option 0 return yes/no, 1 return 1/0 | |
| bool|int<0,1> | $disabled true or false | |
| int<0,1> | $useempty 1=Add empty line | |
| int<0,1> | $addjscombo 1=Add js beautifier on combo box | |
| string | $morecss | More CSS |
| string | $labelyes | Label for Yes |
| string | $labelno | Label for No |
Definition at line 11383 of file html.form.class.php.
References ajax_combobox().
| Form::showbarcode | ( | & | $object, |
| $width = 100, | |||
| $morecss = '' ) |
Return HTML code to output a barcode.
| CommonObject | $object | Object containing data to retrieve file name |
| int | $width | Width of photo |
| string | $morecss | More CSS on img of barcode |
Definition at line 11695 of file html.form.class.php.
References $object.
| Form::showCategories | ( | $id, | |
| $type, | |||
| $rendermode = 0, | |||
| $nolink = 0 ) |
Render list of categories linked to object with id $id and type $type.
| int | $id | Id of object |
| string | $type | Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode using number (0, 1, 2, ...) is deprecated. |
| int<0,1> | $rendermode 0=Default, use multiselect (deprecated). 1=Emulate multiselect (short label, recommended), 2=Emulate multiselect (full path) | |
| int<0,1> | $nolink 1=Do not add html links |
Definition at line 10808 of file html.form.class.php.
References $c, $conf, $id, dol_string_nohtmltag(), dol_trunc(), dolPrintHTML(), dolPrintHTMLForAttribute(), img_picto(), and string.
| Form::showCheckAddButtons | ( | $cssclass = 'checkforaction', | |
| $calljsfunction = 0, | |||
| $massactionname = "massaction" ) |
Return HTML to show the search and clear search button.
| string | $cssclass | CSS class |
| int | $calljsfunction | 0=default. 1=call function initCheckForSelect() after changing status of checkboxes |
| string | $massactionname | Mass action button name that will launch an action on the selected items |
Definition at line 12090 of file html.form.class.php.
References $conf.
| Form::showFilterAndCheckAddButtons | ( | $addcheckuncheckall = 0, | |
| $cssclass = 'checkforaction', | |||
| $calljsfunction = 0, | |||
| $massactionname = "massaction" ) |
Return HTML to show the search and clear search button.
| int | $addcheckuncheckall | Add the check all/uncheck all checkbox (use javascript) and code to manage this |
| string | $cssclass | CSS class |
| int | $calljsfunction | 0=default. 1=call function initCheckForSelect() after changing status of checkboxes |
| string | $massactionname | Mass action name |
Definition at line 12145 of file html.form.class.php.
| Form::showFilterButtons | ( | $pos = '' | ) |
Return HTML to show the search and clear search button.
| string | $pos | Position of colon on the list. Value 'left' or 'right' |
Definition at line 12072 of file html.form.class.php.
| Form::showLinkedObjectBlock | ( | $object, | |
| $morehtmlright = '', | |||
| $compatibleImportElementsList = array(), | |||
| $title = 'RelatedObjects' ) |
Show linked object block.
| CommonObject | $object | Object we want to show links to |
| string | $morehtmlright | More html to show on right of title |
| array<int,string> | $compatibleImportElementsList Array of compatibles elements object for "import from" action | |
| string | $title | Title |
Definition at line 10881 of file html.form.class.php.
References $conf, $db, $object, dol_buildpath(), dol_syslog(), getDolGlobalInt(), isModEnabled(), and load_fiche_titre().
| Form::showLinkToObjectBlock | ( | $object, | |
| $restrictlinksto = array(), | |||
| $excludelinksto = array(), | |||
| $nooutput = 0 ) |
Show block with links "to link to" other objects.
| CommonObject | $object | Object we want to show links to |
| string[] | null | $restrictlinksto | Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction. |
| string[] | null | $excludelinksto | Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion. |
| int<0,1> | $nooutput 1=Return array with content instead of printing it. |
Definition at line 11058 of file html.form.class.php.
References $conf, $object, dol_escape_htmltag(), dol_print_error(), dol_syslog(), getDolGlobalString(), getEntity(), GETPOST(), and isModEnabled().
| Form::showPhoneInput | ( | $phoneValue, | |
| $htmlname, | |||
| $country_id_hint = 0, | |||
| $picto = 'object_phoning', | |||
| $morecss = 'maxwidth150', | |||
| $maxlength = 0, | |||
| $countrySelectorId = 'selectcountry_id' ) |
Show a self-contained phone input: hidden field + country code dropdown + number text field + JS.
The hidden field (named $htmlname) carries the full phone value (e.g. "+33 644986885") and is the only field POSTed. The code select and number input have no name attribute (or a display-only name). JS keeps the hidden field in sync.
| string | $phoneValue | Stored phone value (e.g. "+33 644986885") or empty |
| string | $htmlname | Base name for the input (e.g. "phone_pro") |
| int | $country_id_hint | Country ID for default phone code (0 = fallback to company country) |
| string | $picto | Picto name (e.g. "object_phoning") |
| string | $morecss | Additional CSS for the text input |
| int | $maxlength | Max length attribute for the text input |
| string | $countrySelectorId | ID of the country select to sync with |
Definition at line 1264 of file html.form.class.php.
References $mysoc, dol_escape_htmltag(), dol_get_phone_code_from_country(), dol_get_trunk_prefix(), dol_parse_phone(), getPhoneInputFieldJs(), getPhoneInputSharedJs(), GETPOST(), img_picto(), selectPhoneCode(), and string.
|
static |
Return HTML code to output a photo.
| string | $modulepart | Key to define module concerned ('societe', 'userphoto', 'memberphoto') |
| Societe | Adherent | Contact | User | CommonObject | $object | Object containing data to retrieve file name |
| int | $width | Width of photo |
| int | $height | Height of photo (auto if 0) |
| int<0,1> | $caneditfield Add edit fields | |
| string | $cssclass | CSS name to use on img for photo |
| string | $imagesize | 'mini', 'small' or '' (original) |
| int<0,1> | $addlinktofullsize Add link to fullsize image | |
| int<0,1> | $cache 1=Accept to use image in cache | |
| ''|'user'|'environment' | $forcecapture '', 'user' (user-facing camera) or 'environment' ('outward-facing camera'). Force the parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''. | |
| int<0,1> | $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module) | |
| int<0,1> | $usesharelinkifavailable Use 1 to use the share=key link if available. This is slower. |
Reimplemented in FormWebPortal.
Definition at line 11738 of file html.form.class.php.
References $conf, $db, $id, $object, dol_hash(), dolPrintHTMLForAttribute(), get_exdir(), getDolGlobalString(), getMaxFileSizeArray(), img_picto(), isModEnabled(), and string.
Referenced by Adherent\getKanbanView(), Contact\getKanbanView(), Societe\getKanbanView(), User\getKanbanView(), User\getLoginUrl(), Adherent\getNomUrl(), Contact\getNomUrl(), User\getNomUrl(), WebPortalMember\getNomUrl(), User\getPhotoUrl(), Adherent\getTooltipContentArray(), Contact\getTooltipContentArray(), Societe\getTooltipContentArray(), User\getTooltipContentArray(), and top_menu_user().
| Form::showrefnav | ( | $object, | |
| $paramid, | |||
| $morehtml = '', | |||
| $shownav = 1, | |||
| $fieldid = 'rowid', | |||
| $fieldref = 'ref', | |||
| $morehtmlref = '', | |||
| $moreparam = '', | |||
| $nodbprefix = 0, | |||
| $morehtmlleft = '', | |||
| $morehtmlstatus = '', | |||
| $morehtmlright = '' ) |
Return a HTML area with the reference of object and a navigation bar for a business object Note: To complete search with a particular filter on select, you can set $object->next_prev_filter set to define SQL criteria.
| CommonObject | $object | Object to show. |
| string | $paramid | Name of parameter to use to name the id into the URL next/previous link. |
| string | $morehtml | More html content to output just before the nav bar. |
| int<0,1> | $shownav Show Condition (navigation is shown if value is 1). | |
| string | $fieldid | Name of field id into database to use for select next and previous (we make the select max and min on this field compared to $object->ref). Use 'none' to disable next/prev. |
| string | $fieldref | Name of field ref of object (object->ref) to show or 'none' to not show ref. |
| string | $morehtmlref | More html to show after ref. |
| string | $moreparam | More param to add in nav link url. Must start with '&...'. |
| int<0,1> | $nodbprefix Do not include DB prefix to forge table name. | |
| string | $morehtmlleft | More html code to show before ref. |
| string | $morehtmlstatus | More html code to show under navigation arrows (status place). |
| string | $morehtmlright | More html code to show after ref. |
Definition at line 11479 of file html.form.class.php.
References $conf, $object, dol_htmlentities(), getDolGlobalInt(), getDolGlobalString(), picto_from_langcode(), and string.
| Form::textwithpicto | ( | $text, | |
| $htmltooltip, | |||
| $direction = 1, | |||
| $type = 'help', | |||
| $extracss = 'valignmiddle', | |||
| $noencodehtmltext = 0, | |||
| $notabs = 3, | |||
| $tooltiptrigger = '', | |||
| $forcenowrap = 0 ) |
Show a text with a picto and a tooltip on picto.
| string | $text | Text to show |
| string | $htmltooltip | Content of tooltip. Warning: By default we keep only tags. |
| int<-1,1> | $direction 1=Icon is after text, -1=Icon is before text, 0=no icon | |
| string | $type | Type of picto ('info', 'infoclickable', 'help', 'helpclickable', 'warning', 'superadmin', 'mypicto@mymodule', ...) or image filepath or 'none' |
| string | $extracss | Add a CSS style to td, div or span tag |
| int<0,1> | $noencodehtmltext Do not encode into html entity the htmltext | |
| int<0,3> | $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span | |
| string | $tooltiptrigger | ''=Tooltip on hover and hidden on smartphone, 'abconsmartphone'=Tooltip on hover and on click on smartphone, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable') |
| int<0,1> | $forcenowrap Force no wrap between text and picto (works with notabs=2 only) |
Definition at line 817 of file html.form.class.php.
References $conf, img_help(), img_picto(), img_warning(), and textwithtooltip().
Referenced by editfieldkey().
| Form::textwithtooltip | ( | $text, | |
| $htmltext, | |||
| $tooltipon = 1, | |||
| $direction = 0, | |||
| $img = '', | |||
| $extracss = '', | |||
| $notabs = 3, | |||
| $incbefore = '', | |||
| $noencodehtmltext = 0, | |||
| $tooltiptrigger = '', | |||
| $forcenowrap = 0 ) |
Show a text and picto with tooltip on text or picto.
Can be called by an instancied $form->textwithtooltip or by a static call Form\textwithtooltip
| string | $text | Text to show |
| string | $htmltext | HTML content of tooltip. Must be HTML/UTF8 encoded. |
| int<0,3> | $tooltipon 1=tooltip on text, 2=tooltip on image, 3=tooltip on both | |
| int<-1,1> | $direction -1=image is before, 0=no image, 1=image is after | |
| string | $img | Html code for image (use img_xxx() function to get it) |
| string | $extracss | Add a CSS style to td tags |
| int<0,3> | $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span | |
| string | $incbefore | Include code before the text |
| int<0,1> | $noencodehtmltext Do not encode into html entity the htmltext | |
| string | $tooltiptrigger | ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key) |
| int<0,1> | $forcenowrap Force no wrap between text and picto (works with notabs=2 only) |
Definition at line 701 of file html.form.class.php.
References dol_escape_htmltag().
Referenced by textwithpicto().
| Form::widgetForTranslation | ( | $fieldname, | |
| $object, | |||
| $perm, | |||
| $typeofdata = 'string', | |||
| $check = '', | |||
| $morecss = '' ) |
Output edit in place form.
| string | $fieldname | Name of the field |
| CommonObject | $object | Object |
| bool|int<0,1> | $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field. | |
| string | $typeofdata | Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) |
| string | $check | Same coe than $check parameter of GETPOST() |
| string | $morecss | More CSS |
Definition at line 479 of file html.form.class.php.
References $conf, $object, getDolGlobalString(), GETPOST(), img_picto(), and picto_from_langcode().