[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if th
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if there is no template |
Date: |
Wed, 14 Mar 2018 17:38:55 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 2fb07b839cb579d12e826297d65957f2dcebdd74
Author: Dany De Bontridder <address@hidden>
Date: Tue Feb 20 21:08:32 2018 +0100
Document_Modele CFGDOC warning if there is no template
---
include/class/document_modele.class.php | 7 +++++--
include/document_modele.inc.php | 17 +++++++++++------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/include/class/document_modele.class.php
b/include/class/document_modele.class.php
index ad3fc9f..7c29a83 100644
--- a/include/class/document_modele.class.php
+++ b/include/class/document_modele.class.php
@@ -100,8 +100,11 @@ class Document_modele
$a->name="sa";
$a->value="rm_template";
$r.=$a->input();
- $r.=HtmlInput::submit("rm_template","Effacer la sélection");
- }
+ $r.=HtmlInput::submit("rm_template",_("Effacer la sélection"));
+ } else {
+ echo h2(_("Aucun document"));
+ echo _("Il n'y a aucun document, cliquez sur Ajouter pour en
ajouter un");
+ }
$b=new IButton('show');
$b->label="Ajout d'un document";
$b->javascript="$('add_modele').style.display='block';new
Draggable('add_modele',{starteffect:function(){
diff --git a/include/document_modele.inc.php b/include/document_modele.inc.php
index 1613d34..8e0ec87 100644
--- a/include/document_modele.inc.php
+++ b/include/document_modele.inc.php
@@ -24,6 +24,10 @@
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
require_once NOALYSS_INCLUDE.'/class/document_modele.class.php';
$sub_action=(isset ($_REQUEST['sa']))?$_REQUEST['sa']:"";
+
+$http=new HttpInput();
+
+$sub_action=$http->request("sa","string","");
echo js_include('modele_document.js');
echo '<div class="content">';
// show the form for adding a template
@@ -37,11 +41,11 @@ if ( $sub_action=='add_document')
{
require_once NOALYSS_INCLUDE.'/class/document_modele.class.php';
$doc=new Document_modele($cn);
- $doc->md_name=$_POST['md_name'];
+ $doc->md_name=$http->post('md_name');
$doc->md_id=-1; // because it is a new model
- $doc->md_type=$_POST['md_type'];
- $doc->start=$_POST['start_seq'];
- $doc->md_affect=$_POST['md_affect'];
+ $doc->md_type=$http->post('md_type',"number");
+ $doc->start=$http->post('start_seq',"number");
+ $doc->md_affect=$http->post('md_affect');
$doc->Save();
}
//-----------------------------------------------------
@@ -69,7 +73,8 @@ if ( $sub_action=='rm_template')
if ( $sub_action == 'mod_template')
{
require_once NOALYSS_INCLUDE.'/class/document_modele.class.php';
- $doc=new Document_modele($cn,$_POST['id']);
+ $id=$http->post("id","number");
+ $doc=new Document_modele($cn,$id);
$doc->update($_POST);
}
//-----------------------------------------------------
@@ -77,7 +82,7 @@ if ( $sub_action == 'mod_template')
//-----------------------------------------------------
echo $doc->myList();
echo '<div id="add_modele" class="inner_box" style="display:none">';
-echo HtmlInput::title_box("Ajout d'un modèle", "add_modele", "hide");
+echo HtmlInput::title_box(_("Ajout d'un modèle"), "add_modele", "hide");
echo $doc->form('');
echo '</div>';
- [Noalyss-commit] [noalyss] 170/323: indent, (continued)
- [Noalyss-commit] [noalyss] 170/323: indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 207/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 236/323: Merge tag 'rel6920', Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 175/323: Manage_Table_SQL : Improve Documentation + add function count_error, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 214/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 184/323: missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 260/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 311/323: Follow-up fix small bug with ag_ref, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN & ACH, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if there is no template,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 161/323: Esthetic : improve, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 222/323: TextArea : fix move when focus, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 203/323: Esthetic : menu administration, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 247/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 219/323: Improve cal, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 237/323: Database : change SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 266/323: Upgrade : improve message, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 254/323: Tag : fix bug when adding a new tag, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 246/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing operation, Dany De Bontridder, 2018/03/14