Document_Modele CFGDOC warning if there is no template
This commit is contained in:
parent
980cd163af
commit
2fb07b839c
2 changed files with 16 additions and 8 deletions
|
|
@ -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>';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue