FS#134 Hide section and button "Extourne"

after reversing an operation, the button and the section are hidden
This commit is contained in:
Dany De Bontridder 2010-07-17 16:20:32 +00:00
parent 6294bda6f4
commit 434a73df2d
2 changed files with 4 additions and 2 deletions

View file

@ -567,6 +567,8 @@ function removeOperation(p_jr_id,dossier,div) {
*/
function reverseOperation(obj) {
var qs="?"+$(obj).serialize();
g('ext'+obj.divname).style.display='none';
g('bext'+obj.divname).style.display='none';
var action=new Ajax.Request(
"ajax_ledger.php",

View file

@ -69,7 +69,7 @@ if ( $div != 'popup' ) {
echo $remove->input();
}
$reverse=new IButton('Extourner');
$reverse=new IButton('bext'.$div);
$reverse->label=_('Extourner');
$reverse->javascript="g('ext".$div."').style.display='block'";
echo $reverse->input();
@ -78,7 +78,7 @@ echo '</form>';
echo '<div id="ext'.$div.'" style="display:none">';
$date=new IDate('p_date');
$r="<form id=\"form_".$div."\" onsubmit=\"return reverseOperation(this);\">";
$r="<form id=\"form_".$div."\" onsubmit=\"this.divname='$div';return reverseOperation(this);\">";
$r.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id']).HtmlInput::hidden('div',$div).dossier::hidden().HtmlInput::hidden('act','reverseop');
$r.='<h2 class="info">Extourner </H2>';
$r.="entrez une date :".$date->input();