noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 01/05: Task #1045 - Amélioration apparence


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/05: Task #1045 - Amélioration apparence : Après erreur : affichage dans l'écran
Date: Sat, 15 Nov 2014 23:24:38 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 256d27974f190ad7f96b3547ebb84c20b956f7c6
Author: Dany De Bontridder <address@hidden>
Date:   Sat Nov 15 19:52:32 2014 +0100

    Task #1045 - Amélioration apparence  :
    Après erreur : affichage dans l'écran
---
 include/compta_ach.inc.php        |    5 ++++-
 include/compta_fin.inc.php        |    9 ++++++---
 include/compta_ods.inc.php        |    3 +++
 include/compta_ven.inc.php        |   10 +++++++---
 include/operation_ods_new.inc.php |    4 ++--
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php
index fd2b9a6..2bc3b33 100644
--- a/include/compta_ach.inc.php
+++ b/include/compta_ach.inc.php
@@ -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']))
diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php
index d53be95..af32c1d 100644
--- a/include/compta_fin.inc.php
+++ b/include/compta_fin.inc.php
@@ -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');
diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php
index 1f1d1da..0af21c0 100644
--- a/include/compta_ods.inc.php
+++ b/include/compta_ods.inc.php
@@ -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;
 }
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index 7a334b3..81c6740 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -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 '));
diff --git a/include/operation_ods_new.inc.php 
b/include/operation_ods_new.inc.php
index ce1e9a4..b65257a 100644
--- a/include/operation_ods_new.inc.php
+++ b/include/operation_ods_new.inc.php
@@ -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'));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]