{% ckan_extends %}
{% block basic_fields %}
  {{ super() }}
    {% block apinf_input %}
      {% call form.input('apinf_page', id='apinf-url', label=_('Apinf Page'), placeholder=_('http://apinfserver.com/example-api'),
         value=data.apinf_page, error=errors.apinf_page, classes=['apinf-input', 'hidden', 'control-full']) %}

        <span class="info-block info-block-small hidden apinf-input">
          <i class="icon-info-sign"></i>
          {{ _('Apinf page with API service description. Leave it blank if the service is not published there') }}
        </span>
      {% endcall %}
    {% endblock %}

    <script type="text/javascript">
        window.addEventListener("load", function () {

            if ($('#field-image-url').is(':visible')) {
                $('.apinf-input').removeClass('hidden');
            }

            // FIXME: Remove timeout when resolved the problem with CKAN event binding
            setTimeout(() => {
                $('#field-image-upload + a + a').on("click", function () {
                    $('.apinf-input').removeClass('hidden');
                });
                $('.btn-remove-url').click(function() {
                    $('.apinf-input').addClass('hidden');
                    $('#apinf-url').val('');
                });
            }, 200);
        });
    </script>

{% endblock basic_fields %}
Include a form field for providing Apinf URL
Include a form field for providing Apinf URL
