fellipeh

Untitled

Aug 28th, 2013
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.49 KB | None | 0 0
  1.         <legend>Itens do pedido</legend>
  2. {#           <a class="add-row" href="javascript:void(0)">Novo Item</a>#}
  3.           {{ formsetItens.management_form }}
  4.           <table id="id_itenspedido_set" class="dataTable" width="100%">
  5.             <thead>
  6.                 <tr>
  7.                     <th width="10%">Referência</th>
  8.                     <th width="30%">Produto</th>
  9.                     <th width="20%">Cor</th>
  10.                     <th width="10%">Qtde</th>
  11.                     <th width="10%">Preço Unit.</th>
  12.                     <th width="15%">Preço Total</th>
  13.                     <th width="5%">Excluir</th>
  14.                 </tr>
  15.             </thead>
  16.             <tbody>
  17.             <div id="id_form_template">
  18.             {% for itens in formsetItens.forms %}
  19.               {% if itens.idproduto > 0 %}
  20.               <tr id="{{ itens.prefix }}-row">
  21.                   {% if itens.errors %}
  22.                     <span class="label label-important">Erros</span>
  23.                     <div id="row alert alert-error">
  24.                         <p>Houve erros ao processar o formulário, por favor verifique e envie novamente:</p>
  25.                         <ul>
  26.                             {% for field in itens %}
  27.                                 {% if field.errors %}<li>{{ field.label_tag }} {{ field.errors|striptags }}</li>{% endif %}
  28.                             {% endfor %}
  29.                         </ul>
  30.                     </div>
  31.                   {% endif %}
  32.  
  33.                 <input type="hidden" id="{{ itens.prefix }}-iditenspedido" name="{{ itens.prefix }}-iditenspedido" value="{{ itens.iditenspedido.value }}">
  34.                 <input type="hidden" id="{{ itens.prefix }}-idproduto" name="{{ itens.prefix }}-idproduto" value="{{ itens.idproduto.value }}">
  35.                 <input type="hidden" id="{{ itens.prefix }}-idproduto_idcores" name="{{ itens.prefix }}-idproduto_idcores" value="{{ itens.instance.idproduto.idcores }}">
  36.                 <input type="hidden" name="{{ itens.prefix }}-idsys_point_cliente" value="{{ itens.idsys_point_cliente.value }}">
  37.                 <input type="hidden" name="{{ itens.prefix }}-idempresa" value="{{ itens.idempresa.value }}">
  38.  
  39.                 <th><input type="text" id="{{ itens.prefix }}-ref" name="{{ itens.prefix }}-ref" value="{{ itens.instance.idproduto.idmercadoria.referencia }}" readonly=True> </th>
  40.                 <th><input type="text" id="{{ itens.prefix }}-desc" name="{{ itens.prefix }}-desc" value="{{ itens.instance.idproduto.idmercadoria.descricao }}" readonly=True> </th>
  41.                 <th><input type="text" id="{{ itens.prefix }}-cor" name="{{ itens.prefix }}-cor" value="{{ itens.instance.idproduto.idcores.descricao }}" readonly=True> </th>
  42.                 <th><input id="{{ itens.prefix }}-quantidade" name="{{ itens.prefix }}-quantidade" type="text" value="{{ itens.quantidade.value }}" style="text-align:right;" readonly=True></th>
  43.                 <th><input id="{{ itens.prefix }}-preco" name="{{ itens.prefix }}-preco" type="text" value="{{ itens.preco.value }}"  style="text-align:right;" readonly=True></th>
  44.                 <th><input id="{{ itens.prefix }}-precototal" name="{{ itens.prefix }}-precototal" type="text" value="{{ itens.precototal.value }}"  style="text-align:right;" readonly=True></th>
  45.                 <th>{% if itens.instance.pk %}{{ itens.DELETE }}{% endif %}</th>
  46.               </tr>
  47.               {% endif %}
  48.             {% endfor %}
  49.             </div>
  50.             </tbody>
  51.         </table>
  52.       </fieldset>
Advertisement
Add Comment
Please, Sign In to add comment