I have a page to add products to an invoice:
- You have a part to filter by name or code.
- Other part for sorting by category or price.
- Finally a edit not editable where the product name is put when clicking on one row, and that, along with the amount entered in another edit, process when you click add. All this within a form for that purpose.
The fact is that I can not locate the elements and I wanted to know a correct technique to do it.
<form>
<p>FILTRO</p>
<script src="includes/js/busqProducto.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="form-group">
<label class="col-sm-1 control-label">COD</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="cod" placeholder="Codigo Articulo"/>
</div>
<label class="col-sm-1 control-label">NOMBRE</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="nombre" placeholder="Nombre Articulo"/>
</div>
<p>ORDENAMIENTO</p>
<div class="col-sm-4" style="margin: 20px 0 0 10px;">
<input type="checkbox" id="marca"/>
<label>NOMBRE</label>
<select id="mySelect" data-show-icon="true">
<option> ASC</option>
<option> DESC</option>
</select>
<input type="checkbox"id="categoria"/>
<label>PRECIO</label>
<select id="mySelect" data-show-icon="true">
<option> ASC</option>
<option> DESC</option>
</select>
</div>
</form>
<form style="position:relative;width: 100%;">
<div class="col-sm-8" >
<input type="text" disabled="true" class="form-control" id="nombreselec" placeholder="Nombre Articulo"/>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" id="CANTIDAD" placeholder="CANT"/>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-shopping-cart"></span>Agregar
</button>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-ok"></span>Terminado
</button>
</div>
</form>
<table id="resultado">
<thead>
<tr> <th>COD.:</th> <th>DESCRIPCION</th> <th>MARCA</th>
<th>CATEGORIA</th> <th>P/U</th><th>+</th>
</tr></thead>
<tbody>
</tbody>
</table>
My idea is to align the name and the quantity to the two buttons. I hope your help