noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ajax_mod_predf_op.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**\file
00024  * \brief display a form to change the name of a predefined operation
00025  */
00026 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00027 ob_start();
00028 require_once 'class_pre_operation.php';
00029 $op=new Pre_Operation($cn,$_GET['id']);
00030 $array=$op->load();
00031 echo HtmlInput::anchor_close('mod_predf_op');
00032 echo h2(_('Modification du nom'),' class="title"');
00033 
00034 echo '
00035     <form method="POST" onsubmit="save_predf_op(this);return false;">';
00036 $name = new IText('opd_name');
00037 $name->value = $op->od_name;
00038 $name->size = 60;
00039 echo "Nom =" . $name->input();
00040 $opd_description=new ITextarea('od_description');
00041 $opd_description->style=' class="itextarea" style="width:30em;height:4em;vertical-align:top"';
00042 $opd_description->value=$op->od_description;
00043 echo '<p>';
00044 echo _("Description (max 50 car.)");
00045 echo $opd_description->input();
00046 echo '</p>';
00047 echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']);
00048 echo "<hr>";
00049 //////////////////////////////////////////////////////////////////////////////
00050 // Detail operation 
00051 //////////////////////////////////////////////////////////////////////////////
00052 echo $op->display();
00053 
00054 
00055 echo HtmlInput::submit('save', _('Sauve'));
00056 echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"');
00057 echo '</form>';
00058 
00059 
00060 $html = ob_get_contents();
00061 ob_end_clean();
00062 $html = escape_xml($html);
00063 //echo $html;exit();
00064 header('Content-type: text/xml; charset=UTF-8');
00065 echo <<<EOF
00066 <?xml version="1.0" encoding="UTF-8"?>
00067 <data>
00068 <ctl>mod_predf_op</ctl>
00069 <code>$html</code>
00070 </data>
00071 EOF;
 All Data Structures Namespaces Files Functions Variables Enumerations