Merge pull request #2911 from aspangaro/develop-md

NEW Forms are using the tab look, even in creation mode
This commit is contained in:
Laurent Destailleur 2015-05-30 15:01:26 +02:00
commit f5ec2c0605
3 changed files with 25 additions and 11 deletions

View File

@ -2477,7 +2477,7 @@ if ($action == 'create')
// Button "Create Draft" // Button "Create Draft"
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" class="button" name="bouton" value="' . $langs->trans('CreateDraft') . '">'; print '<input type="submit" class="button" name="bouton" value="' . $langs->trans('CreateDraft') . '">';
print '&nbsp; &nbsp; &nbsp;'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
print '</div>'; print '</div>';
@ -3752,7 +3752,7 @@ if ($action == 'create')
} }
print '<br>'; print '<br>';
//Select mail models is same action as presend // Select mail models is same action as presend
if (GETPOST('modelselected')) { if (GETPOST('modelselected')) {
$action = 'presend'; $action = 'presend';
} }
@ -3832,7 +3832,7 @@ if ($action == 'create')
$i ++; $i ++;
} }
print '</table>'; print '</table>';
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('ToLink') . '"> &nbsp; <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></div>'; print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('ToLink') . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '"></div>';
print '</form>'; print '</form>';
$db->free($resqlorderlist); $db->free($resqlorderlist);
} else { } else {
@ -3917,6 +3917,8 @@ if ($action == 'create')
print_titre($langs->trans($titreform)); print_titre($langs->trans($titreform));
// Cree l'objet formulaire mail // Cree l'objet formulaire mail
dol_fiche_head();
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db); $formmail = new FormMail($db);
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang); $formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
@ -3988,7 +3990,7 @@ if ($action == 'create')
print $formmail->get_form(); print $formmail->get_form();
print '<br>'; dol_fiche_end();
} }
} }

View File

@ -6,6 +6,7 @@
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -129,6 +130,8 @@ if ($action == 'create')
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="facid" value="'.$object->id.'">'; print '<input type="hidden" name="facid" value="'.$object->id.'">';
dol_fiche_head();
$rowspan=4; $rowspan=4;
if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++; if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++;
@ -139,7 +142,7 @@ if ($action == 'create')
// Third party // Third party
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$object->client->getNomUrl(1,'customer').'</td>'; print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$object->client->getNomUrl(1,'customer').'</td>';
print '<td>'; print '<td>';
//print $langs->trans("NotePrivate"); print $langs->trans("Comment");
print '</td></tr>'; print '</td></tr>';
// Title // Title
@ -371,10 +374,15 @@ if ($action == 'create')
print '</select>'; print '</select>';
print '</td></tr>'; print '</td></tr>';
} }
print '<tr><td colspan="3" align="center"><br><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>';
print "</form>\n";
print "</table>\n"; print "</table>\n";
dol_fiche_end();
print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Create").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
print '</div>';
print "</form>\n";
} }
else else
{ {
@ -432,7 +440,7 @@ else
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id,'none'); $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id,'none');
print "</td></tr>"; print "</td></tr>";
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">'.nl2br($object->note_private)."</td></tr>"; print '<tr><td>'.$langs->trans("Comment").'</td><td colspan="3">'.nl2br($object->note_private)."</td></tr>";
print "</table>"; print "</table>";

View File

@ -403,6 +403,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<input type="hidden" name="type" id="invoice_type" value="'.$facture->type.'">'; print '<input type="hidden" name="type" id="invoice_type" value="'.$facture->type.'">';
print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($facture->client->name).'">'; print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($facture->client->name).'">';
dol_fiche_head();
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Third party // Third party
@ -462,6 +464,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '</table>'; print '</table>';
dol_fiche_end();
/* /*
* List of unpaid invoices * List of unpaid invoices
*/ */