Modfication afficahge evenement dans boite de dialog, issue #0000258

This commit is contained in:
Michael RICOIS 2010-06-25 13:51:07 +00:00
parent 9e20620ab1
commit d51b2d2e06
4 changed files with 18 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?php
header('Content-Type: text/html; charset='.CHARSET);
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if ( !isset($inEditDialog) || $inEditDialog === false ) {
$tribunal = (isset($_REQUEST['tribunal']) ? $_REQUEST['tribunal'] : '');
$siren = (isset($_REQUEST['siren']) ? $_REQUEST['siren'] : '');
$nic = (isset($_REQUEST['nic']) ? $_REQUEST['nic'] : '');

View File

@ -30,6 +30,7 @@ switch ( $subaction ) {
break;
case 'editDialog':
$inEditDialog = true;
$idan = $params[2];
$siret = $params[3]; FB::log($siret, 'siret');
$siren = substr($siret,0,9); FB::log($siren, 'siren');

View File

@ -84,8 +84,14 @@ foreach ($liste as $code=>$lib) {
</select>
<label>&Eacute;v&egrave;nement / Jugement <font color="Red">*</font></label>
<select id="jugement" name="jugement[even][]" size="5" >
<option value="0000">-</option>
<?php
$disable = '';
if ( $inEditDialog ) {
$disable = 'disabled';
}
?>
<select id="jugement" name="jugement[even][]" size="5" <?=$disable?>>
<option value="0000">-</option>
<?php
$eventNum = isset($saisie['eventNum']) ? $saisie['eventNum'] : '0000' ;
asort($tabEvent);
@ -95,9 +101,15 @@ foreach($tabEvent as $key => $event)
if ( in_array($key, $saisie['even']) ) {
$select = 'selected';
}
$display = true;
if ( isset($inEditDialog) && $inEditDialog === true && empty($select) ){
$display = false;
}
if ( $display ) {
?>
<option value="<?=$key?>" <?=$select?>><?=$event?></option>
<option value="<?=$key?>" <?=$select?>><?=$event?></option>
<?php
}
}
?>
</select>

View File

@ -37,7 +37,7 @@ $(document).ready(function(){
var dialogOpts = {
bgiframe: true,
title: title,
width: 800,
width: 600,
height: 400,
modal: true,
closeOnEscape: false,