Merge branch 'develop' into dev_EventOrganisation_setuppage
This commit is contained in:
commit
e802dd87f4
@ -184,7 +184,7 @@ print '</tr>'."\n";
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
||||
print '<td class="center"> </td>'."\n";
|
||||
print '<td class="right">'."\n";
|
||||
print '<td class="right nowraponall">'."\n";
|
||||
|
||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
||||
if (!isHTTPS()) {
|
||||
@ -232,7 +232,7 @@ if (!empty($conf->cron->enabled)) {
|
||||
}
|
||||
print '</td>'."\n";
|
||||
print '<td class="center"> </td>'."\n";
|
||||
print '<td class="right">'."\n";
|
||||
print '<td class="right nowraponall">'."\n";
|
||||
|
||||
if (empty($conf->cron->enabled)) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).'</span>';
|
||||
|
||||
@ -1363,6 +1363,7 @@ if ($id > 0)
|
||||
$now = dol_now();
|
||||
$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
|
||||
|
||||
|
||||
// Confirmation suppression action
|
||||
if ($action == 'delete')
|
||||
{
|
||||
@ -1418,9 +1419,11 @@ if ($id > 0)
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">';
|
||||
if ($object->type_code != 'AC_OTH_AUTO')
|
||||
{
|
||||
$formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ?GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto");
|
||||
print $formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ? GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto", 0, 0, 0, 1);
|
||||
} else {
|
||||
print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">'.$langs->trans("Action".$object->type_code);
|
||||
print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
|
||||
print $object->getTypePicto();
|
||||
print $langs->trans("Action".$object->type_code);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1430,7 +1433,7 @@ if ($id > 0)
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent ? ' checked' : '').'></td></tr>';
|
||||
print dol_print_date($object->datep, 'dayhour', 'gmt');
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").' - '.$langs->trans("DateActionEnd").'</span></td><td colspan="3">';
|
||||
if (GETPOST("afaire") == 1) {
|
||||
@ -1510,7 +1513,7 @@ if ($id > 0)
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="soixantepercent" value="'.$object->location.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="width500" value="'.$object->location.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
@ -1786,7 +1789,6 @@ if ($id > 0)
|
||||
} else {
|
||||
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
|
||||
// Clone event
|
||||
if ($action == 'clone')
|
||||
{
|
||||
@ -1873,7 +1875,9 @@ if ($id > 0)
|
||||
// Type
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td>'.$langs->trans($object->type).'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td>';
|
||||
print $object->getTypePicto();
|
||||
print $langs->trans($object->type).'</td></tr>';
|
||||
}
|
||||
|
||||
// Full day event
|
||||
|
||||
@ -1508,6 +1508,39 @@ class ActionComm extends CommonObject
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return Picto of type of event
|
||||
*
|
||||
* @return string HTML String
|
||||
*/
|
||||
public function getTypePicto()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$imgpicto = '';
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
if ($this->type_picto) {
|
||||
$imgpicto = img_picto('', $this->type_picto, 'class="paddingright"');
|
||||
} else {
|
||||
if ($this->type_code == 'AC_RDV') $imgpicto = img_picto('', 'meeting', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($this->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($this->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($this->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($this->type_code == 'AC_OTH' && $this->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright');
|
||||
elseif (!preg_match('/_AUTO/', $this->type_code)) $imgpicto = img_picto('', 'user-cog', '', false, 0, 0, '', 'paddingright');
|
||||
else $imgpicto = img_picto('', 'cog', '', false, 0, 0, '', 'paddingright');
|
||||
}
|
||||
} else {
|
||||
// 2 picto: 1 for auto, 1 for manual
|
||||
if (!preg_match('/_AUTO/', $this->type_code)) $imgpicto = img_picto('', 'user-cog', '', false, 0, 0, '', 'paddingright');
|
||||
else $imgpicto = img_picto('', 'cog', '', false, 0, 0, '', 'paddingright');
|
||||
}
|
||||
return $imgpicto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets object to supplied categories.
|
||||
*
|
||||
|
||||
@ -688,28 +688,10 @@ if ($resql)
|
||||
if (!empty($arrayfields['c.libelle']['checked']))
|
||||
{
|
||||
print '<td class="nowraponall">';
|
||||
$actioncomm = $actionstatic;
|
||||
// TODO Code common with code into showactions
|
||||
$imgpicto = '';
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
if ($actioncomm->type_picto) {
|
||||
$imgpicto = img_picto('', $actioncomm->type_picto);
|
||||
} else {
|
||||
if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif ($actioncomm->type_code == 'AC_EMAIL' || $actioncomm->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' ';
|
||||
elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_other', '', false, 0, 0, '', 'paddingright').' ';
|
||||
}
|
||||
}
|
||||
print $imgpicto;
|
||||
|
||||
print $actionstatic->getTypePicto();
|
||||
$labeltype = $obj->type_code;
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH';
|
||||
if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') {
|
||||
if ($actionstatic->type_code == 'AC_OTH' && $actionstatic->code == 'TICKET_MSG') {
|
||||
$labeltype = $langs->trans("Message");
|
||||
} else {
|
||||
if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype];
|
||||
|
||||
@ -4370,6 +4370,9 @@ class Form
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||
} elseif ($input['type'] == 'select')
|
||||
{
|
||||
if (empty($morecss)) {
|
||||
$morecss = 'minwidth100';
|
||||
}
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">';
|
||||
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd left">';
|
||||
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
|
||||
|
||||
@ -263,23 +263,7 @@ class FormActions
|
||||
|
||||
// Type
|
||||
print '<td>';
|
||||
// TODO Code common with code into comm/action/list.php
|
||||
$imgpicto = '';
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
if ($actioncomm->type_picto) {
|
||||
$imgpicto = img_picto('', $actioncomm->type_picto);
|
||||
} else {
|
||||
if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright');
|
||||
elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright');
|
||||
elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright');
|
||||
}
|
||||
}
|
||||
print $imgpicto;
|
||||
print $actioncomm->getTypePicto();
|
||||
if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') {
|
||||
print $langs->trans("Message");
|
||||
} else {
|
||||
|
||||
@ -368,7 +368,9 @@ class FormTicket
|
||||
if (response.num) {
|
||||
var selecthtml_str = response.value;
|
||||
var selecthtml_dom=$.parseHTML(selecthtml_str);
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
if (typeof(selecthtml_dom[0][0]) !== \'undefined\') {
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
}
|
||||
} else {
|
||||
$("#inputautocomplete"+htmlname).val("");
|
||||
}
|
||||
|
||||
@ -500,7 +500,9 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
|
||||
if (response.num) {
|
||||
var selecthtml_str = response.value;
|
||||
var selecthtml_dom=$.parseHTML(selecthtml_str);
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
if (typeof(selecthtml_dom[0][0]) !== \'undefined\') {
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
}
|
||||
} else {
|
||||
$("#inputautocomplete"+htmlname).val("");
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
@ -2480,12 +2480,14 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
|
||||
|
||||
$htmllink = $value;
|
||||
|
||||
if (empty($value)) return ' ';
|
||||
if (empty($value)) {
|
||||
return ' ';
|
||||
}
|
||||
|
||||
if (!empty($type)) {
|
||||
$htmllink = '<div class="divsocialnetwork inline-block valignmiddle">';
|
||||
// TODO use dictionary definition for picto $dictsocialnetworks[$type]['icon']
|
||||
$htmllink .= img_picto($langs->trans(dol_ucfirst($type)), $type.'.png', '', false, 0, 0, '', 'paddingright', 0);
|
||||
// Use dictionary definition for picto $dictsocialnetworks[$type]['icon']
|
||||
$htmllink .= '<span class="fa paddingright '.($dictsocialnetworks[$type]['icon'] ? $dictsocialnetworks[$type]['icon'] : 'fa-link').'"></span>';
|
||||
if ($type == 'skype') {
|
||||
$htmllink .= $value;
|
||||
$htmllink .= ' ';
|
||||
@ -2501,7 +2503,9 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
|
||||
if (($cid || $socid) && !empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) {
|
||||
$addlink = 'AC_SKYPE';
|
||||
$link = '';
|
||||
if (!empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link = '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$addlink.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"), "calendar").'</a>';
|
||||
if (!empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&actioncode='.$addlink.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"), "calendar").'</a>';
|
||||
}
|
||||
$htmllink .= ($link ? ' '.$link : '');
|
||||
}
|
||||
} else {
|
||||
@ -3262,12 +3266,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||
'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
|
||||
'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cron', 'cubes',
|
||||
'cash-register', 'category', 'check', 'clock', 'close_title', 'cog', 'company', 'contact', 'contract', 'cron', 'cubes',
|
||||
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
|
||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
|
||||
'help', 'holiday',
|
||||
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot',
|
||||
'margin', 'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
@ -3290,7 +3294,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'salary', 'supplier_invoice', 'ticket',
|
||||
'error', 'warning',
|
||||
'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
||||
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
|
||||
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'user-cog',
|
||||
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda',
|
||||
'eventorganization', 'object_eventorganization'
|
||||
)
|
||||
@ -3318,7 +3322,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'email'=>'at',
|
||||
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
|
||||
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
|
||||
'member'=>'users', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
||||
'member'=>'users', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
||||
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
||||
'sign-out'=>'sign-out-alt',
|
||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
||||
@ -3413,13 +3417,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
// Define $color
|
||||
$arrayconvpictotocolor = array(
|
||||
'address'=>'#6c6aa8', 'building'=>'#6c6aa8', 'bom'=>'#a69944',
|
||||
'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'dynamicprice'=>'#a69944',
|
||||
'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'dynamicprice'=>'#a69944',
|
||||
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999',
|
||||
'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944',
|
||||
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
|
||||
'other'=>'#ddd',
|
||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
|
||||
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa',
|
||||
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',
|
||||
'website'=>'#304'
|
||||
);
|
||||
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user