12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <div class="content-add01">
- <div class="heading01"><h1>Validation des factures pour la période "<?php echo $katao_period->getName() ?>"</h1></div>
- </div>
- <?php echo form_tag('@katao_invoice_validate') ?>
- <p><i>Sélectioner ci-dessous le noeud pour lequel vous souhaitez valider les factures adhérents.</i></p>
- <table>
- <tr valign="top">
- <td><?php echo label_for('node_id', 'Noeud') ?></td>
- <td><?php echo select_tag('node_id', options_for_select(KataoNodePeer::getAllArray(), false, array('include_custom' => '— choisir —')), array('onchange' => 'updateProductsDetails(); return true;')) ?></td>
- </tr>
- </table>
- <div id="products-details"></div>
- <br /><?php echo submit_tag('Valider', array('id' => 'commit', 'disabled' => true)) ?> ou <a href="<?php echo url_for('kataoInvoice/index') ?>">annuler</a>
- </form>
- <script type="text/javascript">
- function updateProductsDetails(){
- if ($F('node_id')) {
- new Ajax.Request('<?php echo url_for('kataoInvoice/updateProductDetails') ?>', {
- method: 'get',
- parameters: {
- node_id: $F('node_id')
- },
- onSuccess: updateProductsDetailsResponse
- });
- }
- }
- function updateProductsDetailsResponse(xhr){
- var response = xhr.responseText;
- $('products-details').innerHTML = response;
- if ("<i>Aucune facture à valider.</i>" == response || "<i>Toutes les factures de ce noeud ne sont pas délivrées.</i>" == response) {
- $('commit').disabled = true;
- return false;
- }
- $('commit').disabled = false;
- }
- </script>
|