NEW Use a dedicated css for the pencil to edit a field

This commit is contained in:
Laurent Destailleur 2019-10-02 14:44:38 +02:00
parent 66829aa615
commit c6d38227b6
4 changed files with 25 additions and 5 deletions

View File

@ -73,7 +73,6 @@ $object->substitutionarrayfortest = $substitutionarray;
// List of sending methods // List of sending methods
$listofmethods=array(); $listofmethods=array();
$listofmethods['mail']='PHP mail function'; $listofmethods['mail']='PHP mail function';
//$listofmethods['simplemail']='Simplemail class';
$listofmethods['smtps']='SMTP/SMTPS socket library'; $listofmethods['smtps']='SMTP/SMTPS socket library';
@ -896,17 +895,23 @@ else
print '<table class="border centpercent tableforfield">'; print '<table class="border centpercent tableforfield">';
// Description // Description
print '<tr><td class="titlefield">'.$form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').'</td><td colspan="3">'; print '<tr><td class="titlefield">';
print $form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td><td>';
print $form->editfieldval("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print $form->editfieldval("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td></tr>'; print '</td></tr>';
// From // From
print '<tr><td>'.$form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').'</td><td colspan="3">'; print '<tr><td>';
print $form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td><td>';
print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td></tr>'; print '</td></tr>';
// Errors to // Errors to
print '<tr><td>'.$form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').'</td><td colspan="3">'; print '<tr><td>';
print $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td><td>';
print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string');
print '</td></tr>'; print '</td></tr>';

View File

@ -136,7 +136,7 @@ class Form
if (! empty($notabletag)) $ret.=' '; if (! empty($notabletag)) $ret.=' ';
if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>'; if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>';
if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='<td class="right">'; if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='<td class="right">';
if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='<a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&amp;'.$paramid.'='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>'; if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&amp;'.$paramid.'='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
if (! empty($notabletag) && $notabletag == 1) $ret.=' : '; if (! empty($notabletag) && $notabletag == 1) $ret.=' : ';
if (! empty($notabletag) && $notabletag == 3) $ret.=' '; if (! empty($notabletag) && $notabletag == 3) $ret.=' ';
if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>'; if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret.='</td>';

View File

@ -508,6 +508,13 @@ body[class*="colorblind-"] .text-success{
color : <?php print $textDanger ; ?> color : <?php print $textDanger ; ?>
} }
.editfielda span.fa-pencil-alt {
color: #ccc !important;
}
.editfielda span.fa-pencil-alt:hover {
color: rgb(<?php echo $colortexttitle; ?>) !important;
}
/* Themes for badges */ /* Themes for badges */
<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?> <?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?>

View File

@ -708,6 +708,14 @@ body[class*="colorblind-"] .text-success{
color : <?php print $textDanger ; ?> color : <?php print $textDanger ; ?>
} }
.editfielda span.fa-pencil-alt {
color: #ccc !important;
}
.editfielda span.fa-pencil-alt:hover {
color: rgb(<?php echo $colortexttitle; ?>) !important;
}
/* Themes for badges */ /* Themes for badges */
<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?> <?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?>