forked from Wavyzz/dolibarr
Look and feel v14
This commit is contained in:
@@ -75,7 +75,7 @@ $tablib[1] = "Websites";
|
||||
|
||||
// Requests to extract data
|
||||
$tabsql = array();
|
||||
$tabsql[1] = "SELECT f.rowid as rowid, f.entity, f.ref, f.description, f.virtualhost, f.position, f.status FROM ".MAIN_DB_PREFIX.'website as f WHERE f.entity IN ('.getEntity('website').')';
|
||||
$tabsql[1] = "SELECT f.rowid as rowid, f.entity, f.ref, f.description, f.virtualhost, f.position, f.status, f.date_creation FROM ".MAIN_DB_PREFIX.'website as f WHERE f.entity IN ('.getEntity('website').')';
|
||||
|
||||
// Criteria to sort dictionaries
|
||||
$tabsqlsort = array();
|
||||
@@ -83,7 +83,7 @@ $tabsqlsort[1] = "ref ASC";
|
||||
|
||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||
$tabfield = array();
|
||||
$tabfield[1] = "ref,description,virtualhost,position";
|
||||
$tabfield[1] = "ref,description,virtualhost,position,date_creation";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
$tabfieldvalue = array();
|
||||
@@ -139,8 +139,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
$fieldnamekey = $listfield[$f];
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
break;
|
||||
} elseif ($value == 'ref' && !preg_match('/^[a-z0-9_\-\.]+$/i', $_POST[$value]))
|
||||
{
|
||||
} elseif ($value == 'ref' && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST($value))) {
|
||||
$ok = 0;
|
||||
$fieldnamekey = $listfield[$f];
|
||||
setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
@@ -149,9 +148,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
|
||||
}
|
||||
|
||||
// Clean parameters
|
||||
if (!empty($_POST['ref']))
|
||||
{
|
||||
$websitekey = strtolower($_POST['ref']);
|
||||
if (GETPOST('ref')) {
|
||||
$websitekey = strtolower(GETPOST('ref'));
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
@@ -441,6 +439,8 @@ if ($id)
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
if ($fieldlist[$field] == 'date_creation') continue;
|
||||
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // Par defaut
|
||||
@@ -534,6 +534,7 @@ if ($id)
|
||||
if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); }
|
||||
if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); }
|
||||
if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); }
|
||||
if ($fieldlist[$field] == 'date_creation') { $valuetoshow = $langs->trans("DateCreation"); }
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
@@ -597,7 +598,7 @@ if ($id)
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
print '<td align="center"><a class="reposition" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
|
||||
print '<td align="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
|
||||
|
||||
// Delete link
|
||||
if ($iserasable) print '<td align="center"><a class="reposition" href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a></td>';
|
||||
@@ -646,6 +647,7 @@ function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
$fieldname = $fieldlist[$field];
|
||||
|
||||
if ($fieldlist[$field] == 'lang')
|
||||
{
|
||||
print '<td>';
|
||||
@@ -654,6 +656,8 @@ function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
} elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) {
|
||||
print '<td><input type="text" class="flat" value="'.(!empty($obj->$fieldname) ? $obj->$fieldname : '').'" size="10" name="'.$fieldlist[$field].'"></td>';
|
||||
} else {
|
||||
if ($fieldlist[$field] == 'date_creation') continue;
|
||||
|
||||
print '<td>';
|
||||
$size = '';
|
||||
if ($fieldlist[$field] == 'code') $size = 'size="8" ';
|
||||
|
||||
@@ -1800,10 +1800,10 @@ class Form
|
||||
}
|
||||
$out .= ' data-html="';
|
||||
$outhtml = '';
|
||||
if (!empty($obj->photo))
|
||||
{
|
||||
// if (!empty($obj->photo))
|
||||
// {
|
||||
$outhtml .= $userstatic->getNomUrl(-3, '', 0, 1, 24, 1, 'login', '', 1).' ';
|
||||
}
|
||||
// }
|
||||
if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '<strike class="opacitymediumxxx">';
|
||||
$outhtml .= $labeltoshow;
|
||||
if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '</strike>';
|
||||
|
||||
@@ -130,7 +130,7 @@ class FormActions
|
||||
//var_dump($selected);
|
||||
if ($selected == 'done') $selected = '100';
|
||||
print '<select '.($canedit ? '' : 'disabled ').'name="'.$htmlname.'" id="select'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'">';
|
||||
if ($showempty) print '<option value=""'.($selected == '' ? ' selected' : '').'></option>';
|
||||
if ($showempty) print '<option value=""'.($selected == '' ? ' selected' : '').'> </option>';
|
||||
foreach ($listofstatus as $key => $val)
|
||||
{
|
||||
print '<option value="'.$key.'"'.(($selected == $key && strlen($selected) == strlen($key)) || (($selected > 0 && $selected < 100) && $key == '50') ? ' selected' : '').'>'.$val.'</option>';
|
||||
@@ -142,6 +142,8 @@ class FormActions
|
||||
print '</select>';
|
||||
if ($selected == 0 || $selected == 100) $canedit = 0;
|
||||
|
||||
print ajax_combobox('select'.$htmlname);
|
||||
|
||||
if (empty($onlyselect))
|
||||
{
|
||||
print ' <input type="text" id="val'.$htmlname.'" name="percentage" class="flat hideifna" value="'.($selected >= 0 ? $selected : '').'" size="2"'.($canedit && ($selected >= 0) ? '' : ' disabled').'>';
|
||||
|
||||
@@ -73,8 +73,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
print '<div class="divsearchfield">';
|
||||
// Type
|
||||
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;"></span>';
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Type").'</span>';
|
||||
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;" title="'.$langs->trans("Type").'"></span>';
|
||||
$multiselect = 0;
|
||||
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
||||
{
|
||||
@@ -85,13 +84,11 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
// Assigned to
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'user', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ActionsToDoBy").'</span>';
|
||||
print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="fawidth30 inline-block"');
|
||||
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500 widthcentpercentminusxx');
|
||||
print '</div>';
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'object_group', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ToUserOfGroup").'</span>';
|
||||
print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="fawidth30 inline-block"');
|
||||
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
|
||||
print '</div>';
|
||||
|
||||
@@ -102,8 +99,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
// Resource
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'object_resource', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Resource").'</span>';
|
||||
print img_picto($langs->trans("Resource"), 'object_resource', 'class="fawidth30 inline-block"');
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500');
|
||||
print '</div>';
|
||||
}
|
||||
@@ -112,8 +108,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'company', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("ThirdParty").'</span>';
|
||||
print img_picto($langs->trans("ThirdParty"), 'company', 'class="fawidth30 inline-block"');
|
||||
print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500');
|
||||
print '</div>';
|
||||
}
|
||||
@@ -124,8 +119,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'project', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Project").'</span>';
|
||||
print img_picto($langs->trans("Project"), 'project', 'class="fawidth30 inline-block"');
|
||||
print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</div>';
|
||||
}
|
||||
@@ -134,8 +128,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
{
|
||||
// Status
|
||||
print '<div class="divsearchfield">';
|
||||
print img_picto('', 'setup', 'class="fawidth30 inline-block"');
|
||||
print '<span class="hideonsmartphone">'.$langs->trans("Status").'</span>';
|
||||
print img_picto($langs->trans("Status"), 'setup', 'class="fawidth30 inline-block"');
|
||||
$formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
@@ -3414,13 +3414,13 @@ div.pagination li:first-child span {
|
||||
border-bottom-left-radius: 4px;*/
|
||||
}
|
||||
|
||||
div.pagination li a:hover,
|
||||
div.pagination li:not(.paginationafterarrows,.title-button) span:hover,
|
||||
/*div.pagination li a:hover,
|
||||
div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:hover,
|
||||
div.pagination li a:focus,
|
||||
div.pagination li:not(.paginationafterarrows,.title-button) span:focus {
|
||||
div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:focus {
|
||||
-webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
|
||||
box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
|
||||
}
|
||||
}*/
|
||||
div.pagination li .active a,
|
||||
div.pagination li .active span,
|
||||
div.pagination li .active a:hover,
|
||||
|
||||
@@ -277,7 +277,6 @@ if ($canreadperms)
|
||||
}
|
||||
}
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
|
||||
Reference in New Issue
Block a user