{% extends "djmicrosip_inventarios\base.html" %}
{% block title %}Preferencias {% endblock %}

<!-- CSS Code -->
{% block style_css %}
{{ block.super }}
{% endblock %}

<!-- JavaScript Code -->
{% block js_code %}
{{ block.super }}
<script>
  if( $('#id_concepto_compra').is(':checked') ) 
   {$("#tipo_concepto").removeClass("hidden");
    $("#tipo_concepto select").prop('required',true);}
   else
    {$("#tipo_concepto").addClass("hidden");
     $("#tipo_concepto select").prop('required',false);}
  
  $("#id_concepto_compra").click( function(){
   if( $(this).is(':checked') ) 
   {$("#tipo_concepto").removeClass("hidden");
    $("#tipo_concepto select").prop('required',true);}
   else
    {$("#tipo_concepto").addClass("hidden");
     $("#tipo_concepto select").prop('required',false);}
  });

  $("#id_mensaje_extra").jqte();

</script>
{% endblock %}

{% block breadcrumb %}
  {{ block.super }} 
  <li> Herramientas </li> 
  <li class='active'> Preferencias </li> 
{% endblock %}
{% block content %}
{% if msg %}
<div class="alert alert-success fade in">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <strong>Bien hecho!!</strong> {{ msg }}
</div>
{% endif %}
{% if warrning %}
<div class="alert alert-danger fade in">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <strong>!!!</strong> {{ warrning }}
</div>
{% endif %}
<form method="post" class="form-horizontal" action="" enctype='multipart/form-data'>{% csrf_token %}
{{ form.errors }}
<div class="page-header">
  <h1>Preferencias <small></small> <button type="submit" class="btn"><i class="glyphicon glyphicon-floppy-save"></i> Guardar</button>  </h1>
</div>
<ul class="nav nav-tabs" role="tablist">
	<li class="active"><a href="#home" role="tab" data-toggle="tab">General</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
	<div class="tab-pane active" id="home" style="margin: 0 1em;">
    <div class="row">
      <br>
      <div class="col-md-2">
        Contar series 
        {{ form.manejar_series }}  
      </div>
      <div class="col-md-2">
        Concepto entrada compra 
        {{ form.concepto_compra }}  
      </div>
      <div class="col-md-2 hidden" id="tipo_concepto">
        Tipo 
        {{ form.concepto }}  
      </div>
      <!-- <div class="col-md-6">
        <div class="alert alert-info" role="alert"> <strong>Opcion no esta disponible,</strong> pronto lo estara!!</div>
      </div> -->
    </div>
  </div>
</div>
</form>
{% endblock %}