From c0ce584487af128fde4e862dc8357f4d5e26ef8b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 May 2020 00:26:04 +0200 Subject: [PATCH 1/6] Look and feel v12 --- htdocs/core/lib/company.lib.php | 5 ++++- htdocs/core/lib/functions.lib.php | 4 ++-- htdocs/societe/consumption.php | 15 +++++++++------ htdocs/societe/paymentmodes.php | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 4b0a2d5b131..ec8e91f5419 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -802,7 +802,10 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel print ''; // Ref - print ''.img_object($langs->trans("ShowProject"), ($obj->public ? 'projectpub' : 'project'))." ".$obj->ref.''; + print ''; + print $projecttmp->getNomUrl(1); + print ''; + // Label print ''.$obj->title.''; // Date start diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d08522bfaa4..2d8996523fe 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3167,7 +3167,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'off', 'on', 'order', 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', - 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', + 'setup', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic', @@ -3181,7 +3181,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (in_array($pictowithouttext, array('object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { $fa = 'far'; } - if (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp'))) { + if (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) { $fa = 'fab'; } diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index ad7383d81af..0ce28356d90 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist'; + // Security check $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; @@ -147,6 +149,7 @@ if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeA if ($object->fournisseur) { + $langs->load("supplier_proposal"); print ''; print $langs->trans('SupplierCode').''; print $object->code_fournisseur; @@ -352,14 +355,14 @@ if ($sql_select) $num = $db->num_rows($resql); - $param = "&socid=".$socid."&type_element=".$type_element; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; + $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($sprod_fulldescr) $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); if ($sref) $param .= "&sref=".urlencode($sref); - if ($month) $param .= "&month=".$month; - if ($year) $param .= "&year=".$year; - if ($optioncss != '') $param .= '&optioncss='.$optioncss; + if ($month) $param .= "&month=".urlencode($month); + if ($year) $param .= "&year=".urlencode($year); + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit); diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 6385346ce5d..e0636932cc2 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -963,7 +963,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' { $morehtmlright .= dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=createcard'); } - print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc ? ' (Stripe connection with StripeConnect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, ''); + print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc ? ' (Stripe connection with StripeConnect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'stripe-s'); $listofsources = array(); if (is_object($stripe)) From d3e21c82f2cd3cbf6f2e51d54a2b97321cc869e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 May 2020 02:38:12 +0200 Subject: [PATCH 2/6] CSS --- htdocs/theme/eldy/global.inc.php | 3 +++ htdocs/theme/md/style.css.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 4eaa193e682..3f6d999104e 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1963,6 +1963,9 @@ div.mainmenu { margin-left: 0px; min-width: 40px; } +a.tmenuimage:focus, .mainmenu.topmenuimage:focus { + outline: none; +} /* For mainmenu, we always load the img */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f1e2c9257e6..b9fe51ca252 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2005,6 +2005,9 @@ div.mainmenu { margin-left: 0px; min-width: 40px; } +a.tmenuimage:focus, .mainmenu.topmenuimage:focus { + outline: none; +} /* Do not load menu img if hidden to save bandwidth */ From 3f4ae8875fdae9895cbcdb73fbdc574518275a62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 May 2020 02:45:09 +0200 Subject: [PATCH 3/6] Fix bad tooltip --- htdocs/asset/class/asset.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 7c9d91d79e7..21cd3b6393e 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -82,7 +82,7 @@ class Asset extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1), 'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), 'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), - 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",), + 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,), From 479e8ceceb300ce212f963fdf4bf0ab8320a92fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 May 2020 03:19:37 +0200 Subject: [PATCH 4/6] Look and feel v12 --- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/css/style.css | 2 +- htdocs/opensurvey/results.php | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 32dde7ddb3e..56aabc24721 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -214,7 +214,7 @@ print ''; $head = opensurvey_prepare_head($object); -dol_fiche_head($head, 'general', $langs->trans("Survey"), -1, DOL_URL_ROOT.'/opensurvey/img/object_opensurvey.png', 1); +dol_fiche_head($head, 'general', $langs->trans("Survey"), -1, 'poll'); $morehtmlref = ''; diff --git a/htdocs/opensurvey/css/style.css b/htdocs/opensurvey/css/style.css index e6b84f5fde5..d9cf48c72ee 100644 --- a/htdocs/opensurvey/css/style.css +++ b/htdocs/opensurvey/css/style.css @@ -367,8 +367,8 @@ div.cadre td.vide { /*Case de tableau contenant les noms dans affichage de sondage*/ div.cadre td.nom { background-color: #DDDDDD; - font-size:12px; text-align:center; + padding: 8px; } div.cadre td.casevide { background-color: white; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 337ccb3e435..181ec830433 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -421,10 +421,11 @@ $toutsujet = str_replace("°", "'", $toutsujet); print '
'."\n"; +print ''; $head = opensurvey_prepare_head($object); -dol_fiche_head($head, 'preview', $langs->trans("Survey"), -1, DOL_URL_ROOT.'/opensurvey/img/object_opensurvey.png', 1); +dol_fiche_head($head, 'preview', $langs->trans("Survey"), -1, 'poll'); $morehtmlref = ''; @@ -519,6 +520,7 @@ if (GETPOST('ajoutsujet')) if (!$user->rights->opensurvey->write) accessforbidden(); print ''."\n"; + print ''; print ''; print '
'."\n"; @@ -605,6 +607,7 @@ if ($user->rights->opensurvey->write) { $nbcolonnes = substr_count($object->sujet, ',') + 1; print ''."\n"; +print ''; print '
'."\n"; @@ -766,7 +769,7 @@ else print ''.dol_htmlentities($tmp[0]).''."\n"; } - print ''.img_picto('', dol_buildpath('/opensurvey/img/add-16.png', 1), '', 1).''."\n"; + print ''."\n"; print ''."\n"; } From 0b48ffe3cd127e503c3493bc084d75af82bbbbb6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 May 2020 11:38:28 +0200 Subject: [PATCH 5/6] Removed not used var $useglobalvars --- htdocs/core/ajax/ajaxdirpreview.php | 2 +- htdocs/core/class/html.form.class.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index bb6a8de30d4..83227b00e51 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -355,7 +355,7 @@ if ($useajax || $action == 'delete') $section_id = $section; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $useglobalvars = 1; + $form = new Form($db); $formquestion['urlfile'] = array('type'=>'hidden', 'value'=>$urlfile, 'name'=>'urlfile'); // We must always put field, even if empty because it is filled by javascript later $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); // We must always put field, even if empty because it is filled by javascript later diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f2b11938ca2..30519077c9e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4207,7 +4207,6 @@ class Form public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0) { global $langs, $conf; - global $useglobalvars; $more = ''; $formconfirm = ''; @@ -4355,7 +4354,7 @@ class Form if (isset($input['inputko']) && $input['inputko'] == 1) array_push($inputko, $input['name']); } } - // Show JQuery confirm box. Note that global var $useglobalvars is used inside this template + // Show JQuery confirm box. $formconfirm .= '