Task #1045 - Amélioration apparence :
Après erreur : affichage dans l'écran
This commit is contained in:
parent
9462aa10c2
commit
256d27974f
5 changed files with 22 additions and 9 deletions
|
|
@ -43,7 +43,7 @@ if (isset($_REQUEST['p_jrn']))
|
|||
NoAccess();
|
||||
exit - 1;
|
||||
}
|
||||
|
||||
$p_msg="";
|
||||
/* if a new invoice is encoded, we display a form for confirmation */
|
||||
if (isset($_POST['view_invoice']))
|
||||
{
|
||||
|
|
@ -55,6 +55,7 @@ if (isset($_POST['view_invoice']))
|
|||
catch (Exception $e)
|
||||
{
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
$correct = 1;
|
||||
}
|
||||
// if correct is not set it means it is correct
|
||||
|
|
@ -97,6 +98,7 @@ if (isset($_POST['record']))
|
|||
catch (Exception $e)
|
||||
{
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
$correct = 1;
|
||||
}
|
||||
// record the invoice
|
||||
|
|
@ -186,6 +188,7 @@ echo '</div>';
|
|||
echo '</div>';
|
||||
|
||||
echo '<div class="content">';
|
||||
echo '<p class="notice">'.$p_msg.'</p>';
|
||||
echo "<FORM class=\"print\"NAME=\"form_detail\" METHOD=\"POST\" >";
|
||||
/* request for a predefined operation */
|
||||
if ( isset($_REQUEST['pre_def']) && !isset($_POST['correct']))
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X'))
|
|||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
|
||||
$p_msg="";
|
||||
//----------------------------------------
|
||||
// Confirm the operations
|
||||
//----------------------------------------
|
||||
|
|
@ -70,13 +70,14 @@ if ( isset($_POST['save']))
|
|||
catch (Exception $e)
|
||||
{
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
$correct=1;
|
||||
}
|
||||
if ( ! isset ($correct ))
|
||||
{
|
||||
echo '<div class="content">';
|
||||
echo h1('Confirmation','');
|
||||
echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer");
|
||||
echo h1(_('Confirmation'),'');
|
||||
echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"));
|
||||
echo '<form name="form_detail" class="print" enctype="multipart/form-data" class="print" METHOD="POST">';
|
||||
echo HtmlInput::hidden('ac',$_REQUEST['ac']);
|
||||
echo $Ledger->confirm($_POST);
|
||||
|
|
@ -101,6 +102,7 @@ if ( isset($_POST['confirm']))
|
|||
catch (Exception $e)
|
||||
{
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
$correct=1;
|
||||
}
|
||||
if ( !isset($correct))
|
||||
|
|
@ -131,6 +133,7 @@ if ( isset($_POST['correct']))
|
|||
//----------------------------------------
|
||||
echo '<div class="content">';
|
||||
|
||||
echo '<p class="notice">'.$p_msg.'</p>';
|
||||
|
||||
echo '<form class="print" name="form_detail" enctype="multipart/form-data" class="print" METHOD="POST">';
|
||||
echo HtmlInput::hidden('ledger_type','fin');
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ if ($g_user->check_jrn($ledger->id) == 'X')
|
|||
NoAccess();
|
||||
exit - 1;
|
||||
}
|
||||
$p_msg="";
|
||||
if (!isset($_POST['summary']) && !isset($_POST['save']))
|
||||
{
|
||||
require('operation_ods_new.inc.php');
|
||||
|
|
@ -74,6 +75,7 @@ elseif (isset($_POST['summary']))
|
|||
} catch (Exception $e)
|
||||
{
|
||||
echo alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
require('operation_ods_new.inc.php');
|
||||
|
||||
}
|
||||
|
|
@ -103,6 +105,7 @@ elseif (isset($_POST['save']))
|
|||
{
|
||||
require('operation_ods_new.inc.php');
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ $cn=new Database(dossier::id());
|
|||
$str_dossier=dossier::get();
|
||||
$ac="ac=".$_REQUEST['ac'];
|
||||
global $g_parameter;
|
||||
|
||||
$p_msg="";
|
||||
//----------------------------------------------------------------------
|
||||
// Encode a new invoice
|
||||
// empty form for encoding
|
||||
|
|
@ -64,14 +64,15 @@ global $g_parameter;
|
|||
catch (Exception $e)
|
||||
{
|
||||
alert($e->getMessage());
|
||||
$p_msg=$e->getMessage();
|
||||
$correct=1;
|
||||
}
|
||||
// if correct is not set it means it is correct
|
||||
if ( ! isset($correct))
|
||||
{
|
||||
echo '<div class="content">';
|
||||
echo h1('Confirmation','');
|
||||
echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer");
|
||||
echo h1(_("Confirmation"),'');
|
||||
echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"));
|
||||
|
||||
|
||||
echo '<form class="print" enctype="multipart/form-data" method="post">';
|
||||
|
|
@ -187,6 +188,7 @@ echo '<div class="content">';
|
|||
echo '</div>';
|
||||
|
||||
echo '<div class="content">';
|
||||
echo '<p class="notice">'.$p_msg.'</p>';
|
||||
echo "<FORM class=\"print\" NAME=\"form_detail\" METHOD=\"POST\" >";
|
||||
/* request for a predefined operation */
|
||||
if ( isset($_REQUEST['pre_def']) && ! isset($_POST['correct']) )
|
||||
|
|
@ -234,6 +236,8 @@ echo '<div class="content">';
|
|||
echo '</script>';
|
||||
}
|
||||
echo '<div class="content">';
|
||||
|
||||
|
||||
echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"');
|
||||
echo HtmlInput::submit("view_invoice",_("Enregistrer"));
|
||||
echo HtmlInput::reset(_('Effacer '));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger;
|
|||
// check if we can write in the ledger
|
||||
if ( $g_user->check_jrn($ledger->id)=='X')
|
||||
{
|
||||
alert("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur");
|
||||
alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur"));
|
||||
return;
|
||||
}
|
||||
echo '<div class="content">';
|
||||
|
|
@ -76,7 +76,7 @@ if ( isset ($_GET['action']) && ! isset($_POST['correct']))
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
print '<p class="notice">'.$p_msg.'</p>';
|
||||
echo '<form method="post" class="print">';
|
||||
echo dossier::hidden();
|
||||
echo HtmlInput::request_to_hidden(array('ac'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue