Skip to content
Snippets Groups Projects
Commit f0cfa340 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2852 from aspangaro/develop-resource

NEW Forms are using the tab look, even in creation mode
parents 0f89164f 58e94268
No related branches found
No related tags found
No related merge requests found
<?PHP
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
......@@ -128,7 +128,6 @@ else if ($action == 'delete')
/*
* View
*
*/
llxheader('', $langs->trans('AccountAccounting'));
......@@ -143,6 +142,8 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head();
print '<table class="border" width="100%">';
print '<tr><td width="25%">' . $langs->trans("AccountNumber") . '</td>';
......@@ -164,7 +165,9 @@ if ($action == 'create')
print '</table>';
print '<br><div class="center">';
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
......@@ -217,15 +220,15 @@ else if ($id)
print '</table>';
print '<br><div class="center">';
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
print '</div>';
print '</form>';
print '</div>';
}
else
{
......@@ -269,7 +272,7 @@ else if ($id)
print '</table>';
print '</div>';
dol_fiche_end();
/*
* Barre d'actions
......@@ -297,6 +300,6 @@ else if ($id)
dol_print_error($db);
}
}
$db->close();
llxFooter();
\ No newline at end of file
$db->close();
\ No newline at end of file
<?php
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
/* Copyright (C) 2014-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
......@@ -176,6 +176,8 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head();
print '<table class="border" width="100%">';
// Label
......@@ -200,7 +202,9 @@ if ($action == 'create')
print '</table>';
print '<br><div class="center">';
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
......
......@@ -2,6 +2,7 @@
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* 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
......@@ -187,6 +188,8 @@ if ($action == 'create')
print_fiche_titre($langs->trans("NewVATPayment"));
dol_fiche_head();
print '<table class="border" width="100%">';
print "<tr>";
......@@ -228,7 +231,7 @@ if ($action == 'create')
print '</table>';
print "<br>";
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
......
<?php
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
/* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -191,6 +191,8 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head();
print '<table class="border" width="100%">';
// Label
......@@ -287,8 +289,10 @@ if ($action == 'create')
print '</table>';
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> &nbsp; &nbsp; ';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
dol_fiche_end();
print '<div align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
print '</form>';
}
......
<?php
/* Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.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
......@@ -22,15 +23,10 @@
* Initialy built by build_class_from_table on 2013-07-24 16:03
*/
require '../main.inc.php';
// Change this following line to use the correct relative path (../, ../../, etc)
$res=0;
$res=@include("../main.inc.php"); // For root directory
if (! $res) $res=@include("../../main.inc.php"); // For "custom" directory
if (! $res) die("Include of main fails");
require_once 'class/resource.class.php';
require_once 'class/html.formresource.class.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/resource.class.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
// Load traductions files required by page
$langs->load("resource");
......@@ -132,6 +128,8 @@ if (! $action)
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" name="add_resource">';
print '<input type="hidden" name="action" value="confirm_add_resource" />';
dol_fiche_head('');
print '<table class="border" width="100%">';
// Ref / label
......@@ -161,7 +159,7 @@ if (! $action)
print '</label>';
print '</td>';
print '<td>';
require_once (DOL_DOCUMENT_ROOT . "/core/class/doleditor.class.php");
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($field, $$field, 160, '', '', false);
$doleditor->Create();
print '</td>';
......@@ -169,9 +167,11 @@ if (! $action)
print '</table>';
echo '<br><div align="center">',
dol_fiche_end('');
echo '<div align="center">',
'<input type="submit" class="button" name="add" value="'.$langs->trans('Save').'" />',
'&nbsp;',
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
'<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'" />',
'</div>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment