|
dolibarr
13.0.2
|
Class to manage generation of HTML components Only common components must be here. More...
Inheritance diagram for Form:Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| editfieldkey ($text, $htmlname, $preselected, $object, $perm, $typeofdata= 'string', $moreparam= '', $fieldrequired=0, $notabletag=0, $paramid= 'id', $help= '') | |
| Output key field for an editable field. More... | |
| editfieldval ($text, $htmlname, $value, $object, $perm, $typeofdata= 'string', $editvalue= '', $extObject=null, $custommsg=null, $moreparam= '', $notabletag=0, $formatfunc= '', $paramid= 'id') | |
| Output value of a field for an editable field. More... | |
| widgetForTranslation ($fieldname, $object, $perm, $typeofdata= 'string', $check= '', $morecss= '') | |
| Output edit in place form. More... | |
| 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. More... | |
| textwithpicto ($text, $htmltext, $direction=1, $type= 'help', $extracss= '', $noencodehtmltext=0, $notabs=3, $tooltiptrigger= '', $forcenowrap=0) | |
| Show a text with a picto and a tooltip on picto. More... | |
| selectMassAction ($selected, $arrayofaction, $alwaysvisible=0, $name= 'massaction', $cssclass= 'checkforselect') | |
| Generate select HTML to choose massaction. More... | |
| select_country ($selected= '', $htmlname= 'country_id', $htmloption= '', $maxlength=0, $morecss= 'minwidth300', $usecodeaskey= '', $showempty=1, $disablefavorites=0, $addspecialentries=0, $exclude_country_code=array()) | |
| Return combo list of activated countries, into language of user. More... | |
| select_incoterms ($selected= '', $location_incoterms= '', $page= '', $htmlname= 'incoterm_id', $htmloption= '', $forcecombo=1, $events=array()) | |
| Return select list of incoterms. More... | |
| select_type_of_lines ($selected= '', $htmlname= 'type', $showempty=0, $hidetext=0, $forceall=0) | |
| Return list of types of lines (product or service) Example: 0=product, 1=service, 9=other (for external module) More... | |
| load_cache_types_fees () | |
| Load into cache cache_types_fees, array of types of fees. More... | |
| select_type_fees ($selected= '', $htmlname= 'type', $showempty=0) | |
| Return list of types of notes. More... | |
| 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) | |
| Output html form to select a third party. More... | |
| select_thirdparty_list ($selected= '', $htmlname= 'socid', $filter= '', $showempty= '', $showtype=0, $forcecombo=0, $events=array(), $filterkey= '', $outputmode=0, $limit=0, $morecss= 'minwidth100', $moreparam= '', $multiple=false) | |
| Output html form to select a third party. More... | |
| select_remises ($selected, $htmlname, $filter, $socid, $maxvalue=0) | |
| Return HTML combo list of absolute discounts. More... | |
| select_contacts ($socid, $selected= '', $htmlname= 'contactid', $showempty=0, $exclude= '', $limitto= '', $showfunction=0, $moreclass= '', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam= '', $htmlid= '') | |
| Return list of all contacts (for a third party or all) More... | |
| selectcontacts ($socid, $selected= '', $htmlname= 'contactid', $showempty=0, $exclude= '', $limitto= '', $showfunction=0, $moreclass= '', $options_only=false, $showsoc=0, $forcecombo=0, $events=array(), $moreparam= '', $htmlid= '', $multiple=false, $disableifempty=0) | |
| Return HTML code of the SELECT of list of all contacts (for a third party or all). More... | |
| select_users ($selected= '', $htmlname= 'userid', $show_empty=0, $exclude=null, $disabled=0, $include= '', $enableonly= '', $force_entity= '0') | |
| Return the HTML select list of users. More... | |
| select_dolusers ($selected= '', $htmlname= 'userid', $show_empty=0, $exclude=null, $disabled=0, $include= '', $enableonly= '', $force_entity= '0', $maxlength=0, $showstatus=0, $morefilter= '', $show_every=0, $enableonlytext= '', $morecss= '', $noactive=0, $outputmode=0, $multiple=false) | |
| Return select list of users. More... | |
| select_dolusers_forevent ($action= '', $htmlname= 'userid', $show_empty=0, $exclude=null, $disabled=0, $include= '', $enableonly= '', $force_entity= '0', $maxlength=0, $showstatus=0, $morefilter= '', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array()) | |
| Return select list of users. More... | |
| select_produits ($selected= '', $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) | |
| Return list of products for customer in Ajax if Ajax activated or go to select_produits_list. More... | |
| select_produits_list ($selected= '', $htmlname= 'productid', $filtertype= '', $limit=20, $price_level=0, $filterkey= '', $status=1, $finished=2, $outputmode=0, $socid=0, $showempty= '1', $forcecombo=0, $morecss= '', $hidepriceinlabel=0, $warehouseStatus= '') | |
| Return list of products for a customer. More... | |
| select_produits_fournisseurs ($socid, $selected= '', $htmlname= 'productid', $filtertype= '', $filtre= '', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0, $morecss= '') | |
| Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list) More... | |
| select_produits_fournisseurs_list ($socid, $selected= '', $htmlname= 'productid', $filtertype= '', $filtre= '', $filterkey= '', $statut=-1, $outputmode=0, $limit=100, $alsoproductwithnosupplierprice=0, $morecss= '', $showstockinlist=0) | |
| Return list of suppliers products. More... | |
| select_product_fourn_price ($productid, $htmlname= 'productfournpriceid', $selected_supplier= '') | |
| Return list of suppliers prices for a product. More... | |
| select_address ($selected, $socid, $htmlname= 'address_id', $showempty=0) | |
| Return list of delivery address. More... | |
| load_cache_conditions_paiements () | |
| Load into cache list of payment terms. More... | |
| load_cache_availability () | |
| Charge dans cache la liste des délais de livraison possibles. More... | |
| selectAvailabilityDelay ($selected= '', $htmlname= 'availid', $filtertype= '', $addempty=0) | |
| Retourne la liste des types de delais de livraison possibles. More... | |
| loadCacheInputReason () | |
| Load into cache cache_demand_reason, array of input reasons. More... | |
| selectInputReason ($selected= '', $htmlname= 'demandreasonid', $exclude= '', $addempty=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. More... | |
| load_cache_types_paiements () | |
| Charge dans cache la liste des types de paiements possibles. More... | |
| select_conditions_paiements ($selected=0, $htmlname= 'condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss= '') | |
| Return list of payment modes. More... | |
| select_types_paiements ($selected= '', $htmlname= 'paiementtype', $filtertype= '', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss= '') | |
| 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. More... | |
| selectPriceBaseType ($selected= '', $htmlname= 'price_base_type', $addjscombo=0) | |
| Selection HT or TTC. More... | |
| load_cache_transport_mode () | |
| Load in cache list of transport mode. More... | |
| selectTransportMode ($selected= '', $htmlname= 'transportmode', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss= '') | |
| Return list of transport mode for intracomm report. More... | |
| selectShippingMethod ($selected= '', $htmlname= 'shipping_method_id', $filtre= '', $useempty=0, $moreattrib= '') | |
| Return a HTML select list of shipping mode. More... | |
| formSelectShippingMethod ($page, $selected= '', $htmlname= 'shipping_method_id', $addempty=0) | |
| Display form to select shipping mode. More... | |
| selectSituationInvoices ($selected= '', $socid=0) | |
| Creates HTML last in cycle situation invoices selector. More... | |
| selectUnits ($selected= '', $htmlname= 'units', $showempty=0) | |
| Creates HTML units selector (code => label) More... | |
| select_comptes ($selected= '', $htmlname= 'accountid', $status=0, $filtre= '', $useempty=0, $moreattrib= '', $showcurrency=0, $morecss= '', $nooutput=0) | |
| Return a HTML select list of bank accounts. More... | |
| selectEstablishments ($selected= '', $htmlname= 'entity', $status=0, $filtre= '', $useempty=0, $moreattrib= '') | |
| Return a HTML select list of establishment. More... | |
| formSelectAccount ($page, $selected= '', $htmlname= 'fk_account', $addempty=0) | |
| Display form to select bank account. More... | |
| select_all_categories ($type, $selected= '', $htmlname="parent", $maxlength=64, $markafterid=0, $outputmode=0, $include=0, $morecss= '') | |
| Return list of categories having choosed type. More... | |
| form_confirm ($page, $title, $question, $action, $formquestion= '', $selectedchoice="", $useajax=0, $height=170, $width=500) | |
| Show a confirmation HTML form or AJAX popup. More... | |
| formconfirm ($page, $title, $question, $action, $formquestion= '', $selectedchoice= '', $useajax=0, $height=0, $width=500, $disableformtag=0) | |
| Show a confirmation HTML form or AJAX popup. More... | |
| form_project ($page, $socid, $selected= '', $htmlname= 'projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) | |
| Show a form to select a project. More... | |
| form_conditions_reglement ($page, $selected= '', $htmlname= 'cond_reglement_id', $addempty=0) | |
| Show a form to select payment conditions. More... | |
| form_availability ($page, $selected= '', $htmlname= 'availability', $addempty=0) | |
| Show a form to select a delivery delay. More... | |
| formInputReason ($page, $selected= '', $htmlname= 'demandreason', $addempty=0) | |
| 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. More... | |
| form_date ($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) | |
| Show a form + html select a date. More... | |
| form_users ($page, $selected= '', $htmlname= 'userid', $exclude= '', $include= '') | |
| Show a select form to choose a user. More... | |
| form_modes_reglement ($page, $selected= '', $htmlname= 'mode_reglement_id', $filtertype= '', $active=1, $addempty=0) | |
| Show form with payment mode. More... | |
| formSelectTransportMode ($page, $selected= '', $htmlname= 'transport_mode_id', $active=1, $addempty=0) | |
| Show form with transport mode. More... | |
| form_multicurrency_code ($page, $selected= '', $htmlname= 'multicurrency_code') | |
| Show form with multicurrency code. More... | |
| form_multicurrency_rate ($page, $rate= '', $htmlname= 'multicurrency_tx', $currency= '') | |
| Show form with multicurrency rate. More... | |
| form_remise_dispo ($page, $selected, $htmlname, $socid, $amount, $filter= '', $maxvalue=0, $more= '', $hidelist=0, $discount_type=0) | |
| Show a select box with available absolute discounts. More... | |
| form_contacts ($page, $societe, $selected= '', $htmlname= 'contactid') | |
| Show forms to select a contact. More... | |
| form_thirdparty ($page, $selected= '', $htmlname= 'socid', $filter= '', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $nooutput=0) | |
| Output html select to select thirdparty. More... | |
| select_currency ($selected= '', $htmlname= 'currency_id') | |
| Retourne la liste des devises, dans la langue de l'utilisateur. More... | |
| selectCurrency ($selected= '', $htmlname= 'currency_id', $mode=0) | |
| Retourne la liste des devises, dans la langue de l'utilisateur. More... | |
| selectMultiCurrency ($selected= '', $htmlname= 'multicurrency_code', $useempty=0, $filter= '', $excludeConfCurrency=false) | |
| Return array of currencies in user language. More... | |
| load_cache_vatrates ($country_code) | |
| Load into the cache vat rates of a country. More... | |
| load_tva ($htmlname= 'tauxtva', $selectedrate= '', $societe_vendeuse= '', $societe_acheteuse= '', $idprod=0, $info_bits=0, $type= '', $options_only=false, $mode=0) | |
| Output an HTML select vat rate. More... | |
| select_date ($set_time= '', $prefix= 're', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday= '', $addplusone= '', $adddateof= '') | |
| Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. More... | |
| selectDateToDate ($set_time= '', $set_time_end= '', $prefix= 're', $empty=0) | |
| Show 2 HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. More... | |
| 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') | |
| Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. More... | |
| selectTypeDuration ($prefix, $selected= 'i', $excludetypes=array()) | |
| selectTypeDuration More... | |
| select_duration ($prefix, $iSecond= '', $disabled=0, $typehour= 'select', $minunderhours=0, $nooutput=0) | |
| Function to show a form to select a duration on a page. More... | |
| selectForForms ($objectdesc, $htmlname, $preselectedvalue, $showempty= '', $searchkey= '', $placeholder= '', $morecss= '', $moreparams= '', $forcecombo=0, $disabled=0, $selected_input_value= '') | |
| Generic method to select a component from a combo list. More... | |
| selectForFormsList ($objecttmp, $htmlname, $preselectedvalue, $showempty= '', $searchkey= '', $placeholder= '', $morecss= '', $moreparams= '', $forcecombo=0, $outputmode=0, $disabled=0) | |
| Output html form to select an object. More... | |
| showCategories ($id, $type, $rendermode=0, $nolink=0) | |
| Render list of categories linked to object with id $id and type $type. More... | |
| showLinkedObjectBlock ($object, $morehtmlright= '', $compatibleImportElementsList=false) | |
| Show linked object block. More... | |
| showLinkToObjectBlock ($object, $restrictlinksto=array(), $excludelinksto=array()) | |
| Show block with links to link to other objects. More... | |
| selectyesno ($htmlname, $value= '', $option=0, $disabled=false, $useempty=0, $addjscombo=0) | |
| Return an html string with a select combo box to choose yes or no. More... | |
| select_export_model ($selected= '', $htmlname= 'exportmodelid', $type= '', $useempty=0) | |
| Return list of export templates. More... | |
| 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 criterias. More... | |
| showbarcode (&$object, $width=100) | |
| Return HTML code to output a barcode. More... | |
| select_dolgroups ($selected= '', $htmlname= 'groupid', $show_empty=0, $exclude= '', $disabled=0, $include= '', $enableonly= '', $force_entity= '0', $multiple=false, $morecss= '') | |
| Return select list of groups. More... | |
| showFilterButtons () | |
| Return HTML to show the search and clear seach button. More... | |
| showCheckAddButtons ($cssclass= 'checkforaction', $calljsfunction=0, $massactionname="massaction") | |
| Return HTML to show the search and clear search button. More... | |
| showFilterAndCheckAddButtons ($addcheckuncheckall=0, $cssclass= 'checkforaction', $calljsfunction=0, $massactionname="massaction") | |
| Return HTML to show the search and clear seach button. More... | |
| 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. More... | |
| selectExpenseRanges ($selected= '', $htmlname= 'fk_range', $useempty=0) | |
| Return HTML to show the select ranges of expense range. More... | |
| selectExpense ($selected= '', $htmlname= 'fk_c_type_fees', $useempty=0, $allchoice=1, $useid=0) | |
| Return HTML to show a select of expense. More... | |
| selectInvoice ($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 qualified for a third party. More... | |
| searchComponent ($arrayofcriterias, $search_component_params, $arrayofinputfieldsalreadyoutput=array()) | |
| Output the component to make advanced search criteries. More... | |
| selectModelMail ($prefix, $modelType= '', $default=0, $addjscombo=0) | |
| selectModelMail More... | |
Static Public Member Functions | |
| 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= '', $addjscombo=0, $moreparamonempty= '', $disablebademail=0, $nohtmlescape=0) |
| Return a HTML select string, built from an array of key+value. More... | |
| 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. More... | |
| static | selectArrayFilter ($htmlname, $array, $id= '', $moreparam= '', $disableFiltering=0, $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 is defined into $array parameter. More... | |
| static | multiselectarray ($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss= '', $translate=0, $width=0, $moreattrib= '', $elemtype= '', $placeholder= '', $addjscombo=-1) |
| Show a multiselect form from an array. More... | |
| static | multiSelectArrayWithCheckbox ($htmlname, &$array, $varpage) |
| Show a multiselect dropbox from an array. More... | |
| static | showphoto ($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass= 'photowithmargin', $imagesize= '', $addlinktofullsize=1, $cache=0, $forcecapture= '', $noexternsourceoverwrite=0) |
| Return HTML code to output a photo. More... | |
Protected Member Functions | |
| editInPlace ($object, $value, $htmlname, $condition, $inputType= 'textarea', $editvalue=null, $extObject=null, $custommsg=null) | |
| Output edit in place form. More... | |
| constructProductListOption (&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel=0, $filterkey= '', $novirtualstock=0) | |
| constructProductListOption. More... | |
Static Protected Member Functions | |
| static | forgeCriteriaCallback ($matches) |
| Function to forge a SQL criteria. More... | |
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 52 of file html.form.class.php.
| Form::__construct | ( | $db | ) |
|
protected |
constructProductListOption.
This define value for &$opt and &$optJson.
| resource | $objp | Resultset of fetch |
| string | $opt | Option (var used for returned value in string option format) |
| string | $optJson | Option (var used for returned value in json format) |
| int | $price_level | Price level |
| string | $selected | Preselected value |
| int | $hidepriceinlabel | Hide price in label |
| string | $filterkey | Filter key to highlight |
| int | $novirtualstock | Do not load virtual stock, even if slow option STOCK_SHOW_VIRTUAL_STOCK_IN_PRODUCTS_COMBO is on. |
Definition at line 2434 of file html.form.class.php.
References db, dol_print_error(), dol_strlen(), dol_syslog(), if, measuringUnitString(), price(), price2num(), showDimensionInBestUnit(), Product\TYPE_PRODUCT, Product\TYPE_SERVICE, and vatrate().
Referenced by select_produits_list().
| 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 |
| 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), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) |
| string | $moreparam | More param to add on a href URL. |
| int | $fieldrequired | 1 if we want to show field as mandatory using the "fieldrequired" CSS. |
| int | $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 ' ' |
| string | $paramid | Key of parameter for id ('id', 'socid') |
| string | $help | Tooltip help |
Definition at line 107 of file html.form.class.php.
References GETPOST(), if, img_edit(), and textwithpicto().
| Form::editfieldval | ( | $text, | |
| $htmlname, | |||
| $value, | |||
| $object, | |||
| $perm, | |||
$typeofdata = 'string', |
|||
$editvalue = '', |
|||
$extObject = null, |
|||
$custommsg = null, |
|||
$moreparam = '', |
|||
$notabletag = 0, |
|||
$formatfunc = '', |
|||
$paramid = 'id' |
|||
| ) |
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 | $value | Value to show/edit |
| object | $object | Object |
| boolean | $perm | Permission to allow button to edit parameter |
| 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 'datepickerhour', '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 formated price instead of value). Use '' to use same than $value |
| object | $extObject | External object |
| mixed | $custommsg | String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') |
| string | $moreparam | More param to add on the form action href URL |
| int | $notabletag | Do no output table tags |
| string | $formatfunc | Call a specific function to output field |
| string | $paramid | Key of parameter for id ('id', 'socid') |
Definition at line 177 of file html.form.class.php.
References dol_escape_htmltag(), dol_htmlentitiesbr(), dol_print_email(), dol_string_neverthesehtmltags(), dol_string_onlythesehtmltags(), editInPlace(), GETPOST(), price(), price2num(), selectarray(), and selectDate().
|
protected |
Output edit in place form.
| object | $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 |
| object | $extObject | External object |
| mixed | $custommsg | String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') |
Definition at line 390 of file html.form.class.php.
References dol_nl2br(), dol_print_date(), and price().
Referenced by editfieldval().
|
staticprotected |
Function to forge a SQL criteria.
| array | $matches | Array of found string by regex search. Example: "t.ref:like:'SO-%'" or "t.date_creation:<:'20160101'" or "t.nature:is:NULL" |
Definition at line 6174 of file html.form.class.php.
| Form::form_availability | ( | $page, | |
$selected = '', |
|||
$htmlname = 'availability', |
|||
$addempty = 0 |
|||
| ) |
Show a form to select a delivery delay.
| int | $page | Page |
| string | $selected | Id condition pre-selectionne |
| string | $htmlname | Name of select html field |
| int | $addempty | Ajoute entree vide |
Definition at line 4637 of file html.form.class.php.
References load_cache_availability(), print, and selectAvailabilityDelay().
| Form::form_conditions_reglement | ( | $page, | |
$selected = '', |
|||
$htmlname = 'cond_reglement_id', |
|||
$addempty = 0 |
|||
| ) |
Show a form to select payment conditions.
| int | $page | Page |
| string | $selected | Id condition pre-selectionne |
| string | $htmlname | Name of select html field |
| int | $addempty | Add empty entry |
Definition at line 4604 of file html.form.class.php.
References load_cache_conditions_paiements(), print, and select_conditions_paiements().
| Form::form_confirm | ( | $page, | |
| $title, | |||
| $question, | |||
| $action, | |||
$formquestion = '', |
|||
$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 | $formquestion | An array with forms complementary inputs |
| string | $selectedchoice | "" or "no" or "yes" |
| int | $useajax | 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx |
| int | $height | Force height of box |
| int | $width | Force width of box |
Definition at line 4213 of file html.form.class.php.
References dol_syslog(), formconfirm(), and print.
| Form::form_contacts | ( | $page, | |
| $societe, | |||
$selected = '', |
|||
$htmlname = 'contactid' |
|||
| ) |
Show forms to select a contact.
| string | $page | Page |
| Societe | $societe | Filter on third party |
| int | $selected | Id contact pre-selectionne |
| string | $htmlname | Name of HTML select. If 'none', we just show contact link. |
Definition at line 5011 of file html.form.class.php.
References db, print, and selectcontacts().
| Form::form_date | ( | $page, | |
| $selected, | |||
| $htmlname, | |||
$displayhour = 0, |
|||
$displaymin = 0, |
|||
$nooutput = 0 |
|||
| ) |
Show a form + html select a date.
| string | $page | Page |
| string | $selected | Date preselected |
| string | $htmlname | Html name of date input fields or 'none' |
| int | $displayhour | Display hour selector |
| int | $displaymin | Display minutes selector |
| int | $nooutput | 1=No print output, return string |
Definition at line 4712 of file html.form.class.php.
References dol_print_date(), print, and selectDate().
| Form::form_modes_reglement | ( | $page, | |
$selected = '', |
|||
$htmlname = 'mode_reglement_id', |
|||
$filtertype = '', |
|||
$active = 1, |
|||
$addempty = 0 |
|||
| ) |
Show form with payment mode.
| string | $page | Page |
| int | $selected | Id mode pre-selectionne |
| string | $htmlname | Name of select html field |
| string | $filtertype | To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz)) |
| int | $active | Active or not, -1 = all |
| int | $addempty | 1=Add empty entry |
Definition at line 4790 of file html.form.class.php.
References load_cache_types_paiements(), print, and select_types_paiements().
| Form::form_multicurrency_code | ( | $page, | |
$selected = '', |
|||
$htmlname = 'multicurrency_code' |
|||
| ) |
Show form with multicurrency code.
| string | $page | Page |
| string | $selected | code pre-selectionne |
| string | $htmlname | Name of select html field |
Definition at line 4855 of file html.form.class.php.
References currency_name(), dol_include_once(), print, and selectMultiCurrency().
| Form::form_multicurrency_rate | ( | $page, | |
$rate = '', |
|||
$htmlname = 'multicurrency_tx', |
|||
$currency = '' |
|||
| ) |
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 |
Definition at line 4883 of file html.form.class.php.
References price(), price2num(), and print.
| Form::form_project | ( | $page, | |
| $socid, | |||
$selected = '', |
|||
$htmlname = 'projectid', |
|||
$discard_closed = 0, |
|||
$maxlength = 20, |
|||
$forcefocus = 0, |
|||
$nooutput = 0 |
|||
| ) |
Show a form to select a project.
| int | $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 | $selected | Id pre-selected project |
| string | $htmlname | Name of select field |
| int | $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 | $nooutput | No print is done. String is returned. |
Definition at line 4552 of file html.form.class.php.
| Form::form_remise_dispo | ( | $page, | |
| $selected, | |||
| $htmlname, | |||
| $socid, | |||
| $amount, | |||
$filter = '', |
|||
$maxvalue = 0, |
|||
$more = '', |
|||
$hidelist = 0, |
|||
$discount_type = 0 |
|||
| ) |
Show a select box with available absolute discounts.
| string | $page | Page URL where form is shown |
| int | $selected | Value pre-selected |
| 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 |
| 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 |
Definition at line 4928 of file html.form.class.php.
References price(), print, and select_remises().
| Form::form_thirdparty | ( | $page, | |
$selected = '', |
|||
$htmlname = 'socid', |
|||
$filter = '', |
|||
$showempty = 0, |
|||
$showtype = 0, |
|||
$forcecombo = 0, |
|||
$events = array(), |
|||
$nooutput = 0 |
|||
| ) |
Output html select to select thirdparty.
| string | $page | Page |
| string | $selected | Id preselected |
| string | $htmlname | Name of HTML select |
| string | $filter | optional filters criteras |
| int | $showempty | Add an empty field |
| int | $showtype | Show third party type in combolist (customer, prospect or supplier) |
| int | $forcecombo | Force to use combo box |
| array | $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 | $nooutput | No print output. Return it only. |
Definition at line 5061 of file html.form.class.php.
References db, print, and select_company().
| Form::form_users | ( | $page, | |
$selected = '', |
|||
$htmlname = 'userid', |
|||
$exclude = '', |
|||
$include = '' |
|||
| ) |
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. |
| array | $exclude | List of users id to exclude |
| array | $include | List of users id to include |
Definition at line 4751 of file html.form.class.php.
References db, print, and select_dolusers().
| Form::formconfirm | ( | $page, | |
| $title, | |||
| $question, | |||
| $action, | |||
$formquestion = '', |
|||
$selectedchoice = '', |
|||
$useajax = 0, |
|||
$height = 0, |
|||
$width = 500, |
|||
$disableformtag = 0 |
|||
| ) |
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 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 reformated) |
| string | $title | Title |
| string | $question | Question |
| string | $action | Action |
| array | string | $formquestion | An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>)) type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ... |
| string | $selectedchoice | '' or 'no', or 'yes' or '1' or '0' |
| int | string | $useajax | 0=No, 1=Yes, 2=Yes but 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. |
Definition at line 4244 of file html.form.class.php.
References dol_escape_htmltag(), dol_escape_js(), if, newToken(), selectarray(), selectDate(), and selectyesno().
Referenced by form_confirm().
| Form::formInputReason | ( | $page, | |
$selected = '', |
|||
$htmlname = 'demandreason', |
|||
$addempty = 0 |
|||
| ) |
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 | Id condition pre-selectionne |
| string | $htmlname | Name of select html field |
| int | $addempty | Add empty entry |
Definition at line 4670 of file html.form.class.php.
References loadCacheInputReason(), print, and selectInputReason().
| Form::formSelectAccount | ( | $page, | |
$selected = '', |
|||
$htmlname = 'fk_account', |
|||
$addempty = 0 |
|||
| ) |
Display form to select bank account.
| string | $page | Page |
| int | $selected | Id of bank account |
| 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 4085 of file html.form.class.php.
References db, print, and select_comptes().
| Form::formSelectShippingMethod | ( | $page, | |
$selected = '', |
|||
$htmlname = 'shipping_method_id', |
|||
$addempty = 0 |
|||
| ) |
Display form to select shipping mode.
| string | $page | Page |
| int | $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 3812 of file html.form.class.php.
References print, and 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 pre-select |
| string | $htmlname | Name of select html field |
| int | $active | Active or not, -1 = all |
| int | $addempty | 1=Add empty entry |
Definition at line 4823 of file html.form.class.php.
References load_cache_transport_mode(), print, and selectTransportMode().
| Form::load_cache_availability | ( | ) |
Charge dans cache la liste des délais de livraison possibles.
Definition at line 3286 of file html.form.class.php.
References $resql, db, dol_print_error(), dol_sort_array(), and dol_syslog().
Referenced by form_availability(), and selectAvailabilityDelay().
| Form::load_cache_conditions_paiements | ( | ) |
Load into cache list of payment terms.
Definition at line 3239 of file html.form.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by form_conditions_reglement(), and select_conditions_paiements().
| Form::load_cache_transport_mode | ( | ) |
Load in cache list of transport mode.
Definition at line 3652 of file html.form.class.php.
References $resql, db, dol_print_error(), dol_sort_array(), and dol_syslog().
Referenced by formSelectTransportMode(), and selectTransportMode().
| Form::load_cache_types_fees | ( | ) |
Load into cache cache_types_fees, array of types of fees.
Definition at line 1011 of file html.form.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
Referenced by select_type_fees().
| Form::load_cache_types_paiements | ( | ) |
Charge dans cache la liste des types de paiements possibles.
Definition at line 3452 of file html.form.class.php.
References $resql, db, dol_print_error(), dol_sort_array(), and dol_syslog().
Referenced by form_modes_reglement(), and select_types_paiements().
| Form::load_cache_vatrates | ( | $country_code | ) |
Load into the cache vat rates of a country.
| string | $country_code | Country code with quotes ("'CA'", or "'CA,IN,...'") |
Definition at line 5220 of file html.form.class.php.
References $resql, db, dol_syslog(), and if.
Referenced by load_tva().
| Form::load_tva | ( | $htmlname = 'tauxtva', |
|
$selectedrate = '', |
|||
$societe_vendeuse = '', |
|||
$societe_acheteuse = '', |
|||
$idprod = 0, |
|||
$info_bits = 0, |
|||
$type = '', |
|||
$options_only = false, |
|||
$mode = 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 (NOO)' for example. Use '' for no forcing. |
| 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 | string | $type | ''=Unknown, 0=Product, 1=Service (Used if idprod not defined) Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle. Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle. Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle. Si vendeur et acheteur dans Communauté européenne et acheteur= particulier alors TVA par défaut=TVA du produit vendu. Fin de règle. Si vendeur et acheteur dans Communauté européenne et acheteur= entreprise alors TVA par défaut=0. Fin de règle. Sinon la TVA proposee par defaut=0. Fin de regle. |
| bool | $options_only | Return HTML options lines only (for ajax treatment) |
| int | $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 |
Definition at line 5298 of file html.form.class.php.
References db, dol_strlen(), get_default_npr(), get_default_tva(), isInEEC(), load_cache_vatrates(), Product\TYPE_SERVICE, and vatrate().
| Form::loadCacheInputReason | ( | ) |
Load into cache cache_demand_reason, array of input reasons.
Definition at line 3367 of file html.form.class.php.
References $resql, db, dol_print_error(), and dol_sort_array().
Referenced by formInputReason(), and selectInputReason().
|
static |
Show a multiselect form from an array.
| string | $htmlname | Name of select |
| array | $array | Array with key+value |
| array | $selected | Array with key+value preselected |
| int | $key_in_label | 1 to show key like in "[key] value" |
| int | $value_as_key | 1 to use value as key |
| string | $morecss | Add more css style |
| int | $translate | Translate and encode value |
| int | $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 | $elemtype | Type of element we show ('category', ...). Will execute a formating function on it. To use in readonly mode if js component support HTML formatting. |
| string | $placeholder | String to use as placeholder |
| int | $addjscombo | Add js combo |
Definition at line 6715 of file html.form.class.php.
References name.
Referenced by FormCategory\getFilterBox(), FormOrder\selectSupplierOrderStatus(), and FormCompany\showRoles().
|
static |
Show a multiselect dropbox from an array.
| string | $htmlname | Name of HTML field |
| array | $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); |
Definition at line 6825 of file html.form.class.php.
| Form::searchComponent | ( | $arrayofcriterias, | |
| $search_component_params, | |||
$arrayofinputfieldsalreadyoutput = array() |
|||
| ) |
Output the component to make advanced search criteries.
| array | $arrayofcriterias | Array of available search criterias. Example: array($object->element => $object->fields, 'otherfamily' => otherarrayoffields, ...) |
| array | $search_component_params | Array of selected search criterias |
| array | $arrayofinputfieldsalreadyoutput | Array of input fields already inform. The component will not generate a hidden input field if it is in this list. |
Definition at line 8234 of file html.form.class.php.
| Form::select_address | ( | $selected, | |
| $socid, | |||
$htmlname = 'address_id', |
|||
$showempty = 0 |
|||
| ) |
Return list of delivery address.
| string | $selected | Id contact pre-selectionn |
| int | $socid | Id of company |
| string | $htmlname | Name of HTML field |
| int | $showempty | Add an empty field |
Definition at line 3193 of file html.form.class.php.
References $resql, db, dol_print_error(), dol_syslog(), and print.
| Form::select_all_categories | ( | $type, | |
$selected = '', |
|||
$htmlname = "parent", |
|||
$maxlength = 64, |
|||
$markafterid = 0, |
|||
$outputmode = 0, |
|||
$include = 0, |
|||
$morecss = '' |
|||
| ) |
Return list of categories having choosed type.
| string | int | $type | Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated. |
| string | $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 | array | $markafterid | Keep only or removed all categories including the leaf $markafterid in category tree (exclude) or Keep only of category is inside the leaf starting with this id. $markafterid can be an :
|
| int | $outputmode | 0=HTML select string, 1=Array |
| int | $include | [=0] Removed or 1=Keep only |
| string | $morecss | More CSS |
Definition at line 4128 of file html.form.class.php.
References db, dol_print_error(), dol_syslog(), and dol_trunc().
Referenced by FormCategory\getFilterBox().
| 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 |
|||
| ) |
Output html form to select a third party.
| string | $selected | Preselected type |
| string | $htmlname | Name of field in form |
| string | $filter | Optional filters criteras. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>] are allowed here (example: 's.rowid <> x', 's.client IN (1,3)') |
| string | $showempty | Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty') |
| int | $showtype | Show third party type in combolist (customer, prospect or supplier) |
| int | $forcecombo | Force to load all values and output a standard combobox (with no beautification) |
| array | $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 | $hidelabel | Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) |
| array | $ajaxoptions | Options for ajax_autocompleter |
| bool | $multiple | add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) |
Definition at line 1112 of file html.form.class.php.
References ajax_autocompleter(), db, img_picto(), print, and select_thirdparty_list().
Referenced by form_thirdparty().
| Form::select_comptes | ( | $selected = '', |
|
$htmlname = 'accountid', |
|||
$status = 0, |
|||
$filtre = '', |
|||
$useempty = 0, |
|||
$moreattrib = '', |
|||
$showcurrency = 0, |
|||
$morecss = '', |
|||
$nooutput = 0 |
|||
| ) |
Return a HTML select list of bank accounts.
| string | $selected | Id account pre-selected |
| string | $htmlname | Name of select zone |
| int | $status | Status of searched accounts (0=open, 1=closed, 2=both) |
| string | $filtre | To filter list |
| 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 | $showcurrency | Show currency in label |
| string | $morecss | More CSS |
| int | $nooutput | 1=Return string, do not send to output |
Definition at line 3949 of file html.form.class.php.
References ajax_combobox(), db, dol_print_error(), dol_syslog(), and print.
Referenced by formSelectAccount().
| Form::select_conditions_paiements | ( | $selected = 0, |
|
$htmlname = 'condid', |
|||
$filtertype = -1, |
|||
$addempty = 0, |
|||
$noinfoadmin = 0, |
|||
$morecss = '' |
|||
| ) |
Return list of payment modes.
Constant MAIN_DEFAULT_PAYMENT_TERM_ID can 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 | Not used |
| int | $addempty | Add an empty entry |
| int | $noinfoadmin | 0=Add admin info, 1=Disable admin info |
| string | $morecss | Add more CSS on select tag |
Definition at line 3512 of file html.form.class.php.
References ajax_combobox(), dol_syslog(), if, info_admin(), load_cache_conditions_paiements(), and print.
Referenced by form_conditions_reglement().
| Form::select_contacts | ( | $socid, | |
$selected = '', |
|||
$htmlname = 'contactid', |
|||
$showempty = 0, |
|||
$exclude = '', |
|||
$limitto = '', |
|||
$showfunction = 0, |
|||
$moreclass = '', |
|||
$showsoc = 0, |
|||
$forcecombo = 0, |
|||
$events = array(), |
|||
$options_only = false, |
|||
$moreparam = '', |
|||
$htmlid = '' |
|||
| ) |
Return list of all contacts (for a third party or all)
| int | $socid | Id ot third party or 0 for all |
| string | $selected | Id contact pre-selectionne |
| string | $htmlname | Name of HTML field ('none' for a not editable field) |
| int | $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 |
| integer | $showfunction | Add function into label |
| string | $moreclass | Add more class to class style |
| integer | $showsoc | Add company into label |
| int | $forcecombo | Force to use combo box |
| array | $events | Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) |
| bool | $options_only | Return options only (for ajax treatment) |
| 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 |
Definition at line 1422 of file html.form.class.php.
References print, and selectcontacts().
| Form::select_country | ( | $selected = '', |
|
$htmlname = 'country_id', |
|||
$htmloption = '', |
|||
$maxlength = 0, |
|||
$morecss = 'minwidth300', |
|||
$usecodeaskey = '', |
|||
$showempty = 1, |
|||
$disablefavorites = 0, |
|||
$addspecialentries = 0, |
|||
$exclude_country_code = array() |
|||
| ) |
Return combo list of activated countries, into language of user.
| string | $selected | Id or Code or Label of preselected country |
| string | $htmlname | Name of html select object |
| string | $htmloption | More html options on select object |
| integer | $maxlength | Max length for labels (0=no limit) |
| string | $morecss | More css class |
| string | $usecodeaskey | ''=Use id as key (default), 'code3'=Use code on 3 alpha as key, 'code2"=Use code on 2 alpha as key |
| int | $showempty | Show empty choice |
| int | $disablefavorites | 1=Disable favorites, |
| int | $addspecialentries | 1=Add dedicated entries for group of countries (like 'European Economic Community', ...) |
| array | $exclude_country_code | Array of country code (iso2) to exclude |
Definition at line 756 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_escape_htmltag(), dol_print_error(), dol_sort_array(), dol_string_unaccent(), dol_syslog(), dol_trunc(), and picto_from_langcode().
| Form::select_currency | ( | $selected = '', |
|
$htmlname = 'currency_id' |
|||
| ) |
Retourne la liste des devises, dans la langue de l'utilisateur.
| string | $selected | preselected currency code |
| string | $htmlname | name of HTML select list |
Definition at line 5100 of file html.form.class.php.
References print, and selectCurrency().
| Form::select_date | ( | $set_time = '', |
|
$prefix = 're', |
|||
$h = 0, |
|||
$m = 0, |
|||
$empty = 0, |
|||
$form_name = "", |
|||
$d = 1, |
|||
$addnowlink = 0, |
|||
$nooutput = 0, |
|||
$disabled = 0, |
|||
$fullday = '', |
|||
$addplusone = '', |
|||
$adddateof = '' |
|||
| ) |
Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
Fields are preselected with :
| integer | $set_time | Pre-selected 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 | $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. |
| datetime | $adddateof | Add a link "Date of invoice" using the following date. |
Definition at line 5487 of file html.form.class.php.
References print, and selectDate().
| Form::select_dolgroups | ( | $selected = '', |
|
$htmlname = 'groupid', |
|||
$show_empty = 0, |
|||
$exclude = '', |
|||
$disabled = 0, |
|||
$include = '', |
|||
$enableonly = '', |
|||
$force_entity = '0', |
|||
$multiple = false, |
|||
$morecss = '' |
|||
| ) |
Return select list of groups.
| string | $selected | Id group preselected |
| string | $htmlname | Field name in form |
| int | $show_empty | 0=liste sans valeur nulle, 1=ajoute valeur inconnue |
| string | $exclude | Array list of groups id to exclude |
| int | $disabled | If select list must be disabled |
| string | $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' attribut (not working with ajax_autocompleter) |
| string | $morecss | More css to add to html component |
Definition at line 7742 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), and dol_syslog().
| Form::select_dolusers | ( | $selected = '', |
|
$htmlname = 'userid', |
|||
$show_empty = 0, |
|||
$exclude = null, |
|||
$disabled = 0, |
|||
$include = '', |
|||
$enableonly = '', |
|||
$force_entity = '0', |
|||
$maxlength = 0, |
|||
$showstatus = 0, |
|||
$morefilter = '', |
|||
$show_every = 0, |
|||
$enableonlytext = '', |
|||
$morecss = '', |
|||
$noactive = 0, |
|||
$outputmode = 0, |
|||
$multiple = false |
|||
| ) |
Return select list of users.
| string | $selected | User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) |
| string | $htmlname | Field name in form |
| int | $show_empty | 0=list with no empty value, 1=add also an empty value into list |
| array | $exclude | Array list of users id to exclude |
| int | $disabled | If select list must be disabled |
| array | string | $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 |
| array | $enableonly | Array list of users id to be enabled. If defined, it means that others will be disabled |
| string | $force_entity | '0' or Ids of environment to force |
| int | $maxlength | Maximum length of string into list (0=no limit) |
| int | $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') |
| integer | $show_every | 0=default list, 1=add also a value "Everybody" at beginning of list |
| 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 | $noactive | Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). |
| int | $outputmode | 0=HTML select string, 1=Array |
| bool | $multiple | add [] in the name of element and add 'multiple' attribut |
Definition at line 1648 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_escape_htmltag(), dol_print_error(), and dol_syslog().
Referenced by form_users(), select_dolusers_forevent(), and select_users().
| Form::select_dolusers_forevent | ( | $action = '', |
|
$htmlname = 'userid', |
|||
$show_empty = 0, |
|||
$exclude = null, |
|||
$disabled = 0, |
|||
$include = '', |
|||
$enableonly = '', |
|||
$force_entity = '0', |
|||
$maxlength = 0, |
|||
$showstatus = 0, |
|||
$morefilter = '', |
|||
$showproperties = 0, |
|||
$listofuserid = array(), |
|||
$listofcontactid = array(), |
|||
$listofotherid = array() |
|||
| ) |
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 | $show_empty | 0=list without the empty value, 1=add empty value |
| array | $exclude | Array list of users id to exclude |
| int | $disabled | If select list must be disabled |
| array | $include | Array list of users id to include or 'hierarchy' to have only supervised users |
| array | $enableonly | Array list of users id to be enabled. All other must be disabled |
| int | $force_entity | '0' or Ids of environment to force |
| int | $maxlength | Maximum length of string into list (0=no limit) |
| int | $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 | $showproperties | Show properties of each attendees |
| array | $listofuserid | Array with properties of each user |
| array | $listofcontactid | Array with properties of each contact |
| array | $listofotherid | Array with properties of each other contact |
Definition at line 1856 of file html.form.class.php.
References db, dol_escape_htmltag(), 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 | $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 | $nooutput | Do not output html string but return it |
Definition at line 6010 of file html.form.class.php.
| Form::select_export_model | ( | $selected = '', |
|
$htmlname = 'exportmodelid', |
|||
$type = '', |
|||
$useempty = 0 |
|||
| ) |
Return list of export templates.
| string | $selected | Id modele pre-selectionne |
| string | $htmlname | Name of HTML select |
| string | $type | Type of searched templates |
| int | $useempty | Affiche valeur vide dans liste |
Definition at line 7327 of file html.form.class.php.
References db, dol_print_error(), and print.
| Form::select_incoterms | ( | $selected = '', |
|
$location_incoterms = '', |
|||
$page = '', |
|||
$htmlname = 'incoterm_id', |
|||
$htmloption = '', |
|||
$forcecombo = 1, |
|||
$events = array() |
|||
| ) |
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 | $forcecombo | Force to load all values and output a standard combobox (with no beautification) |
| array | $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'))) |
Definition at line 871 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), and dol_syslog().
| Form::select_product_fourn_price | ( | $productid, | |
$htmlname = 'productfournpriceid', |
|||
$selected_supplier = '' |
|||
| ) |
Return list of suppliers prices for a product.
| int | $productid | Id of product |
| string | $htmlname | Name of HTML field |
| int | $selected_supplier | Pre-selected supplier if more than 1 result |
Definition at line 3085 of file html.form.class.php.
References db, dol_print_error(), dol_syslog(), and price().
| Form::select_produits | ( | $selected = '', |
|
$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 |
|||
| ) |
Return list of products for customer in 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 | $status | Sell status -1=Return all products, 0=Products not on sell, 1=Products on sell |
| int | $finished | 2=all, 1=finished, 0=raw material |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
| int | $hidelabel | Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) |
| array | $ajaxoptions | Options for ajax_autocompleter |
| int | $socid | Thirdparty Id (to get also price dedicated to this customer) |
| string | $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 | $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 | $selected_combinations | Selected combinations. Format: array([attrid] => attrval, [...]) |
| string | $nooutput | No print, return the output into a string |
Definition at line 1952 of file html.form.class.php.
References ajax_autocompleter(), db, img_picto(), print, and select_produits_list().
| Form::select_produits_fournisseurs | ( | $socid, | |
$selected = '', |
|||
$htmlname = 'productid', |
|||
$filtertype = '', |
|||
$filtre = '', |
|||
$ajaxoptions = array(), |
|||
$hidelabel = 0, |
|||
$alsoproductwithnosupplierprice = 0, |
|||
$morecss = '' |
|||
| ) |
Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
| int | $socid | Id third party |
| string | $selected | Preselected product |
| string | $htmlname | Name of HTML Select |
| string | $filtertype | Filter on product type (''=nofilter, 0=product, 1=service) |
| string | $filtre | For a SQL filter |
| array | $ajaxoptions | Options for ajax_autocompleter |
| int | $hidelabel | Hide label (0=no, 1=yes) |
| int | $alsoproductwithnosupplierprice | 1=Add also product without supplier prices |
| string | $morecss | More CSS |
Definition at line 2712 of file html.form.class.php.
References ajax_autocompleter(), db, print, and select_produits_fournisseurs_list().
| Form::select_produits_fournisseurs_list | ( | $socid, | |
$selected = '', |
|||
$htmlname = 'productid', |
|||
$filtertype = '', |
|||
$filtre = '', |
|||
$filterkey = '', |
|||
$statut = -1, |
|||
$outputmode = 0, |
|||
$limit = 100, |
|||
$alsoproductwithnosupplierprice = 0, |
|||
$morecss = '', |
|||
$showstockinlist = 0 |
|||
| ) |
Return list of suppliers products.
| int | $socid | Id societe fournisseur (0 pour aucun filtre) |
| int | $selected | Product price pre-selected (must be 'id' in product_fournisseur_price or 'idprod_IDPROD') |
| string | $htmlname | Nom de la zone select |
| string | $filtertype | Filter on product type (''=nofilter, 0=product, 1=service) |
| string | $filtre | Pour filtre sql |
| string | $filterkey | Filtre des produits |
| int | $statut | -1=Return all products, 0=Products not on sell, 1=Products on sell (not used here, a filter on tobuy is already hard coded in request) |
| 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). |
Definition at line 2757 of file html.form.class.php.
References ajax_combobox(), db, dol_print_error(), dol_strlen(), dol_syslog(), getEntity(), if, measuringUnitString(), price(), price2num(), showDimensionInBestUnit(), Product\TYPE_PRODUCT, Product\TYPE_SERVICE, and vatrate().
Referenced by select_produits_fournisseurs().
| Form::select_produits_list | ( | $selected = '', |
|
$htmlname = 'productid', |
|||
$filtertype = '', |
|||
$limit = 20, |
|||
$price_level = 0, |
|||
$filterkey = '', |
|||
$status = 1, |
|||
$finished = 2, |
|||
$outputmode = 0, |
|||
$socid = 0, |
|||
$showempty = '1', |
|||
$forcecombo = 0, |
|||
$morecss = '', |
|||
$hidepriceinlabel = 0, |
|||
$warehouseStatus = '' |
|||
| ) |
Return list of products for a customer.
Called by select_produits.
| 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 | $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 | $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 | $hidepriceinlabel | 1=Hide prices in label |
| string | $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 |
Definition at line 2120 of file html.form.class.php.
References ajax_combobox(), constructProductListOption(), db, dol_print_error(), dol_syslog(), getEntity(), if, 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 remise fixe pre-selectionnee |
| string | $htmlname | Nom champ formulaire |
| string | $filter | Criteres optionnels de filtre |
| int | $socid | Id of thirdparty |
| int | $maxvalue | Max value for lines that can be selected |
Definition at line 1337 of file html.form.class.php.
References $resql, db, dol_print_error(), dol_syslog(), dol_trunc(), price(), and print.
Referenced by form_remise_dispo().
| 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 |
|||
| ) |
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 filters criteras (example: 's.rowid <> x', 's.client in (1,3)') |
| string | $showempty | Add an empty field (Can be '1' or text to use on empty line like 'SelectThirdParty') |
| int | $showtype | Show third party type in combolist (customer, prospect or supplier) |
| int | $forcecombo | Force to use standard HTML select component without beautification |
| array | $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 | $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' attribut |
Definition at line 1174 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), dol_syslog(), 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 1061 of file html.form.class.php.
References dol_syslog(), info_admin(), load_cache_types_fees(), and print.
| Form::select_type_of_lines | ( | $selected = '', |
|
$htmlname = 'type', |
|||
$showempty = 0, |
|||
$hidetext = 0, |
|||
$forceall = 0 |
|||
| ) |
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 | $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') |
Definition at line 960 of file html.form.class.php.
References print.
| Form::select_types_paiements | ( | $selected = '', |
|
$htmlname = 'paiementtype', |
|||
$filtertype = '', |
|||
$format = 0, |
|||
$empty = 1, |
|||
$noadmininfo = 0, |
|||
$maxlength = 0, |
|||
$active = 1, |
|||
$morecss = '' |
|||
| ) |
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 |
Definition at line 3559 of file html.form.class.php.
References ajax_combobox(), dol_syslog(), dol_trunc(), if, info_admin(), load_cache_types_paiements(), and print.
Referenced by form_modes_reglement().
| Form::select_users | ( | $selected = '', |
|
$htmlname = 'userid', |
|||
$show_empty = 0, |
|||
$exclude = null, |
|||
$disabled = 0, |
|||
$include = '', |
|||
$enableonly = '', |
|||
$force_entity = '0' |
|||
| ) |
Return the HTML select list of users.
| string | $selected | Id user preselected |
| string | $htmlname | Field name in form |
| int | $show_empty | 0=liste sans valeur nulle, 1=ajoute valeur inconnue |
| array | $exclude | Array list of users id to exclude |
| int | $disabled | If select list must be disabled |
| array | string | $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 | $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 1618 of file html.form.class.php.
References print, and 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. Must start with "multi" if this is a multiselect |
| array | $array | Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) |
| string|string[] | $id Preselected key or preselected keys for multiselect | |
| int | string | $show_empty | 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value. |
| int | $key_in_label | 1 to show key into label with format "[key] value" |
| int | $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 | $translate | 1=Translate and encode value |
| int | $maxlen | Length maximum for labels |
| int | $disabled | Html select box is disabled |
| string | $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 | $addjscombo | Add js combo |
| string | $moreparamonempty | Add more param on the empty option line. Not used if show_empty not set |
| int | $disablebademail | 1=Check if a not valid email, 2=Check string '—', and if found into value, disable and colorize entry |
| int | $nohtmlescape | No html escaping. |
Definition at line 6373 of file html.form.class.php.
Referenced by ActionsCardCommon\assign_values(), editfieldval(), FormCompany\form_prospect_level(), formconfirm(), FormCompany\formProspectContactLevel(), FormCompany\formThirdpartyType(), FormMail\get_form(), FormOther\getBoxesArea(), Ticket\printSelectStatus(), FormAccounting\select_account(), BookKeeping\select_account(), FormAccounting\select_auxaccount(), FormAccounting\select_bookkeeping_importkey(), FormAccounting\select_journal(), FormMailing\selectDestinariesStatus(), FormOrder\selectInputMethod(), dolReceiptPrinter\selectProfilePrinter(), 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 |
| integer | $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 6499 of file html.form.class.php.
|
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 | $array | Array (key=>array('text'=>'A text', 'url'=>'An url'), ...) |
| string | $id | Preselected key |
| string | $moreparam | Add more parameters onto the select tag |
| int | $disableFiltering | If set to 1, results are not filtered with searched string |
| 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 |
| integer | $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 6599 of file html.form.class.php.
References select2arrayoflanguage.
| Form::selectAvailabilityDelay | ( | $selected = '', |
|
$htmlname = 'availid', |
|||
$filtertype = '', |
|||
$addempty = 0 |
|||
| ) |
Retourne la liste des types de delais de livraison possibles.
| int | $selected | Id du type de delais pre-selectionne |
| string | $htmlname | Nom de la zone select |
| string | $filtertype | To add a filter |
| int | $addempty | Add empty entry |
Definition at line 3336 of file html.form.class.php.
References ajax_combobox(), dol_syslog(), info_admin(), load_cache_availability(), and print.
Referenced by form_availability().
| Form::selectcontacts | ( | $socid, | |
$selected = '', |
|||
$htmlname = 'contactid', |
|||
$showempty = 0, |
|||
$exclude = '', |
|||
$limitto = '', |
|||
$showfunction = 0, |
|||
$moreclass = '', |
|||
$options_only = false, |
|||
$showsoc = 0, |
|||
$forcecombo = 0, |
|||
$events = array(), |
|||
$moreparam = '', |
|||
$htmlid = '', |
|||
$multiple = false, |
|||
$disableifempty = 0 |
|||
| ) |
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
| int | $socid | Id ot third party or 0 for all or -1 for empty list |
| array | int | $selected | Array of ID of pre-selected contact id |
| string | $htmlname | Name of HTML field ('none' for a not editable field) |
| int | $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 |
| integer | $showfunction | Add function into label |
| string | $moreclass | Add more class to class style |
| bool | $options_only | Return options only (for ajax treatment) |
| integer | $showsoc | Add company into label |
| int | $forcecombo | Force to use combo box (so no ajax beautify effect) |
| array | $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' attribut |
| integer | $disableifempty | Set tag 'disabled' on select if there is no choice |
Definition at line 1453 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), and dol_syslog().
Referenced by form_contacts(), and select_contacts().
| Form::selectCurrency | ( | $selected = '', |
|
$htmlname = 'currency_id', |
|||
$mode = 0 |
|||
| ) |
Retourne la liste des devises, dans la langue de l'utilisateur.
| string | $selected | preselected currency code |
| string | $htmlname | name of HTML select list |
| string | $mode | 0 = Add currency symbol into label, 1 = Add 3 letter iso code |
Definition at line 5114 of file html.form.class.php.
References ajax_combobox(), dol_escape_htmltag(), and info_admin().
Referenced by select_currency().
| 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' |
|||
| ) |
Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
Fields are preselected with :
| integer | $set_time | Pre-selected 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", 1 with server time, 2 with local computer time |
| int | $disabled | Disable input fields |
| int | $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. |
| datetime | $adddateof | Add a link "Date of ..." using the following date. See also $labeladddateof for the label used. |
| 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. |
| string | $placeholder | Placeholder |
| mixed | $gm | 'auto' (for backward compatibility, avoid this), 'gmt' or 'tzserver' or 'tzuserrel' |
Definition at line 5549 of file html.form.class.php.
References dol_now(), dol_print_date(), getServerTimeZoneInt(), n, and type.
Referenced by editfieldval(), form_date(), formconfirm(), select_date(), and selectDateToDate().
| Form::selectDateToDate | ( | $set_time = '', |
|
$set_time_end = '', |
|||
$prefix = 're', |
|||
$empty = 0 |
|||
| ) |
Show 2 HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
Fields are preselected with :
| integer | $set_time | Pre-selected 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 | $set_time_end | Pre-selected 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 |
| string | $empty | 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only |
Definition at line 5512 of file html.form.class.php.
References selectDate().
| Form::selectEstablishments | ( | $selected = '', |
|
$htmlname = 'entity', |
|||
$status = 0, |
|||
$filtre = '', |
|||
$useempty = 0, |
|||
$moreattrib = '' |
|||
| ) |
Return a HTML select list of establishment.
| string | $selected | Id establishment pre-selected |
| string | $htmlname | Name of select zone |
| int | $status | Status of searched establishment (0=open, 1=closed, 2=both) |
| string | $filtre | To filter list |
| 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 4023 of file html.form.class.php.
References db, dol_print_error(), dol_syslog(), and print.
| Form::selectExpense | ( | $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 8038 of file html.form.class.php.
References $resql.
| 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 |
| integer | $useempty | 1=Add empty line |
| array | $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 | $params | param to give |
| int | $info_admin | Show the tooltip help picto to setup list |
Definition at line 7912 of file html.form.class.php.
References $resql, ajax_combobox(), and dol_print_error().
| 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 8002 of file html.form.class.php.
References $resql, dol_print_error(), and price().
| Form::selectForForms | ( | $objectdesc, | |
| $htmlname, | |||
| $preselectedvalue, | |||
$showempty = '', |
|||
$searchkey = '', |
|||
$placeholder = '', |
|||
$morecss = '', |
|||
$moreparams = '', |
|||
$forcecombo = 0, |
|||
$disabled = 0, |
|||
$selected_input_value = '' |
|||
| ) |
Generic method to select a component from a combo list.
Can use autocomplete with ajax after x key pressed or a full combo, depending on setup. This is the generic method that will replace all specific existing methods.
| string | $objectdesc | ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]] |
| string | $htmlname | Name of HTML select component |
| int | $preselectedvalue | Preselected value (ID of element) |
| string | $showempty | ''=empty values not allowed, 'string'=value show if we allow empty values (for example 'All', ...) |
| string | $searchkey | Search criteria |
| 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 | $disabled | 1=Html component is disabled |
| string | $selected_input_value | Value of preselected input text (for use with ajax) |
Definition at line 6098 of file html.form.class.php.
| Form::selectForFormsList | ( | $objecttmp, | |
| $htmlname, | |||
| $preselectedvalue, | |||
$showempty = '', |
|||
$searchkey = '', |
|||
$placeholder = '', |
|||
$morecss = '', |
|||
$moreparams = '', |
|||
$forcecombo = 0, |
|||
$outputmode = 0, |
|||
$disabled = 0 |
|||
| ) |
Output html form to select an object.
Note, this function is called by selectForForms or by ajax selectobject.php
| Object | $objecttmp | Object to knwo the table to scan for combo. |
| string | $htmlname | Name of HTML select component |
| int | $preselectedvalue | Preselected value (ID of element) |
| string | $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 |
Definition at line 6212 of file html.form.class.php.
| Form::selectInputReason | ( | $selected = '', |
|
$htmlname = 'demandreasonid', |
|||
$exclude = '', |
|||
$addempty = 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.
| int | $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 |
Definition at line 3419 of file html.form.class.php.
References ajax_combobox(), info_admin(), loadCacheInputReason(), and print.
Referenced by formInputReason().
| Form::selectInvoice | ( | $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 qualified for a third party.
| 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 | $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 8087 of file html.form.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), dol_trunc(), print, Project\STATUS_CLOSED, and Project\STATUS_DRAFT.
| 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 | $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 645 of file html.form.class.php.
References ajax_combobox(), and dol_escape_htmltag().
| Form::selectModelMail | ( | $prefix, | |
$modelType = '', |
|||
$default = 0, |
|||
$addjscombo = 0 |
|||
| ) |
selectModelMail
| string | $prefix | Prefix |
| string | $modelType | Model type |
| int | $default | 1=Show also Default mail template |
| int | $addjscombo | Add js combobox |
Definition at line 8287 of file html.form.class.php.
References ajax_combobox().
| Form::selectMultiCurrency | ( | $selected = '', |
|
$htmlname = 'multicurrency_code', |
|||
$useempty = 0, |
|||
$filter = '', |
|||
$excludeConfCurrency = false |
|||
| ) |
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 filters criteras (example: 'code <> x', ' in (1,3)') |
| 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 |
Definition at line 5164 of file html.form.class.php.
References $resql, ajax_combobox(), and db.
Referenced by form_multicurrency_code().
| Form::selectPriceBaseType | ( | $selected = '', |
|
$htmlname = 'price_base_type', |
|||
$addjscombo = 0 |
|||
| ) |
Selection HT or TTC.
| string | $selected | Id pre-selectionne |
| string | $htmlname | Nom de la zone select |
| string | $addjscombo | Add js combo |
Definition at line 3621 of file html.form.class.php.
References ajax_combobox().
| Form::selectShippingMethod | ( | $selected = '', |
|
$htmlname = 'shipping_method_id', |
|||
$filtre = '', |
|||
$useempty = 0, |
|||
$moreattrib = '' |
|||
| ) |
Return a HTML select list of shipping mode.
| string | $selected | Id shipping mode pre-selected |
| string | $htmlname | Name of select zone |
| string | $filtre | To filter list |
| 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 3757 of file html.form.class.php.
References ajax_combobox(), db, dol_print_error(), dol_syslog(), info_admin(), and print.
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 3843 of file html.form.class.php.
References $resql, db, and dol_syslog().
| 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 pre-selected |
| 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 3710 of file html.form.class.php.
References dol_syslog(), dol_trunc(), if, info_admin(), load_cache_transport_mode(), and print.
Referenced by formSelectTransportMode().
| Form::selectTypeDuration | ( | $prefix, | |
$selected = 'i', |
|||
$excludetypes = array() |
|||
| ) |
selectTypeDuration
| string | $prefix | Prefix |
| string | $selected | Selected duration type |
| array | $excludetypes | Array of duration types to exclude. Example array('y', 'm') |
Definition at line 5963 of file html.form.class.php.
| Form::selectUnits | ( | $selected = '', |
|
$htmlname = 'units', |
|||
$showempty = 0 |
|||
| ) |
Creates HTML units selector (code => label)
| string | $selected | Preselected Unit ID |
| string | $htmlname | Select name |
| int | $showempty | Add a nempty line |
Definition at line 3898 of file html.form.class.php.
| Form::selectyesno | ( | $htmlname, | |
$value = '', |
|||
$option = 0, |
|||
$disabled = false, |
|||
$useempty = 0, |
|||
$addjscombo = 0 |
|||
| ) |
Return an html string with a select combo box to choose yes or no.
| string | $htmlname | Name of html select field |
| string | $value | Pre-selected value |
| int | $option | 0 return yes/no, 1 return 1/0 |
| bool | $disabled | true or false |
| int | $useempty | 1=Add empty line |
| int | $addjscombo | 1=Add js beautifier on combo box |
Definition at line 7284 of file html.form.class.php.
References ajax_combobox().
Referenced by formconfirm().
| Form::showbarcode | ( | & | $object, |
$width = 100 |
|||
| ) |
Return HTML code to output a barcode.
| Object | $object | Object containing data to retrieve file name |
| int | $width | Width of photo |
Definition at line 7562 of file html.form.class.php.
| 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 (0, 1, 2, ...) is deprecated. |
| int | $rendermode | 0=Default, use multiselect. 1=Emulate multiselect (recommended) |
| int | $nolink | 1=Do not add html links |
Definition at line 6921 of file html.form.class.php.
| 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 7850 of file html.form.class.php.
Referenced by showFilterAndCheckAddButtons().
| Form::showFilterAndCheckAddButtons | ( | $addcheckuncheckall = 0, |
|
$cssclass = 'checkforaction', |
|||
$calljsfunction = 0, |
|||
$massactionname = "massaction" |
|||
| ) |
Return HTML to show the search and clear seach 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 7889 of file html.form.class.php.
References showCheckAddButtons(), and showFilterButtons().
| Form::showFilterButtons | ( | ) |
Return HTML to show the search and clear seach button.
Definition at line 7832 of file html.form.class.php.
Referenced by showFilterAndCheckAddButtons().
| Form::showLinkedObjectBlock | ( | $object, | |
$morehtmlright = '', |
|||
$compatibleImportElementsList = false |
|||
| ) |
Show linked object block.
| CommonObject | $object | Object we want to show links to |
| string | $morehtmlright | More html to show on right of title |
| array | $compatibleImportElementsList | Array of compatibles elements object for "import from" action |
Definition at line 6966 of file html.form.class.php.
| Form::showLinkToObjectBlock | ( | $object, | |
$restrictlinksto = array(), |
|||
$excludelinksto = array() |
|||
| ) |
Show block with links to link to other objects.
| CommonObject | $object | Object we want to show links to |
| array | $restrictlinksto | Restrict links to some elements, for exemple array('order') or array('supplier_order'). null or array() if no restriction. |
| array | $excludelinksto | Do not show links of this type, for exemple array('order') or array('supplier_order'). null or array() if no exclusion. |
Definition at line 7105 of file html.form.class.php.
|
static |
Return HTML code to output a photo.
| string | $modulepart | Key to define module concerned ('societe', 'userphoto', 'memberphoto') |
| object | $object | Object containing data to retrieve file name |
| int | $width | Width of photo |
| int | $height | Height of photo (auto if 0) |
| int | $caneditfield | Add edit fields |
| string | $cssclass | CSS name to use on img for photo |
| string | $imagesize | 'mini', 'small' or '' (original) |
| int | $addlinktofullsize | Add link to fullsize image |
| int | $cache | 1=Accept to use image in cache |
| string | $forcecapture | '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''. |
| int | $noexternsourceoverwrite | No overwrite image with extern source (like 'gravatar' or other module) |
Definition at line 7600 of file html.form.class.php.
References dol_print_error(), get_exdir(), getAdvancedPreviewUrl(), and getImageFileNameForSize().
Referenced by Contact\getNomUrl(), Adherent\getNomUrl(), Societe\getNomUrl(), User\getNomUrl(), User\getPhotoUrl(), 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 criterias.
| object | $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 | $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 | $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 7382 of file html.form.class.php.
References $_SERVER, db, dol_htmlentities(), picto_from_langcode(), and textwithpicto().
| Form::textwithpicto | ( | $text, | |
| $htmltext, | |||
$direction = 1, |
|||
$type = 'help', |
|||
$extracss = '', |
|||
$noencodehtmltext = 0, |
|||
$notabs = 3, |
|||
$tooltiptrigger = '', |
|||
$forcenowrap = 0 |
|||
| ) |
Show a text with a picto and a tooltip on picto.
| string | $text | Text to show |
| string | $htmltext | Content of tooltip |
| int | $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', ...) or image filepath or 'none' |
| string | $extracss | Add a CSS style to td, div or span tag |
| int | $noencodehtmltext | Do not encode into html entity the htmltext |
| int | $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, '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 | $forcenowrap | Force no wrap between text and picto (works with notabs=2 only) |
Definition at line 591 of file html.form.class.php.
References img_help(), img_picto(), img_warning(), and textwithtooltip().
Referenced by editfieldkey(), and showrefnav().
| 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 | $tooltipon | 1=tooltip on text, 2=tooltip on image, 3=tooltip sur les 2 |
| int | $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 | $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 | $noencodehtmltext | Do not encode into html entity the htmltext |
| string | $tooltiptrigger | ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key) |
| int | $forcenowrap | Force no wrap between text and picto (works with notabs=2 only) |
Definition at line 514 of file html.form.class.php.
References dol_escape_htmltag(), and if.
Referenced by textwithpicto().
| Form::widgetForTranslation | ( | $fieldname, | |
| $object, | |||
| $perm, | |||
$typeofdata = 'string', |
|||
$check = '', |
|||
$morecss = '' |
|||
| ) |
Output edit in place form.
| string | $fieldname | Name of the field |
| object | $object | Object |
| 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), '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 317 of file html.form.class.php.
References db, GETPOST(), GETPOSTISSET(), img_picto(), and picto_from_langcode().