This commit is contained in:
Laurent Destailleur 2021-12-12 23:47:40 +01:00
parent f6c1ad6094
commit bb1d5daa82
12 changed files with 91 additions and 77 deletions

View File

@ -992,14 +992,14 @@ if ($resql) {
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view products
@ -1008,14 +1008,14 @@ if ($resql) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300' : 'maxwidth250'), 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300 widthcentpercentminusx' : 'maxwidth250 widthcentpercentminusx'), 1);
$moreforfilter .= '</div>';
}
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300' : 'maxwidth250'));
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300 widthcentpercentminusx' : 'maxwidth250 widthcentpercentminusx'));
$moreforfilter .= '</div>';
}
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) {

View File

@ -967,14 +967,14 @@ if ($resql) {
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view other users
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
@ -983,14 +983,14 @@ if ($resql) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
$moreforfilter .= '</div>';
}
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, 'maxwidth300 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
@ -998,7 +998,7 @@ if ($resql) {
$formproduct = new FormProduct($db);
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('Warehouse');
$moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle);
$moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle, 0, 0, array(), 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
$parameters = array();

View File

@ -420,20 +420,20 @@ if (!empty($filter_opcloture) && $filter_opcloture != -1) {
$param .= '&amp;filter_opcloture='.urlencode($filter_opcloture);
}
if ($filter_dateouvertureprevue_start != '') {
$param .= '&amp;opouvertureprevueday='.$opouvertureprevueday.'&amp;opouvertureprevuemonth='.$opouvertureprevuemonth.'&amp;opouvertureprevueyear='.$opouvertureprevueyear;
$param .= '&amp;opouvertureprevueday='.((int) $opouvertureprevueday).'&amp;opouvertureprevuemonth='.((int) $opouvertureprevuemonth).'&amp;opouvertureprevueyear='.((int) $opouvertureprevueyear);
}
if ($filter_date1_start != '') {
$param .= '&amp;op1day='.$op1day.'&amp;op1month='.$op1month.'&amp;op1year='.$op1year;
$param .= '&amp;op1day='.((int) $op1day).'&amp;op1month='.((int) $op1month).'&amp;op1year='.((int) $op1year);
}
if ($filter_date2_start != '') {
$param .= '&amp;op2day='.$op2day.'&amp;op2month='.$op2month.'&amp;op2year='.$op2year;
$param .= '&amp;op2day='.((int) $op2day).'&amp;op2month='.((int) $op2month).'&amp;op2year='.((int) $op2year);
}
if ($filter_datecloture_start != '') {
$param .= '&amp;opclotureday='.$op2day.'&amp;opcloturemonth='.$op2month.'&amp;opclotureyear='.$op2year;
$param .= '&amp;opclotureday='.((int) $op2day).'&amp;opcloturemonth='.((int) $op2month).'&amp;opclotureyear='.((int) $op2year);
}
if ($optioncss != '') {
$param .= '&optioncss='.$optioncss;
$param .= '&optioncss='.urlencode($optioncss);
}
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -489,9 +489,9 @@ $moreforfilter = '';
if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) {
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('IncludingProductWithTag').': ';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'widthcentpercentminusx maxwidth300', 1);
$moreforfilter .= '</div>';
}
@ -618,7 +618,7 @@ if (!empty($arrayfields['s.nom']['checked'])) {
if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) {
print '<td class="liste_titre center">';
$arrayofoperators = array('<'=>'<', '>'=>'>');
print $form->selectarray('filter_opouvertureprevue', $arrayofoperators, $filter_opouvertureprevue, 1);
print $form->selectarray('filter_opouvertureprevue', $arrayofoperators, $filter_opouvertureprevue, 1, 0, 0, '', 0, 0, 0, '', 'width50');
print ' ';
$filter_dateouvertureprevue = dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear);
print $form->selectDate($filter_dateouvertureprevue, 'opouvertureprevue', 0, 0, 1, '', 1, 0);
@ -627,7 +627,7 @@ if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) {
if (!empty($arrayfields['cd.date_ouverture']['checked'])) {
print '<td class="liste_titre center">';
$arrayofoperators = array('<'=>'<', '>'=>'>');
print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1);
print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1, 0, 0, '', 0, 0, 0, '', 'width50');
print ' ';
$filter_date1 = dol_mktime(0, 0, 0, $op1month, $op1day, $op1year);
print $form->selectDate($filter_date1, 'op1', 0, 0, 1, '', 1, 0);
@ -636,7 +636,7 @@ if (!empty($arrayfields['cd.date_ouverture']['checked'])) {
if (!empty($arrayfields['cd.date_fin_validite']['checked'])) {
print '<td class="liste_titre center">';
$arrayofoperators = array('<'=>'<', '>'=>'>');
print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1);
print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1, 0, 0, '', 0, 0, 0, '', 'width50');
print ' ';
$filter_date2 = dol_mktime(0, 0, 0, $op2month, $op2day, $op2year);
print $form->selectDate($filter_date2, 'op2', 0, 0, 1, '', 1, 0);
@ -645,7 +645,7 @@ if (!empty($arrayfields['cd.date_fin_validite']['checked'])) {
if (!empty($arrayfields['cd.date_cloture']['checked'])) {
print '<td class="liste_titre center">';
$arrayofoperators = array('<'=>'<', '>'=>'>');
print $form->selectarray('filter_opcloture', $arrayofoperators, $filter_opcloture, 1);
print $form->selectarray('filter_opcloture', $arrayofoperators, $filter_opcloture, 1, 0, 0, '', 0, 0, 0, '', 'width50');
print ' ';
$filter_date_cloture = dol_mktime(0, 0, 0, $opcloturemonth, $opclotureday, $opclotureyear);
print $form->selectDate($filter_date_cloture, 'opcloture', 0, 0, 1, '', 1, 0);

View File

@ -7961,19 +7961,19 @@ class Form
/**
* Show a multiselect form from an array. WARNING: Use this only for short lists.
*
* @param string $htmlname Name of select
* @param array $array Array with key+value
* @param array $selected Array with key+value preselected
* @param int $key_in_label 1 to show key like in "[key] value"
* @param int $value_as_key 1 to use value as key
* @param string $morecss Add more css style
* @param int $translate Translate and encode value
* @param int $width Force width of select box. May be used only when using jquery couch. Example: 250, 95%
* @param string $moreattrib Add more options on select component. Example: 'disabled'
* @param 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.
* @param string $placeholder String to use as placeholder
* @param int $addjscombo Add js combo
* @return string HTML multiselect string
* @param string $htmlname Name of select
* @param array $array Array with key+value
* @param array $selected Array with key+value preselected
* @param int $key_in_label 1 to show key like in "[key] value"
* @param int $value_as_key 1 to use value as key
* @param string $morecss Add more css style
* @param int $translate Translate and encode value
* @param int|string $width Force width of select box. May be used only when using jquery couch. Example: 250, '95%'
* @param string $moreattrib Add more options on select component. Example: 'disabled'
* @param 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.
* @param string $placeholder String to use as placeholder
* @param int $addjscombo Add js combo
* @return string HTML multiselect string
* @see selectarray(), selectArrayAjax(), selectArrayFilter()
*/
public static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1)

View File

@ -58,9 +58,10 @@ class FormPropal
* @param int $showempty 1=Add empty line
* @param string $mode 'customer', 'supplier'
* @param string $htmlname Name of select field
* @param string $morecss More css
* @return void
*/
public function selectProposalStatus($selected = '', $short = 0, $excludedraft = 0, $showempty = 1, $mode = 'customer', $htmlname = 'propal_statut')
public function selectProposalStatus($selected = '', $short = 0, $excludedraft = 0, $showempty = 1, $mode = 'customer', $htmlname = 'propal_statut', $morecss = '')
{
global $langs;
@ -99,7 +100,7 @@ class FormPropal
}
}
print '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
print '<select id="'.$htmlname.'" name="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'">';
if ($showempty) {
print '<option value="-1">&nbsp;</option>';
}

View File

@ -1200,14 +1200,14 @@ if ($resql) {
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view other users
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
@ -1216,7 +1216,7 @@ if ($resql) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
$moreforfilter .= '</div>';
}
$parameters = array();

View File

@ -624,14 +624,14 @@ if ($resql) {
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
$moreforfilter .= '</div>';
}
// If the user can view products
@ -640,7 +640,7 @@ if ($resql) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
$moreforfilter .= '</div>';
}
$parameters = array();
@ -796,8 +796,8 @@ if ($resql) {
}
// Status
if (!empty($arrayfields['sp.fk_statut']['checked'])) {
print '<td class="liste_titre maxwidthonsmartphone right">';
$formpropal->selectProposalStatus($search_status, 1, 0, 1, 'supplier', 'search_status');
print '<td class="liste_titre right">';
$formpropal->selectProposalStatus($search_status, 1, 0, 1, 'supplier', 'search_status', 'minwidth75imp');
print '</td>';
}
// Action column
@ -910,11 +910,11 @@ if ($resql) {
print '<tr class="oddeven">';
if (!empty($arrayfields['sp.ref']['checked'])) {
print '<td class="nowrap">';
print '<td class="nowraponall">';
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
// Picto + Ref
print '<td class="nobordernopadding nowrap">';
print '<td class="nobordernopadding nowraponall">';
print $objectstatic->getNomUrl(1, '', '', 0, -1, 1);
print '</td>';
// Warning

View File

@ -1645,6 +1645,7 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
.minwidth50imp { min-width: 50px !important; }
.minwidth75imp { min-width: 75px !important; }
.minwidth100imp { min-width: 100px !important; }
.minwidth125imp { min-width: 125px !important; }
.minwidth150imp { min-width: 110px !important; }
.minwidth200imp { min-width: 110px !important; }
.minwidth250imp { min-width: 115px !important; }

View File

@ -342,7 +342,7 @@ a.top-menu-dropdown-link {
display: block !important;
box-sizing: border-box;
width: 100%;
padding: .25rem 1.5rem .25rem 1rem;
padding: .3em 1.5em .4em 1em;
clear: both;
font-weight: 400;
color: #212529 !important;
@ -374,6 +374,10 @@ a.top-menu-dropdown-link {
content: none !important;
}
.dropdown-item.bookmark-item-external::before {
content: "\f35d";
}
.dropdown-item.active, .dropdown-item:hover, .dropdown-item:focus {
color: #<?php echo $colortextbackhmenu; ?> !important;
text-decoration: none;

View File

@ -829,7 +829,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print '<input type="hidden" id="lastname" name="lastname" value="'.dol_escape_htmltag($ldap_lastname).'">';
print $ldap_lastname;
} else {
print '<input class="minwidth100" type="text" id="lastname" name="lastname" value="'.dol_escape_htmltag(GETPOST('lastname', 'alphanohtml')).'">';
print '<input class="minwidth100 maxwidth150onsmartphone" type="text" id="lastname" name="lastname" value="'.dol_escape_htmltag(GETPOST('lastname', 'alphanohtml')).'">';
}
print '</td></tr>';
@ -840,7 +840,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print '<input type="hidden" name="firstname" value="'.dol_escape_htmltag($ldap_firstname).'">';
print $ldap_firstname;
} else {
print '<input class="minwidth100" type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST('firstname', 'alphanohtml')).'">';
print '<input class="minwidth100 maxwidth150onsmartphone" type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST('firstname', 'alphanohtml')).'">';
}
print '</td></tr>';
@ -854,7 +854,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print '<input type="hidden" name="login" value="'.dol_escape_htmltag($ldap_loginsmb).'">';
print $ldap_loginsmb;
} else {
print '<input class="maxwidth200" maxsize="24" type="text" name="login" value="'.dol_escape_htmltag(GETPOST('login', 'alphanohtml')).'">';
print '<input class="maxwidth200 maxwidth150onsmartphone" maxsize="24" type="text" name="login" value="'.dol_escape_htmltag(GETPOST('login', 'alphanohtml')).'">';
}
print '</td></tr>';
@ -923,7 +923,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Hierarchy
print '<tr><td class="titlefieldcreate">'.$langs->trans("HierarchicalResponsible").'</td>';
print '<td>';
print img_picto('', 'user').$form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
print '</td>';
print "</tr>\n";
@ -934,7 +934,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
print '</td>';
print '<td>';
print img_picto('', 'user').$form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
print '</td>';
print "</tr>\n";
}
@ -946,7 +946,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help');
print '</td>';
print '<td>';
print img_picto('', 'user').$form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
print img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
print '</td>';
print "</tr>\n";
}
@ -988,7 +988,7 @@ if ($action == 'create' || $action == 'adduserldap') {
$valuetoshow .= preg_replace('/./i', '*', $ldap_pass);
} else {
// We do not use a field password but a field text to show new password to use.
$valuetoshow .= ($valuetoshow ? ', ' : '').'<input size="30" maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="new-password">';
$valuetoshow .= ($valuetoshow ? ', ' : '').'<input maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="new-password">';
}
}
@ -1009,7 +1009,7 @@ if ($action == 'create' || $action == 'adduserldap') {
//$generated_password = getRandomPassword(false);
print '<tr><td>'.$langs->trans("ApiKey").'</td>';
print '<td>';
print '<input class="minwidth300" maxsize="32" type="text" id="api_key" name="api_key" value="'.GETPOST('api_key', 'alphanohtml').'" autocomplete="off">';
print '<input class="minwidth300 widthcentpercentminusx" maxsize="32" type="text" id="api_key" name="api_key" value="'.GETPOST('api_key', 'alphanohtml').'" autocomplete="off">';
if (!empty($conf->use_javascript_ajax)) {
print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"');
}
@ -1042,7 +1042,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Country
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
print img_picto('', 'country', 'class="paddingrightonly"');
print img_picto('', 'country', 'class="pictofixedwidth"');
print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id));
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
@ -1060,43 +1060,43 @@ if ($action == 'create' || $action == 'adduserldap') {
// Tel
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
print '<td>';
print img_picto('', 'object_phoning');
print img_picto('', 'object_phoning', 'class="pictofixedwidth"');
if (!empty($ldap_phone)) {
print '<input type="hidden" name="office_phone" value="'.dol_escape_htmltag($ldap_phone).'">';
print $ldap_phone;
} else {
print '<input type="text" name="office_phone" value="'.dol_escape_htmltag(GETPOST('office_phone', 'alphanohtml')).'">';
print '<input class="maxwidth200 widthcentpercentminusx" type="text" name="office_phone" value="'.dol_escape_htmltag(GETPOST('office_phone', 'alphanohtml')).'">';
}
print '</td></tr>';
// Tel portable
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
print '<td>';
print img_picto('', 'object_phoning_mobile');
print img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"');
if (!empty($ldap_mobile)) {
print '<input type="hidden" name="user_mobile" value="'.dol_escape_htmltag($ldap_mobile).'">';
print $ldap_mobile;
} else {
print '<input type="text" name="user_mobile" value="'.dol_escape_htmltag(GETPOST('user_mobile', 'alphanohtml')).'">';
print '<input class="maxwidth200 widthcentpercentminusx" type="text" name="user_mobile" value="'.dol_escape_htmltag(GETPOST('user_mobile', 'alphanohtml')).'">';
}
print '</td></tr>';
// Fax
print '<tr><td>'.$langs->trans("Fax").'</td>';
print '<td>';
print img_picto('', 'object_phoning_fax');
print img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"');
if (!empty($ldap_fax)) {
print '<input type="hidden" name="office_fax" value="'.dol_escape_htmltag($ldap_fax).'">';
print $ldap_fax;
} else {
print '<input type="text" name="office_fax" value="'.dol_escape_htmltag(GETPOST('office_fax', 'alphanohtml')).'">';
print '<input class="maxwidth200 widthcentpercentminusx" type="text" name="office_fax" value="'.dol_escape_htmltag(GETPOST('office_fax', 'alphanohtml')).'">';
}
print '</td></tr>';
// EMail
print '<tr><td'.(!empty($conf->global->USER_MAIL_REQUIRED) ? ' class="fieldrequired"' : '').'>'.$langs->trans("EMail").'</td>';
print '<td>';
print img_picto('', 'object_email');
print img_picto('', 'object_email', 'class="pictofixedwidth"');
if (!empty($ldap_mail)) {
print '<input type="hidden" name="email" value="'.dol_escape_htmltag($ldap_mail).'">';
print $ldap_mail;
@ -1105,19 +1105,20 @@ if ($action == 'create' || $action == 'adduserldap') {
}
print '</td></tr>';
// Social networks
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
if ($value['active']) {
print '<tr><td>'.$langs->trans($value['label']).'</td>';
print '<td>';
if (!empty($value['icon'])) {
print '<span class="fa '.$value['icon'].'"></span>';
print '<span class="fa '.$value['icon'].' pictofixedwidth"></span>';
}
if (!empty($ldap_social[$key])) {
print '<input type="hidden" name="'.$key.'" value="'.$ldap_social[$key].'">';
print $ldap_social[$key];
} else {
print '<input class="maxwidth200" type="text" name="'.$key.'" value="'.GETPOST($key, 'alphanohtml').'">';
print '<input class="maxwidth200 widthcentpercentminusx" type="text" name="'.$key.'" value="'.GETPOST($key, 'alphanohtml').'">';
}
print '</td></tr>';
} else {
@ -1135,7 +1136,7 @@ if ($action == 'create' || $action == 'adduserldap') {
if (!empty($conf->accounting->enabled)) {
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
print '<td>';
print '<input type="text" name="accountancy_code" value="'.dol_escape_htmltag(GETPOST('accountancy_code', 'alphanohtml')).'">';
print '<input type="text" class="maxwidthonsmartphone" name="accountancy_code" value="'.dol_escape_htmltag(GETPOST('accountancy_code', 'alphanohtml')).'">';
print '</td></tr>';
}
@ -1149,16 +1150,16 @@ if ($action == 'create' || $action == 'adduserldap') {
// Categories
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td><td colspan="3">';
print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td><td>';
$cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
print img_picto('', 'category').$form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%');
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), 0, 0, 'maxwdith300 widthcentpercentminusx', 0, '90%');
print "</td></tr>";
}
if (!empty($conf->global->MAIN_MULTILANGS)) {
print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0, 'string', '', 0, 0, 'id', $langs->trans("WarningNotLangOfInterface", $langs->transnoentitiesnoconv("UserGUISetup"))).'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">'."\n";
print img_picto('', 'language').$formadmin->select_language(GETPOST('default_lang', 'alpha') ?GETPOST('default_lang', 'alpha') : ($object->lang ? $object->lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone');
print '<td class="maxwidthonsmartphone">'."\n";
print img_picto('', 'language', 'class="pictofixedwidth"').$formadmin->select_language(GETPOST('default_lang', 'alpha') ?GETPOST('default_lang', 'alpha') : ($object->lang ? $object->lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone widthcentpercentminusx');
print '</td>';
print '</tr>';
}
@ -1178,7 +1179,7 @@ if ($action == 'create' || $action == 'adduserldap') {
}
// Other attributes
$parameters = array('colspan' => ' colspan="3"');
$parameters = array();
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
// Note
@ -1214,7 +1215,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Position/Job
print '<tr><td class="titlefieldcreate">'.$langs->trans("PostOrFunction").'</td>';
print '<td>';
print '<input class="maxwidth200" type="text" name="job" value="'.dol_escape_htmltag(GETPOST('job', 'alphanohtml')).'">';
print '<input class="maxwidth200 maxwidth150onsmartphone" type="text" name="job" value="'.dol_escape_htmltag(GETPOST('job', 'alphanohtml')).'">';
print '</td></tr>';
if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && in_array($id, $childids))

View File

@ -127,7 +127,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
} elseif ($userstatic->admin) {
$li .= img_picto($langs->trans("Administrator"), 'star');
}
$li .= ' ('.$val['login'].($entitystring ? ' - '.$entitystring : '').')';
$li .= ' <span class="opacitymedium">('.$val['login'].($entitystring ? ' - '.$entitystring : '').')</span>';
$entry = '<table class="nobordernopadding centpercent"><tr><td class="'.($val['statut'] ? 'usertdenabled' : 'usertddisabled').'">'.$li.'</td><td align="right" class="'.($val['statut'] ? 'usertdenabled' : 'usertddisabled').'">'.$userstatic->getLibStatut(2).'</td></tr></table>';
@ -154,7 +154,11 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
$param = array('morecss'=>'marginleftonly btnTitleSelected');
$morehtmlright .= dolGetButtonTitle($langs->trans("HierarchicView"), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/user/hierarchy.php'.(($search_statut != '' && $search_statut >= 0) ? '?search_statut='.$search_statut : ''), '', 1, $param);
print load_fiche_titre($title, $morehtmlright.' '.$newcardbutton, 'user');
$massactionbutton = '';
$num = 0;
$limit = 0;
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, '', 'user', 0, $morehtmlright.' '.$newcardbutton, '', $limit, 0, 0, 1);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') {
@ -167,6 +171,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="liste nohover centpercent">';
print '<tr class="liste_titre_filter">';
@ -174,7 +179,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
print '<td class="liste_titre">&nbsp;</td>';
// Status
print '<td class="liste_titre right">';
print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut);
print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
print '</td>';
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterAndCheckAddButtons(0);
@ -184,7 +189,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
print '<tr class="liste_titre">';
print_liste_field_titre("HierarchicView");
print_liste_field_titre('<div id="iddivjstreecontrol"><a href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> | <a href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a></div>', $_SERVER['PHP_SELF'], "", '', "", 'align="center"');
print_liste_field_titre('<div id="iddivjstreecontrol"><a href="#">'.img_picto('', 'folder', 'class="paddingright"').'<span class="hideonsmartphone">'.$langs->trans("UndoExpandAll").'</span></a> | <a href="#">'.img_picto('', 'folder-open', 'class="paddingright"').'<span class="hideonsmartphone">'.$langs->trans("ExpandAll").'</span></a></div>', $_SERVER['PHP_SELF'], "", '', "", 'align="center"');
print_liste_field_titre("Status", $_SERVER['PHP_SELF'], "", '', "", 'align="right"');
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch ');
print '</tr>';
@ -213,6 +218,8 @@ if (!is_array($user_arbo) && $user_arbo < 0) {
}
print "</table>";
print '</div>';
print "</form>\n";
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
@ -726,7 +726,7 @@ if (!empty($arrayfields['u.tms']['checked'])) {
if (!empty($arrayfields['u.statut']['checked'])) {
// Status
print '<td class="liste_titre center">';
print $form->selectarray('search_statut', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth50');
print $form->selectarray('search_statut', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
print '</td>';
}
// Action column