59 lines
1.8 KiB
PHP
59 lines
1.8 KiB
PHP
<?php
|
|
include_once(__DIR__."/../../core.php");
|
|
|
|
$idordine = $html->form('idordine');
|
|
$dir = 'entrata';
|
|
$module_name = 'Articoli';
|
|
|
|
//Info documento
|
|
$q = "SELECT * FROM or_ordini WHERE id='".$idordine."'";
|
|
$rs = $dbo->fetchArray($q);
|
|
( $rs[0]['numero_esterno'] != '' ) ? $numero=$rs[0]['numero_esterno'] : $numero=$rs[0]['numero'];
|
|
$idanagrafica = $rs[0]['idanagrafica'];
|
|
|
|
|
|
/*
|
|
Form di inserimento riga documento
|
|
*/
|
|
echo "<label></label><br><br>\n";
|
|
echo "<form id=\"link_form\" action=\"".$rootdir."/editor.php?id_module=".$modules_info[$module_name]['id']."&id_record=".$idordine."\" method=\"post\">\n";
|
|
|
|
echo " <input type='hidden' name='op' value='etichetta'>\n";
|
|
echo " <input type='hidden' name='backto' value='record-edit'>\n";
|
|
echo " <input type='hidden' name='dir' value='".$dir."'>\n";
|
|
|
|
//Codice
|
|
echo " <div class='row'>\n";
|
|
echo " <div class='col-md-3'>\n";
|
|
echo " <label>Codice</label>\n";
|
|
echo " <input type='text' class='form-control' id='codice' name='codice' value=\"New Codice\">\n";
|
|
echo " </div>\n";
|
|
echo " <div class='col-md-7'>\n";
|
|
echo " <label>Descrizione</label>\n";
|
|
echo " <input type='text' class='form-control' id='descrizione' name='descrizione' value=\"New Descrizione\">\n";
|
|
echo " </div>\n";
|
|
echo " </div>\n";
|
|
echo " <a onclick=\"duplica();\" class=\"btn btn-primary pull-right\"><i class=\"fa fa-plus\"></i> Aggiungi</a>\n";
|
|
echo "</form>\n";
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function duplica(){
|
|
if( $('#descrizione').val()!='' && $('#codice').val()!='' ){
|
|
$("#link_form").submit();
|
|
|
|
}
|
|
}
|
|
|
|
$(document).ready( function(){
|
|
|
|
// start_jquerychosen();
|
|
// start_inputmask();
|
|
|
|
});
|
|
</script>
|
|
|
|
<div class="clearfix"></div>
|
|
|