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"
print '<div class="center">';
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 '</div>';
@ -3752,7 +3752,7 @@ if ($action == 'create')
}
print '<br>';
//Select mail models is same action as presend
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
@ -3832,7 +3832,7 @@ if ($action == 'create')
$i ++;
}
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>';
$db->free($resqlorderlist);
} else {
@ -3917,6 +3917,8 @@ if ($action == 'create')
print_titre($langs->trans($titreform));
// Cree l'objet formulaire mail
dol_fiche_head();
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
@ -3988,7 +3990,7 @@ if ($action == 'create')
print $formmail->get_form();
print '<br>';
dol_fiche_end();
}
}

View File

@ -2,10 +2,11 @@
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.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
* it under the terms of the GNU General Public License as published by
@ -128,6 +129,8 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="facid" value="'.$object->id.'">';
dol_fiche_head();
$rowspan=4;
if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++;
@ -139,7 +142,7 @@ if ($action == 'create')
// Third party
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$object->client->getNomUrl(1,'customer').'</td>';
print '<td>';
//print $langs->trans("NotePrivate");
print $langs->trans("Comment");
print '</td></tr>';
// Title
@ -371,10 +374,15 @@ if ($action == 'create')
print '</select>';
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";
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
{
@ -432,7 +440,7 @@ else
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id,'none');
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>";

View File

@ -6,7 +6,7 @@
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
*
* 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
@ -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="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($facture->client->name).'">';
dol_fiche_head();
print '<table class="border" width="100%">';
// Third party
@ -462,6 +464,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '</table>';
dol_fiche_end();
/*
* List of unpaid invoices
*/