Look and feel v18

This commit is contained in:
Laurent Destailleur 2023-04-24 01:32:47 +02:00
parent a03358fa46
commit 586d9f5ba7
9 changed files with 70 additions and 55 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2021 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2005-2023 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
@ -405,14 +405,14 @@ if ($object->fetch($id) >= 0) {
print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin ?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1) : ''), 'generic');
print '<div class="div-table-responsive">';
print '<div class="tagtable centpercent liste_titre_bydiv borderbottom" id="tablelines">';
print '<div class="tagtable centpercentimp liste_titre_bydiv borderbottom" id="tablelines">';
print '<div class="tagtr liste_titre">';
print '<div class="tagtd"></div>';
print '<div class="tagtd">'.$langs->trans("RecipientSelectionModules").'</div>';
print '<div class="tagtd" align="center">'.$langs->trans("NbOfUniqueEMails").'</div>';
print '<div class="tagtd left">'.$langs->trans("Filters");
print ' &nbsp; &nbsp; <div class="floatright">'.$langs->trans("EvenUnsubscribe").' ';
print '<div class="tagtd center maxwidth150">'.$langs->trans("NbOfUniqueEMails").'</div>';
print '<div class="tagtd left"><div class="inline-block">'.$langs->trans("Filters").'</div>';
print ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <div class=" inline-block">'.$langs->trans("EvenUnsubscribe").' ';
print ajax_object_onoff($object, 'evenunsubscribe', 'evenunsubscribe', 'EvenUnsubscribe:switch_on:warning', 'EvenUnsubscribe', array(), 'small valignmiddle', '', 1);
print '</div>';
print '</div>';

View File

@ -909,18 +909,18 @@ class Form
/**
* Return combo list of activated countries, into language of user
*
* @param string $selected Id or Code or Label of preselected country
* @param string $htmlname Name of html select object
* @param string $htmloption More html options on select object
* @param integer $maxlength Max length for labels (0=no limit)
* @param string $morecss More css class
* @param string $usecodeaskey ''=Use id as key (default), 'code3'=Use code on 3 alpha as key, 'code2"=Use code on 2 alpha as key
* @param int|string $showempty Show empty choice
* @param int $disablefavorites 1=Disable favorites,
* @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...)
* @param array $exclude_country_code Array of country code (iso2) to exclude
* @param int $hideflags Hide flags
* @return string HTML string with select
* @param string $selected Id or Code or Label of preselected country
* @param string $htmlname Name of html select object
* @param string $htmloption More html options on select object
* @param integer $maxlength Max length for labels (0=no limit)
* @param string $morecss More css class
* @param string $usecodeaskey ''=Use id as key (default), 'code3'=Use code on 3 alpha as key, 'code2"=Use code on 2 alpha as key
* @param int|string $showempty Show empty choice
* @param int $disablefavorites 1=Disable favorites,
* @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...)
* @param array $exclude_country_code Array of country code (iso2) to exclude
* @param int $hideflags Hide flags
* @return string HTML string with select
*/
public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array(), $hideflags = 0)
{
@ -973,7 +973,7 @@ class Form
if (is_numeric($showempty)) {
$out .= '<option value="">&nbsp;</option>' . "\n";
} else {
$out .= '<option value="">' . $langs->trans($showempty) . '</option>' . "\n";
$out .= '<option value="-1">' . $langs->trans($showempty) . '</option>' . "\n";
}
}

View File

@ -60,23 +60,23 @@ class FormProjets
/**
* Output a combo list with projects qualified for a third party / user
*
* @param 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)
* @param 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)
* @param string|Project $selected Id of preselected project or Project (or ''). Note: If you know the ref, you can also provide it into $selected_input_value to save one request in some cases.
* @param string $htmlname Name of HTML field
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param int $show_empty Add an empty line
* @param int $discard_closed Discard closed projects (0=Keep, 1=hide completely, 2=Disable). Use a negative value to not show the "discarded" tooltip.
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param int $mode 0 for HTML mode and 1 for JSON mode
* @param string $filterkey Key to filter on ref or title
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param string $morecss More css
* @param int $htmlid Html id to use instead of htmlname
* @param string $morefilter More filters (Must be a sql sanitized string)
* @return string Return html content
* @param string $htmlname Name of HTML field
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param int|string $show_empty Add an empty line
* @param int $discard_closed Discard closed projects (0=Keep, 1=hide completely, 2=Disable). Use a negative value to not show the "discarded" tooltip.
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param int $mode 0 for HTML mode and 1 for JSON mode
* @param string $filterkey Key to filter on ref or title
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param string $morecss More css
* @param int $htmlid Html id to use instead of htmlname
* @param string $morefilter More filters (Must be a sql sanitized string)
* @return string Return html content
*/
public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '', $morefilter = '')
{
@ -129,22 +129,22 @@ class FormProjets
/**
* Returns an array with projects qualified for a third party
*
* @param 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)
* @param int $selected Id project preselected
* @param string $htmlname Nom de la zone html
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param int $show_empty Add an empty line
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example)
* @param string $filterkey Key to filter on title or ref
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param int $htmlid Html id to use instead of htmlname
* @param string $morecss More CSS
* @param string $morefilter More filters (Must be a sql sanitized string)
* @param 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)
* @param int $selected Id project preselected
* @param string $htmlname Nom de la zone html
* @param int $maxlength Maximum length of label
* @param int $option_only Return only html options lines without the select tag
* @param int|string $show_empty Add an empty line
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
* @param int $forcefocus Force focus on field (works with javascript only)
* @param int $disabled Disabled
* @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example)
* @param string $filterkey Key to filter on title or ref
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param int $htmlid Html id to use instead of htmlname
* @param string $morecss More CSS
* @param string $morefilter More filters (Must be a sql sanitized string)
* @return int|string|array HTML string or array of option or <0 if KO
*/
public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '')
@ -206,7 +206,11 @@ class FormProjets
$out .= '<select class="flat' . ($morecss ? ' ' . $morecss : '') . '"' . ($disabled ? ' disabled="disabled"' : '') . ' id="' . $htmlid . '" name="' . $htmlname . '">';
}
if (!empty($show_empty)) {
$out .= '<option value="0">&nbsp;</option>';
if (is_numeric($show_empty)) {
$out .= '<option value="0">&nbsp;</option>';
} else {
$out .= '<option value="-1">'.$show_empty.'</option>';
}
}
$num = $this->db->num_rows($resql);
$i = 0;

View File

@ -310,7 +310,8 @@ class mailing_contacts1 extends MailingTargets
if (getDolGlobalInt('MAIN_MULTILANGS')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$formadmin = new FormAdmin($this->db);
$s .= '<span class="opacitymedium">'.$langs->trans("DefaultLang").':</span> ';
$s .= img_picto($langs->trans("DefaultLang"), 'language', 'class="pictofixedwidth"');
//$s .= '<span class="opacitymedium">'.$langs->trans("DefaultLang").':</span> ';
$s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang', 0, null, 1, 0, 0, '', 0, 0, 0, null, 1);
}

View File

@ -84,7 +84,9 @@ class mailing_eventorganization extends MailingTargets
$sql .= " AND e.fk_project = p.rowid";
$sql .= " AND p.entity IN (".getEntity('project').")";
$sql .= " AND e.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".((int) $mailing_id).")";
$sql .= " AND e.fk_project = ".((int) GETPOST('filter_eventorganization', 'int'));
if (GETPOST('filter_eventorganization', 'int') > 0) {
$sql .= " AND e.fk_project = ".((int) GETPOST('filter_eventorganization', 'int'));
}
if (empty($this->evenunsubscribe)) {
$sql .= " AND NOT EXISTS (SELECT rowid FROM ".MAIN_DB_PREFIX."mailing_unsubscribe as mu WHERE mu.email = e.email and mu.entity = ".((int) $conf->entity).")";
}
@ -192,7 +194,7 @@ class mailing_eventorganization extends MailingTargets
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
$formproject = new FormProjets($this->db);
$s = $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, 1, 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1');
$s = $formproject->select_projects(-1, 0, "filter_eventorganization", 0, 0, $langs->trans("OrganizedEvent"), 1, 0, 0, 0, '', 1, 0, '', '', 'usage_organize_event=1');
return $s;
}

View File

@ -368,7 +368,8 @@ class mailing_thirdparties extends MailingTargets
// Choose language
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$formadmin = new FormAdmin($this->db);
$s .= '<span class="opacitymedium">'.$langs->trans("DefaultLang").':</span> ';
$s .= img_picto($langs->trans("DefaultLang"), 'language', 'class="pictofixedwidth"');
//$s .= '<span class="opacitymedium">'.$langs->trans("DefaultLang").':</span> ';
$s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang_thirdparties', 0, null, 1, 0, 0, '', 0, 0, 0, null, 1);
}

View File

@ -53,6 +53,7 @@ EVENTORGANIZATION_FILTERATTENDEES_TYPE = In the form to create/add an attendee,
#
# Object
#
OrganizedEvent=Organized event
EventOrganizationConfOrBooth= Conference Or Booth
EventOrganizationConfOrBoothes=Conferences or Boothes
ManageOrganizeEvent = Manage the organization of an event

View File

@ -731,6 +731,9 @@ th .button {
.centpercent {
width: 100%;
}
.centpercentimp {
width: 100% !important;
}
.centpercentwithoutmenu {
width: calc(100% - 200px);
}

View File

@ -973,6 +973,9 @@ th .button {
.centpercent {
width: 100%;
}
.centpercentimp {
width: 100% !important;
}
.centpercentwithoutmenu {
width: calc(100% - 200px);
}