Document Template
Document template : improve upload
This commit is contained in:
parent
40bc3fc489
commit
6291417e5b
2 changed files with 8 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue