From b7420372b7ea8d39fc043caeec25ad195921c7aa Mon Sep 17 00:00:00 2001 From: aspangaro <alexandre.spangaro@gmail.com> Date: Fri, 12 Aug 2016 22:53:30 +0200 Subject: [PATCH] Uniformize presentation, add button cancel everywhere --- htdocs/compta/bank/card.php | 6 +++++- htdocs/compta/sociales/charges.php | 10 ++++++---- htdocs/product/card.php | 6 +++++- htdocs/product/stock/card.php | 6 +++++- htdocs/resource/add.php | 12 ++++++------ 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index d4de4e5efb1..a29a0d768bd 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -507,7 +507,11 @@ if ($action == 'create') dol_fiche_end(); - print '<div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>'; + print '<div class="center">'; + print '<input type="submit" class="button" value="' . $langs->trans("CreateAccount") . '">'; + print ' '; + print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; + print '</div>'; print '</form>'; } diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 6e7c9ad93c2..d00219857d6 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -260,7 +260,7 @@ if ($action == 'create') print '<table class="border" width="100%">'; print "<tr>"; // Label - print '<td class="fieldrequired">'; + print '<td class="titlefield fieldrequired">'; print $langs->trans("Label"); print '</td>'; print '<td align="left"><input type="text" size="34" name="label" class="flat" value="'.GETPOST('label').'"></td>'; @@ -305,8 +305,10 @@ if ($action == 'create') dol_fiche_end(); print '<div class="center">'; - print '<input type="submit" class="button" value="'.$langs->trans("Add").'">'; - print '<div>'; + print '<input type="submit" class="button" value="' . $langs->trans("Create") . '">'; + print ' '; + print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; + print '</div>'; print '</form>'; } @@ -496,7 +498,7 @@ if ($id > 0) if ($action == 'edit') { - print '<div align="center">'; + print '<div class="center">'; print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; print ' '; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index f06009ecfa7..7b0ff7fb635 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1145,7 +1145,11 @@ else dol_fiche_end(); - print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></div>'; + print '<div class="center">'; + print '<input type="submit" class="button" value="' . $langs->trans("Create") . '">'; + print ' '; + print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; + print '</div>'; print '</form>'; } diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 9dcb51fe8ef..d9381af9b5e 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -234,7 +234,11 @@ if ($action == 'create') dol_fiche_end(); - print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></div>'; + print '<div class="center">'; + print '<input type="submit" class="button" value="' . $langs->trans("Create") . '">'; + print ' '; + print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; + print '</div>'; print '</form>'; } diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index 70d1da95969..7608e1b6cf3 100644 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -135,7 +135,7 @@ if (! $action) // Ref / label $field = 'ref'; print '<tr>'; - print '<td class="fieldrequired">'; + print '<td class="titlefieldcreate fieldrequired">'; print $langs->trans('ResourceFormLabel_'.$field); print '</td>'; print '<td>'; @@ -166,11 +166,11 @@ if (! $action) dol_fiche_end(''); - echo '<div align="center">', - '<input type="submit" class="button" name="add" value="'.$langs->trans('Save').'" />', - ' ', - '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'" />', - '</div>'; + print '<div class="center">'; + print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">'; + print ' '; + print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '">'; + print '</div>'; print '</form>'; } -- GitLab