openstamanager/modules/modelli_primanota/add.php

53 lines
1.2 KiB
PHP
Raw Normal View History

2018-05-04 17:57:46 +02:00
<?php
include_once __DIR__.'/../../core.php';
2018-06-23 18:35:08 +02:00
?><form action="" method="post" id="add-form">
2018-05-04 17:57:46 +02:00
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit">
<div class="row">
<div class="col-md-8">
2018-06-23 18:35:08 +02:00
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1 ]}
2018-05-04 17:57:46 +02:00
</div>
</div>
<?php
// Salvo l'elenco conti in un array (per non fare il ciclo ad ogni riga)
/*
Form di aggiunta riga movimento
*/
echo '
<table class="table table-striped table-condensed table-hover table-bordered"
<tr>
<th>'.tr('Conto').'</th>
</tr>';
for ($i = 0; $i < 10; ++$i) {
2018-06-23 18:35:08 +02:00
$required = ($i <= 1) ? 1 : 0;
// Conto
2018-05-04 17:57:46 +02:00
echo '
<tr>
<td>
2018-06-23 18:35:08 +02:00
{[ "type": "select", "name": "idconto['.$i.']", "ajax-source": "conti", "required": "'.$required.'" ]}
</td>
2018-05-04 17:57:46 +02:00
</tr>';
}
echo '
</table>';
?>
<!-- PULSANTI -->
<div class="row">
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> <?php echo tr('Aggiungi'); ?></button>
</div>
</div>
</form>