Skip to content

Commit

Permalink
Dynamic placeholders for the name field were implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbdavide committed Oct 12, 2017
1 parent d987e83 commit 0616f1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sales/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ function to_int($element) {
function saleProduct(elements, buttons) {
elements['price'].attr('readonly', true)
elements['name'].attr('readonly', true)
elements['name'].attr('placeholder', 'Nombre del producto')
elements['bar_code'].attr('disabled', false)
buttons['search_product'].attr('disabled', false)
}

function saleService(elements, buttons) {
elements['price'].attr('readonly', false)
elements['name'].attr('readonly', false)
elements['name'].attr('placeholder', 'Nombre del servicio')
elements['bar_code'].attr('disabled', true)
buttons['search_product'].attr('disabled', true)
}
Expand Down
2 changes: 1 addition & 1 deletion sales/templates/sales/create_sale.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1>Ingreso</h1>
</div>
<div class="form-group">
<label for="product-name">Nombre: </label>
<input type="text" class="form-control" id="name" readonly>
<input type="text" class="form-control" id="name" placeholder="Nombre del producto" readonly>
</div>
</form>

Expand Down

0 comments on commit 0616f1a

Please sign in to comment.