diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 72c9f7ef880..cf1614bbb6e 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -884,7 +884,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Gender print ''.$langs->trans("Gender").''; print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; @@ -1107,7 +1107,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Gender print ''.$langs->trans("Gender").''; print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 60e10ba44ea..c475023c00d 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -477,7 +477,7 @@ if (!empty($arrayfields['d.lastname']['checked'])) { } if (!empty($arrayfields['d.gender']['checked'])) { print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), , 'other'=>$langs->trans("Genderother")); print $form->selectarray('search_gender', $arraygender, $search_gender, 1); print ''; } diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 63da0be8677..c4a28c63d86 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -628,7 +628,7 @@ if ($rowid > 0) { $subscriptionstatic->ref = $objp->crowid; $subscriptionstatic->id = $objp->crowid; - $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); + $typeid = $objp->cfk_type; if ($typeid > 0) { $adht->fetch($typeid); } diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index a78913b7e16..a2b35c9eceb 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -1,6 +1,7 @@ * Copyright (C) 2014-2018 Frederic France + * Copyright (C) 2020 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -155,6 +156,9 @@ if ($mode == 'setup' && $user->admin) // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). // We pass this param list in to 'state' because we need it before and after the redirect. $shortscope = 'userinfo_email,userinfo_profile,cloud_print'; + if (!empty($conf->global->OAUTH_GSUITE)){ + $shortscope .= ',admin_directory_user'; + } //$scope.=',gmail_full'; $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index da74784505a..2eea751f8ac 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -36,7 +36,7 @@ if (!$user->admin) accessforbidden(); $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); -$scandir = GETPOST('scan_dir', 'alpha'); +$scandir = GETPOST('scandir', 'alpha'); $type = 'supplier_payment'; @@ -267,7 +267,7 @@ foreach ($dirmodels as $reldir) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index b47f355c451..7a11d22aa53 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -923,6 +923,9 @@ if ($id > 0 || !empty($ref)) { print ' '; // Supplier ref + Qty ordered + qty already dispatched } else { $type = 'dispatch'; + $colspan = 7; + $colspan = (!empty($conf->global->PRODUCT_DISABLE_EATBY)) ? --$colspan : $colspan; + $colspan = (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) ? --$colspan : $colspan; print ''; print ''; // Qty to dispatch print ''; @@ -949,7 +952,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -1086,7 +1089,7 @@ if ($id > 0 || !empty($ref)) { var fk_default_warehouse = $("option:selected", this).val(); $("select[name^=entrepot_]").val(fk_default_warehouse).change(); }); - + jQuery("#autoreset").click(function() {'; $i = 0; while ($i < $nbproduct) { diff --git a/htdocs/includes/OAuth/OAuth2/Service/Google.php b/htdocs/includes/OAuth/OAuth2/Service/Google.php index 0d49609dccb..5ab0f8a474b 100644 --- a/htdocs/includes/OAuth/OAuth2/Service/Google.php +++ b/htdocs/includes/OAuth/OAuth2/Service/Google.php @@ -116,6 +116,11 @@ class Google extends AbstractService // Android Publisher const SCOPE_ANDROID_PUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'; + + // Google Gsuite + const SCOPE_ADMIN_DIRECTORY_USER = "https://www.googleapis.com/auth/admin.directory.user"; + const SCOPE_ADMIN_DIRECTORY_CUSTOMER = "https://www.googleapis.com/auth/admin.directory.customer"; + protected $accessType = 'online'; public function __construct( @@ -150,7 +155,7 @@ class Google extends AbstractService } $this->approvalPrompt = $prompt; } - + /** * {@inheritdoc} */ diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 16805424e61..04d29a7e0e2 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -840,6 +840,7 @@ ListOfTemplates=List of templates Gender=Gender Genderman=Man Genderwoman=Woman +Genderother=Other ViewList=List view ViewGantt=Gantt view ViewKanban=Kanban view diff --git a/htdocs/product/card.php b/htdocs/product/card.php index df3f21a453a..535d39a34c6 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -290,7 +291,8 @@ if (empty($reshook)) $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'none')); $object->note = $object->note_private; // deprecated $object->customcode = GETPOST('customcode', 'alphanohtml'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); $object->duration_value = $duration_value; $object->duration_unit = $duration_unit; $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); @@ -395,7 +397,8 @@ if (empty($reshook)) $object->note = $object->note_private; } $object->customcode = GETPOST('customcode', 'alpha'); - $object->country_id = GETPOST('country_id', 'int'); + $object->country_id = GETPOST('country_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); $object->status = GETPOST('statut', 'int'); $object->status_buy = GETPOST('statut_buy', 'int'); $object->status_batch = GETPOST('status_batch', 'aZ09'); @@ -866,6 +869,7 @@ llxHeader('', $title, $helpurl); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); +$formcompany = new FormCompany($db); if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); // Load object modBarCodeProduct @@ -908,6 +912,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + print ''."\n"; + // Load object modCodeProduct $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') @@ -922,7 +935,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) dol_set_focus('input[name="ref"]'); - print '
'; + print ''; print ''; print ''; print ''."\n"; @@ -942,6 +955,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $linkback = ""; print load_fiche_titre($title, $linkback, $picto); + // We set country_id, country_code and country for the selected country + $object->country_id = GETPOST('country_id', 'int) ? GETPOST('country_id', 'int') : null; + if ($object->country_id > 0) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } + dol_fiche_head(''); print ''; @@ -1114,14 +1136,31 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Custom code if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) { - print ''; - if ($conf->browser->layout == 'phone') print ''; + print ''; + // Origin country print ''; print ''; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ''; + + // State + if (empty($conf->global->PRODUCT_DISABLE_STATE)) + { + if ($conf->browser->layout == 'phone') print ''; + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + print ''; } // Other attributes @@ -1333,12 +1372,31 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + print ''."\n"; + + // We set country_id, country_code and country for the selected country + $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id; + if ($object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } + + $type = $langs->trans('Product'); if ($object->isService()) $type = $langs->trans('Service'); //print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); // Main official, simple, and not duplicated code - print ''."\n"; + print ''."\n"; print ''; print ''; print ''; @@ -1349,6 +1407,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); + print '
'.$langs->trans("CustomCode").'
'.$langs->trans("CustomCode").'
'.$langs->trans("CountryOrigin").''; - print $form->select_country(GETPOST('country_id', 'int'), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'.$form->editfieldkey('Region-StateOrigine', 'state_id', '', $object, 0).''; + } else { + print ''.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).''; + } + + print $formcompany->select_state($object->state_id, $object->country_code); + print '
'; // Ref @@ -1529,12 +1588,29 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Custom code if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) { - print ''; + print ''; // Origin country - print ''; + print ''; + print ''; + // State + if (empty($conf->global->PRODUCT_DISABLE_STATE)) + { + if ($conf->browser->layout == 'phone') print ''; + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + print ''; } // Other attributes @@ -2031,7 +2107,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; // Origin country code - print ''; + print ''; } // Other attributes diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 8ae09ea45aa..9ba528d3b3d 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -883,6 +883,10 @@ class Product extends CommonObject $this->country_id = 0; } + if (empty($this->state_id)) { + $this->state_id = 0; + } + // Barcode value $this->barcode = trim($this->barcode); @@ -1000,6 +1004,7 @@ class Product extends CommonObject $sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null'); $sql .= ", customcode = '".$this->db->escape($this->customcode)."'"; $sql .= ", fk_country = ".($this->country_id > 0 ? (int) $this->country_id : 'null'); + $sql .= ", fk_state = ".($this->state_id > 0 ? (int) $this->state_id : 'null'); $sql .= ", note = ".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : 'null'); $sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'"; $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; @@ -2025,7 +2030,7 @@ class Product extends CommonObject return -1; } - $sql = "SELECT rowid, ref, ref_ext, label, description, url, note_public, note as note_private, customcode, fk_country, price, price_ttc,"; + $sql = "SELECT rowid, ref, ref_ext, label, description, url, note_public, note as note_private, customcode, fk_country, fk_state, price, price_ttc,"; $sql .= " price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell,"; $sql .= " tobuy, fk_product_type, duration, fk_default_warehouse, seuil_stock_alerte, canvas, net_measure, net_measure_units, weight, weight_units,"; $sql .= " length, length_units, width, width_units, height, height_units,"; @@ -2073,6 +2078,7 @@ class Product extends CommonObject $this->customcode = $obj->customcode; $this->country_id = $obj->fk_country; $this->country_code = getCountry($this->country_id, 2, $this->db); + $this->state_id = $obj->fk_state; $this->price = $obj->price; $this->price_ttc = $obj->price_ttc; $this->price_min = $obj->price_min; @@ -5204,17 +5210,15 @@ class Product extends CommonObject $this->barcode = -1; // Create barcode automatically } - /** - * Returns the label, shot_label or code found in units dictionary from ->fk_unit. - * A langs->trans() must be called on result to get translated value. - * - * @param string $type Label type (long, short or code) - * @return string|int <0 if KO, label if OK (Example: 'long', 'short', 'unitCODE') - * @see getLabelOfUnit() in CommonObjectLine - */ - public function getLabelOfUnit($type = 'long') - { - global $langs; + /** + * Returns the text label from units dictionary + * + * @param string $type Label type (long or short) + * @return string|int <0 if ko, label if ok + */ + public function getLabelOfUnit($type = 'long') + { + global $langs; if (!$this->fk_unit) { return ''; @@ -5222,24 +5226,25 @@ class Product extends CommonObject $langs->load('products'); - $label_type = 'label'; - if ($type == 'short') $label_type = 'short_label'; - elseif ($type == 'code') $label_type = 'code'; + $label_type = 'label'; - $sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; - $resql = $this->db->query($sql); - if ($resql && $this->db->num_rows($resql) > 0) { - $res = $this->db->fetch_array($resql); - if ($label_type == 'code') $label = 'unit'.$res['code']; - else $label = $res[$label_type]; - $this->db->free($resql); - return $label; - } else { - $this->error = $this->db->error().' sql='.$sql; - dol_syslog(get_class($this)."::getLabelOfUnit Error ".$this->error, LOG_ERR); - return -1; - } - } + if ($type == 'short') { + $label_type = 'short_label'; + } + + $sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; + $resql = $this->db->query($sql); + if ($resql && $this->db->num_rows($resql) > 0) { + $res = $this->db->fetch_array($resql); + $label = ($label_type == 'short_label' ? $res[$label_type] : 'unit'.$res['code']); + $this->db->free($resql); + return $label; + } else { + $this->error = $this->db->error().' sql='.$sql; + dol_syslog(get_class($this)."::getLabelOfUnit Error ".$this->error, LOG_ERR); + return -1; + } + } /** * Return if object has a sell-by date or eat-by date diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 5c0ff331b87..821e2cd059c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6350,7 +6350,23 @@ a.phpdebugbar-tab.phpdebugbar-active { font-family: "Font Awesome 5 Free"; font-weight: 600; } - +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before, +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before, +div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, +div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before +{ + font-family: "Font Awesome 5 Free" !important; +} /* ============================================================================== */ /* CSS style used for jFlot */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 227f6bbba3d..f063b678216 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6210,7 +6210,23 @@ a.phpdebugbar-tab.phpdebugbar-active { font-family: "Font Awesome 5 Free"; font-weight: 600; } - +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before, +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before, +div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, +div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before +{ + font-family: "Font Awesome 5 Free" !important; +} /* ============================================================================== */ /* CSS style used for jFlot */ diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 94f801fed6d..8142ab323a1 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -943,7 +943,7 @@ if ($action == 'create' || $action == 'adduserldap') // Gender print ''; print ''; @@ -2200,7 +2200,7 @@ if ($action == 'create' || $action == 'adduserldap') // Gender print ''; print ''; }
'.$langs->trans("CustomCode").'
'.$langs->trans("CustomCode").'
'.$langs->trans("CountryOrigin").''; + print ''.$langs->trans("CountryOrigin").''; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'.$form->editfieldkey('Region-StateOrigine', 'state_id', '', $object, 0).''; + } else { + print ''.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).''; + } + + print $formcompany->select_state($object->state_id, $object->country_code); + print '
'.$langs->trans("CustomCode").''.$object->customcode.'
'.$langs->trans("CountryOrigin").''.getCountry($object->country_id, 0, $db).'
'.$langs->trans("Origin").''.getCountry($object->country_id, 0, $db); + if (!empty($object->state_id)) print ' - '.getState($object->state_id, 0, $db); + print '
'.$langs->trans("Gender").''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1); print '
'.$langs->trans("Gender").''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); if ($caneditfield) { print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ?GETPOST('gender') : $object->gender, 1); } else { diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 9f452962685..b51a486d58d 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -386,7 +386,7 @@ if (!empty($arrayfields['u.firstname']['checked'])) if (!empty($arrayfields['u.gender']['checked'])) { print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman")); + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('search_gender', $arraygender, $search_gender, 1); print '