[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/17: Document Template
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/17: Document Template |
Date: |
Tue, 16 May 2023 14:50:12 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 6291417e5bb663eff81a0be96b9545823ad69c4d
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Apr 29 09:32:30 2023 +0200
Document Template
Document template : improve upload
---
include/class/document_modele.class.php | 4 +++-
include/template/modele_document.php | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/class/document_modele.class.php
b/include/class/document_modele.class.php
index 1bf5938a5..7e723e9b7 100644
--- a/include/class/document_modele.class.php
+++ b/include/class/document_modele.class.php
@@ -237,7 +237,8 @@ class Document_modele
$r='<p class="notice">';
$r.='Veuillez introduire les modèles servant à
générer vos documents';
$r.='</p>';
- $r.='<form enctype="multipart/form-data" method="post">';
+ $r.='<form enctype="multipart/form-data" method="post"
onsubmit="return check_file_size(this,'. MAX_FILE_SIZE.')">';
+ $r.=\HtmlInput::hidden("MAX_FILE_SIZE", MAX_FILE_SIZE);
$r.=dossier::hidden();
// we need to add the sub action as hidden
$h=new IHidden();
@@ -270,6 +271,7 @@ class Document_modele
$f=new IFile();
$f->name="doc";
+ $f->setAlertOnSize(true);
$r.="<tr><td>fichier</td><td> ".$f->input()."</td></tr>";
$start=new IText();
diff --git a/include/template/modele_document.php
b/include/template/modele_document.php
index 60136e14c..d0942d9cf 100644
--- a/include/template/modele_document.php
+++ b/include/template/modele_document.php
@@ -2,9 +2,12 @@
//This file is part of NOALYSS and is under GPL
//see licence.txt
global $doc,$cn;
+\Noalyss\Dbg::echo_file(__FILE__);
+echo \Noalyss\Dbg::echo_var(1,"MAX SIZE IS ".MAX_FILE_SIZE);
?>
<?php echo HtmlInput::title_box("Modèle de document","mod_doc",'hide')?>
-<form method="post" enctype="multipart/form-data">
+<form method="post" enctype="multipart/form-data" onsubmit="return
check_file_size(this,<?=MAX_FILE_SIZE?>)">
+<?php echo \HtmlInput::hidden("MAX_FILE_SIZE", MAX_FILE_SIZE);?>
<table>
<tr>
@@ -67,6 +70,7 @@ echo $a->input();
<td>
<?php
$file=new IFile('doc');
+$file->setAlertOnSize(true);
echo $file->input();
- [Noalyss-commit] [noalyss] branch master updated (b880126dd -> 596bc85fd), Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 12/17: Bug #2259: MENU GESTION - opéations non prises en compte selon exercice sélectionné dans «Préférences», Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 08/17: SQL protect, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 05/17: Merge branch 'devel' into dev9101, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 15/17: Fix bug : background color not set for head on small screens, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 01/17: Cosmetic, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 13/17: missing file, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 03/17: Task #2257:improve Détail Action dans le tableau de bord , mise à jour, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 07/17: remove dead code, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 06/17: Document Template,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 11/17: remove dead code, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 10/17: Bug#2271: Banque : totaux non vérifié, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 02/17: Code Documentation, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 14/17: Bug#2271: Banque : totaux non vérifié,arrondi, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 04/17: Compatibility 8.1, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 09/17: FInal : add SQL upgrade script + test, Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 17/17: Merge branch 'devel-venus2', Dany De Bontridder, 2023/05/16
- [Noalyss-commit] [noalyss] 16/17: Fix bug : background color not set for head on small screens, Dany De Bontridder, 2023/05/16