2011-07-01 12:44:12 +00:00
|
|
|
<?php if ($this->op == 'delete') {?>
|
|
|
|
|
|
|
|
<div id="result">
|
|
|
|
Êtes-vous sur de vouloir supprimer l'annonce <?=$this->idan?>, source <?=$this->source?> ?
|
|
|
|
</div>
|
|
|
|
|
2011-09-01 14:07:23 +00:00
|
|
|
<form id="saisie" name="saisie" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'annonce'), null, true)?>" method="post">
|
2011-07-01 12:44:12 +00:00
|
|
|
<input type="hidden" name="op" value="<?=$this->op?>" />
|
|
|
|
<input type="hidden" name="idan" value="<?=$this->idan?>" />
|
|
|
|
<input type="hidden" name="siret" value="<?=$this->siret?>" />
|
|
|
|
<input type="hidden" name="source" value="<?=$this->source?>" />
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php } elseif ($this->op == 'copy'){ ?>
|
|
|
|
|
|
|
|
<div id="result">
|
2011-10-27 09:45:22 +00:00
|
|
|
Affecte l'annonce <?=$this->idan?> de <?=$this->siret?> sur un nouveau siren.
|
2011-07-01 12:44:12 +00:00
|
|
|
</div>
|
|
|
|
<br/>
|
2011-09-01 14:07:23 +00:00
|
|
|
<form id="saisie" name="saisie" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'annonce'), null, true)?>" method="post">
|
2011-07-01 12:44:12 +00:00
|
|
|
<input type="hidden" name="op" value="<?=$this->op?>" />
|
|
|
|
<input type="hidden" name="idan" value="<?=$this->idan?>" />
|
|
|
|
<input type="hidden" name="source" value="<?=$this->source?>" />
|
|
|
|
<input type="hidden" name="siretIn" value="<?=$this->siret?>" />
|
|
|
|
Siren / Siret : <input type="text" name="siretOut" value="" />
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php } elseif ($this->op == 'edit') {?>
|
2011-09-01 14:07:23 +00:00
|
|
|
|
2011-08-10 12:06:28 +00:00
|
|
|
<?php if (empty($this->message)){ ?>
|
|
|
|
<link rel="stylesheet" type="text/css" media="all" href="/themes/default/styles/saisie.css"/>
|
|
|
|
<script type="text/javascript" src="/themes/default/scripts/saisie.js"></script>
|
2011-09-01 14:07:23 +00:00
|
|
|
<form id="saisie" name="saisie" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'annonce'), null, true)?>" method="post">
|
2011-08-10 12:06:28 +00:00
|
|
|
<input type="hidden" name="op" value="<?=$this->op?>" />
|
|
|
|
<input type="hidden" name="siret" value="<?=$this->siret?>"/>
|
|
|
|
<input type="hidden" name="idan" value="<?=$this->idan?>">
|
2011-09-05 14:30:44 +00:00
|
|
|
<?=$this->action('form', 'saisie', null, array('siret'=>$this->siret))?>
|
2011-08-10 12:06:28 +00:00
|
|
|
</form>
|
|
|
|
<?php } else { echo $this->message; }?>
|
2011-09-01 14:07:23 +00:00
|
|
|
|
2011-12-11 11:50:51 +00:00
|
|
|
<?php } elseif ($this->op == 'even') {?>
|
|
|
|
|
|
|
|
<div id="result">
|
|
|
|
Modification du type d'évenement sur l'annonce <?=$this->idan?> de <?=$this->siret?>.<br/>
|
|
|
|
Attention à bien vérifier ce qui est fait !
|
2011-12-12 16:50:10 +00:00
|
|
|
</div>
|
2011-12-11 11:50:51 +00:00
|
|
|
<br/>
|
|
|
|
<form id="saisie" name="saisie" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'annonce'), null, true)?>" method="post">
|
|
|
|
<input type="hidden" name="op" value="<?=$this->op?>" />
|
|
|
|
<input type="hidden" name="idan" value="<?=$this->idan?>" />
|
|
|
|
<input type="hidden" name="siret" value="<?=$this->siret?>" />
|
|
|
|
|
|
|
|
<label>Type d'événement</label><br/>
|
2011-12-28 09:44:50 +00:00
|
|
|
<select name="even[]" multiple="multiple" size="10" style="width:600px;">
|
2011-12-11 11:50:51 +00:00
|
|
|
<option value="">-</option>
|
|
|
|
<?php foreach ($this->evens as $code => $lib):?>
|
|
|
|
<option value="<?=$code?>"><?=$lib?></option>
|
|
|
|
<?php endforeach;?>
|
|
|
|
</select>
|
|
|
|
</form>
|
2011-12-28 09:44:50 +00:00
|
|
|
<br/>
|
|
|
|
<span id="selectItem"></span>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$('select[name="even[]"]').change(function(){
|
|
|
|
var uniqueIsSelect = false;
|
|
|
|
var values = $(this).val();
|
|
|
|
var nbSelect = (values!=null) ? values.length : 0;
|
|
|
|
if (nbSelect>0) {
|
|
|
|
for (var i in values) {
|
|
|
|
item = values[i];
|
|
|
|
if (item.charAt(0)=='1') {
|
|
|
|
uniqueIsSelect = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$('span#selectItem').html(values.join(', '));
|
|
|
|
}
|
|
|
|
if (nbSelect>1 && uniqueIsSelect){
|
|
|
|
alert('Un seul évenement peut être sélectionné lorsque un code de type 1xxx est présent !');
|
|
|
|
$('select[name="even[]"] option:selected').removeAttr('selected');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2011-12-11 11:50:51 +00:00
|
|
|
|
2011-07-01 12:44:12 +00:00
|
|
|
<?php }?>
|
2011-09-01 14:07:23 +00:00
|
|
|
|
2012-03-23 10:55:01 +00:00
|
|
|
<script type="text/javascript" src="/libs/form/jquery.form.js"></script>
|
2011-07-01 12:44:12 +00:00
|
|
|
<script>
|
|
|
|
$('form#saisie').bind('submit', function(){
|
|
|
|
var options = {
|
|
|
|
target: '#result',
|
2011-12-28 09:44:50 +00:00
|
|
|
beforeSubmit: function(data){},
|
2011-07-01 12:44:12 +00:00
|
|
|
success: function(data){ $('#result').html(data); }
|
|
|
|
};
|
|
|
|
$(this).ajaxSubmit(options);
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
</script>
|