<!-- ============================================================== -->
<!-- Resource Modal Content -->
<!-- ============================================================== -->
{% set readonly = '' if current_user.is_manager else 'readonly' %}
{% set disabled = '' if current_user.is_manager else 'disabled' %}

  <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="resource-modal-title"> Resource (id={{ resource.id }}) </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <div class="row">
            <!-- Resource Form -->
            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                <form id="resource-form" data-parsley-validate="" novalidate="">

                    <input type="hidden" id="resource-id" name="resource-id" value="{{ resource.id }}">

                    {% include 'dynamic_form_params.html' %}
                </form>
            </div>
            <!-- end Resource Form -->
        </div>
      </div>

      <div class="modal-footer">
          {% if current_user.is_manager %}
            <button type="button" id="resource-btn-cancel"  class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
              {% set buttonLabel = 'Update' if resource.id else 'Create'  %}
            <button type="button" id="resource-btn-ok" class="btn btn-outline-dark" onclick="javascript: onResourceOkButtonClick()">{{ buttonLabel }}</button>
          {% else %}
              <button type="button" id="resource-btn-ok"  class="btn btn-outline-secondary" data-dismiss="modal">OK</button>
          {% endif %}
      </div>
    </div>
  </div>
<!-- ============================================================== -->
<!-- End of Resource Modal Content -->
<!-- ============================================================== -->

<script>

(function(window, document, $, undefined) {
"use strict";

    $('select').selectpicker();

})(window, document, window.jQuery);

</script>