{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block page_content %}
{% include "inventory/_navigation.html" %}
<div class="page-header">
  <h1>
    {% if method=='add'%}
      Registrar Recebimento de Reativo
    {% else %}
      Registrar Baixa de Reativo
    {% endif %}
  </h1>
</div>
  {{ wtf.quick_form(form) }}
{% endblock %}

{% block scripts %}
  {{ super() }}
  <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script>
  <script type="text/javascript">
    $('#product_id').select2();
  </script>
{% endblock %}

{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block page_content %}
{% include "inventory/_navigation.html" %}
<div class="page-header">
  <h1>
    {% if method=='add'%}
      Registrar Recebimento de Reativo
    {% else %}
      Registrar Baixa de Reativo
    {% endif %}
  </h1>
</div>
  {{ wtf.quick_form(form) }}
{% endblock %}

{% block scripts %}
  {{ super() }}
  <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script>
  <script type="text/javascript">
    $('#product_id').select2({
        "language": {
            "noResults": function() {
                return "Nenhum resultado encontrado. <a href='{{ url_for('inventory.create_reactive') }}'>Cadastrar?</a>"
            }
        },
        escapeMarkup: function (markup) {
            return markup;
        }
    });
  </script>
{% endblock %}

Add link to register product if Select2 has no result
:rocket: Add link to register product if Select2 has no result
