Fixing style errors.

This commit is contained in:
stickler-ci 2021-07-12 07:17:08 +00:00
parent 3bc2dec696
commit ce9bd51cb2
2 changed files with 7 additions and 13 deletions

View File

@ -1034,19 +1034,16 @@ if ($type == Categorie::TYPE_WAREHOUSE) {
} }
} }
if ($type == Categorie::TYPE_TICKET) if ($type == Categorie::TYPE_TICKET) {
{
$permission = ($user->rights->categorie->creer || $user->rights->categorie->creer); $permission = ($user->rights->categorie->creer || $user->rights->categorie->creer);
$tickets = $object->getObjectsInCateg($type, 0, $limit, $offset); $tickets = $object->getObjectsInCateg($type, 0, $limit, $offset);
if ($tickets < 0) if ($tickets < 0) {
{
dol_print_error($db, $object->error, $object->errors); dol_print_error($db, $object->error, $object->errors);
} else { } else {
// Form to add record into a category // Form to add record into a category
$showclassifyform = 1; $showclassifyform = 1;
if ($showclassifyform) if ($showclassifyform) {
{
print '<br>'; print '<br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
@ -1079,11 +1076,9 @@ if ($type == Categorie::TYPE_TICKET)
print '<table class="noborder centpercent">'."\n"; print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Ref").'</td></tr>'."\n"; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Ref").'</td></tr>'."\n";
if (count($tickets) > 0) if (count($tickets) > 0) {
{
$i = 0; $i = 0;
foreach ($tickets as $ticket) foreach ($tickets as $ticket) {
{
$i++; $i++;
if ($i > $limit) break; if ($i > $limit) break;
@ -1094,8 +1089,7 @@ if ($type == Categorie::TYPE_TICKET)
print '<td class="tdtop">'.$ticket->label."</td>\n"; print '<td class="tdtop">'.$ticket->label."</td>\n";
// Link to delete from category // Link to delete from category
print '<td class="right">'; print '<td class="right">';
if ($permission) if ($permission) {
{
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$ticket->id."'>"; print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid) ? 'id' : 'socid')."=".$object->id."&amp;type=".$typeid."&amp;removeelem=".$ticket->id."'>";
print $langs->trans("DeleteFromCat"); print $langs->trans("DeleteFromCat");
print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft');

View File

@ -1069,7 +1069,7 @@ if ($action == 'create' || $action == 'presend') {
print $form->showCategories($object->id, Categorie::TYPE_TICKET, 1); print $form->showCategories($object->id, Categorie::TYPE_TICKET, 1);
print "</td></tr>"; print "</td></tr>";
} }
// Other attributes // Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';