Fix css
This commit is contained in:
parent
348185ff15
commit
83eaf16a22
@ -188,7 +188,8 @@ class Form
|
||||
{
|
||||
$ret .= $this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg);
|
||||
} else {
|
||||
if (GETPOST('action', 'aZ09') == 'edit'.$htmlname)
|
||||
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$htmlname);
|
||||
if ($editmode)
|
||||
{
|
||||
$ret .= "\n";
|
||||
$ret .= '<form method="post" action="'.$_SERVER["PHP_SELF"].($moreparam ? '?'.$moreparam : '').'">';
|
||||
|
||||
@ -88,20 +88,22 @@ else $typeofdata = 'textarea:12:95%';
|
||||
print '<!-- BEGIN PHP TEMPLATE NOTES -->'."\n";
|
||||
print '<div class="tagtable border table-border tableforfield centpercent">'."\n";
|
||||
print '<div class="tagtr table-border-row">'."\n";
|
||||
print '<div class="tagtd tagtdnote tdtop sensiblehtmlcontent table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_public);
|
||||
print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
print $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0);
|
||||
print '</div>'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col sensiblehtmlcontent">'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
|
||||
print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1)."\n";
|
||||
print '</div>'."\n";
|
||||
print '</div>'."\n";
|
||||
if (empty($user->socid)) {
|
||||
// Private notes (always hidden to external users)
|
||||
print '<div class="tagtr table-border-row">'."\n";
|
||||
print '<div class="tagtd tagtdnote tdtop sensiblehtmlcontent table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_private);
|
||||
print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0);
|
||||
print '</div>'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col sensiblehtmlcontent">'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
|
||||
print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1);
|
||||
print '</div>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
@ -111,6 +111,7 @@ body {
|
||||
<?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?>
|
||||
}
|
||||
|
||||
/* Style used to protect html content in output to avoid attack by replacing full page with js content */
|
||||
.sensiblehtmlcontent * {
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
@ -109,10 +109,12 @@ if ($id)
|
||||
// Login
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
|
||||
$editenabled = (($action == 'edit') && !empty($user->rights->user->user->creer));
|
||||
|
||||
// Note
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Note").'</td>';
|
||||
print '<td class="sensiblehtmlcontent">';
|
||||
if ($action == 'edit' && $user->rights->user->user->creer)
|
||||
print '<td class="'.($editenabled ? '' : 'sensiblehtmlcontent').'">';
|
||||
if ($editenabled)
|
||||
{
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"id\" value=\"".$object->id."\">";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user