Modification affichage du champs opposition insee, issue #0000117

This commit is contained in:
Michael RICOIS 2010-01-14 11:29:30 +00:00
parent 6f850c48ce
commit 3f1126f51b
3 changed files with 26 additions and 19 deletions

View File

@ -1,4 +1,5 @@
$(document).ready(function(){
$(document).ready(function()
{
//Initialisation événements
$("#jugement").change(function ()
{
@ -40,6 +41,12 @@ $(document).ready(function(){
}
});
$("[name=oppositionInsee]").change(function ()
{
if($(this).attr('checked')==1) $('#divOppositionInsee').load('./pages_saisie/oppositioninsee.php');
else $('#divOppositionInsee').html('');
});
//Initialisation
displayFormSource();
});
@ -60,8 +67,6 @@ function displayBlock(block){
}
}
function loadFormSaisie(eventValue, params){
$('#subFormSaisie').html('<p><img src="./img/ajax/19-1.gif" /></p>');
if(params!=''){

View File

@ -503,25 +503,12 @@ include('./pages_saisie/event_0000.php');
<input type="text" size="11" name="frmSaisie[sirenDoublon]" value="<?=$etab['sirenDoublon']?>"/>
<?php
if($etab['FJ'][0]==1 && 0)
if($etab['FJ'][0]==1)
{
?>
<label>Entreprise ayant exercée sont droit d'opposition en</label>
<select name="frmSaisie[moisOppositionInsee]">
<?php
setlocale (LC_TIME, 'fr_FR','fra');
$month = date("m");
for($i=0;$i<12;$i++)
{
$lastmonth = mktime(0, 0, 0, $month-$i, date("d"), date("Y"));
$selected = '';
if($i==1) $selected = 'selected';
?>
<option value="<?=date('Ym',$lastmonth)?>" <?=$selected?>><?=strftime('%B',$lastmonth)?> <?=date('Y',$lastmonth)?></option>
<?php
}
?>
</select>
<input type="checkbox" name="oppositionInsee" value="1"/>
<div id="divOppositionInsee"></div>
<?php
}
?>

View File

@ -0,0 +1,15 @@
<select name="frmSaisie[moisOppositionInsee]">
<?php
setlocale (LC_TIME, 'fr_FR','fra');
$month = date("m");
for($i=0;$i<12;$i++)
{
$lastmonth = mktime(0, 0, 0, $month-$i, date("d"), date("Y"));
$selected = '';
if($i==1) $selected = 'selected';
?>
<option value="<?=date('Ym',$lastmonth)?>" <?=$selected?>><?=strftime('%B',$lastmonth)?> <?=date('Y',$lastmonth)?></option>
<?php
}
?>
</select>