Fixing style errors.
This commit is contained in:
parent
fb7ed3afc1
commit
0e7d429991
@ -459,18 +459,18 @@ $sql .= $db->plimit($listlimit + 1, $offset);
|
|||||||
$fieldlist = explode(',', $tabfield[$id]);
|
$fieldlist = explode(',', $tabfield[$id]);
|
||||||
|
|
||||||
if ($action == 'view') {
|
if ($action == 'view') {
|
||||||
// Form to add a new line
|
// Form to add a new line
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';
|
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
// Line to enter new values (title)
|
// Line to enter new values (title)
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
// Determine le nom du champ par rapport aux noms possibles
|
// Determine le nom du champ par rapport aux noms possibles
|
||||||
// dans les dictionnaires de donnees
|
// dans les dictionnaires de donnees
|
||||||
$valuetoshow = ucfirst($fieldlist[$field]); // Par defaut
|
$valuetoshow = ucfirst($fieldlist[$field]); // Par defaut
|
||||||
@ -501,53 +501,53 @@ foreach ($fieldlist as $field => $value)
|
|||||||
} else print $valuetoshow;
|
} else print $valuetoshow;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
// If data was already input, we define them in obj to populate input fields.
|
// If data was already input, we define them in obj to populate input fields.
|
||||||
if (GETPOST('actionadd'))
|
if (GETPOST('actionadd'))
|
||||||
{
|
{
|
||||||
foreach ($fieldlist as $key => $val) {
|
foreach ($fieldlist as $key => $val) {
|
||||||
if (GETPOST($val) != '')
|
if (GETPOST($val) != '')
|
||||||
$obj->$val = GETPOST($val);
|
$obj->$val = GETPOST($val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmpaction = 'create';
|
$tmpaction = 'create';
|
||||||
$parameters = array(
|
$parameters = array(
|
||||||
'fieldlist' => $fieldlist,
|
'fieldlist' => $fieldlist,
|
||||||
'tabname' => $tabname[$id]
|
'tabname' => $tabname[$id]
|
||||||
);
|
);
|
||||||
$reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||||
$error = $hookmanager->error;
|
$error = $hookmanager->error;
|
||||||
$errors = $hookmanager->errors;
|
$errors = $hookmanager->errors;
|
||||||
|
|
||||||
|
|
||||||
// Line to enter new values (input fields)
|
// Line to enter new values (input fields)
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if ($action == 'edit') {
|
if ($action == 'edit') {
|
||||||
fieldList($fieldlist, $obj, $tabname[$id], 'hide');
|
fieldList($fieldlist, $obj, $tabname[$id], 'hide');
|
||||||
} else {
|
} else {
|
||||||
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
fieldList($fieldlist, $obj, $tabname[$id], 'add');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Show fields for topic, join files and body
|
// Show fields for topic, join files and body
|
||||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||||
if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); }
|
if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); }
|
||||||
foreach ($fieldsforcontent as $tmpfieldlist)
|
foreach ($fieldsforcontent as $tmpfieldlist)
|
||||||
{
|
{
|
||||||
print '<tr class="impair nodrag nodrop nohover"><td colspan="6" class="nobottom">';
|
print '<tr class="impair nodrag nodrop nohover"><td colspan="6" class="nobottom">';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
@ -589,17 +589,17 @@ foreach ($fieldsforcontent as $tmpfieldlist)
|
|||||||
}
|
}
|
||||||
// else print '<td></td>';
|
// else print '<td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$colspan = count($fieldlist) + 1;
|
$colspan = count($fieldlist) + 1;
|
||||||
//print '<tr><td colspan="'.$colspan.'"> </td></tr>'; // Keep to have a line with enough height
|
//print '<tr><td colspan="'.$colspan.'"> </td></tr>'; // Keep to have a line with enough height
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
} // END IF not edit
|
} // END IF not edit
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user