<commit_before>{% import 'macros/form.html' as form %}

{% set langs = h.fluent_form_languages(field, entity_type, object_type, schema) %}
{% set lang = langs[0] %}

{% set read_endpoint = '.read' if h.ckan_version() > '2.9' else '_read' %}
{%- set controller = 'organization' -%}
{%- set module_placeholder = '<organization>' -%}
{%- set prefix = h.url_for(object_type + read_endpoint, id='') -%}
{%- set domain = h.url_for(object_type + read_endpoint, id='', qualified=true) -%}
{%- set domain = domain|replace("http://", "")|replace("https://", "") -%}

<div class="form-group-fluent">

    {%- if field.extra_label is not none -%}
        <h3 style="margin-left: -15px;">{{ _(field.extra_label) }}</h3>
    {%- else -%}
        <label class="control-label group-label">{{ _(field.label) }}</label>
    {%- endif -%}

  <div class="form-group control-full">

       <label class="control-label" for="{{ 'field-' + field.field_name + '-' + lang }}">
          {{ _(field.input_title[0]) }}
        <span title="{{ _('Required field') }}" class="control-required" style="color:black">*</span>
      </label>
      <div class="controls">
          {%- if field.additional_description is not none -%}
              <p>{{ _(field.additional_description) }}</p>
          {%- endif -%}
          <input id="{{ 'field-' + field.field_name + '-' + lang }}"
                 type="text"
                 name="{{ field.field_name + '-' + lang }}"
                 value="{{ empty_and_escape }}"
                 placeholder="{{ h.scheming_language_text(field.form_placeholder, lang) }}"
                 {{ field.form_attrs if 'form_attrs' in field else {} }} />

          {%- if field.show_url -%}
            <div class="slug-preview">
                <span class="slug-preview-prefix">{{ domain + '' + data['name']}}</span>
            </div>
          {%- endif -%}
      </div>

  {%- for lang in langs -%}
    {% if loop.index != 1 %}
      <label class="control-label" for="{{ 'field-' + field.field_name + '-' + lang }}">
          {{ _(field.input_title[loop.index - 1]) }}
      </label>
      <div class="controls">
          <input id="{{ 'field-' + field.field_name + '-' + lang }}"
                 type="text"
                 name="{{ field.field_name + '-' + lang }}"
                 value="{{ data[field.field_name + '-' + lang] }}"
                 placeholder="{{ h.scheming_language_text(field.form_placeholder, lang) }}"
                 {{ field.form_attrs if 'form_attrs' in field else {} }} />
      </div>
    {% endif %}
  {%- endfor -%}
  </div>
</div>
<hr/>
<commit_msg>LIKA-412: fix new organization form to not try to show url<commit_after>{% import 'macros/form.html' as form %}

{% set langs = h.fluent_form_languages(field, entity_type, object_type, schema) %}
{% set lang = langs[0] %}

{% set read_endpoint = '.read' if h.ckan_version() > '2.9' else '_read' %}
{%- set controller = 'organization' -%}
{%- set module_placeholder = '<organization>' -%}
{%- set prefix = h.url_for(object_type + read_endpoint, id='') -%}
{%- set domain = h.url_for(object_type + read_endpoint, id='', qualified=true) -%}
{%- set domain = domain|replace("http://", "")|replace("https://", "") -%}

<div class="form-group-fluent">

    {%- if field.extra_label is not none -%}
        <h3 style="margin-left: -15px;">{{ _(field.extra_label) }}</h3>
    {%- else -%}
        <label class="control-label group-label">{{ _(field.label) }}</label>
    {%- endif -%}

  <div class="form-group control-full">

       <label class="control-label" for="{{ 'field-' + field.field_name + '-' + lang }}">
          {{ _(field.input_title[0]) }}
        <span title="{{ _('Required field') }}" class="control-required" style="color:black">*</span>
      </label>
      <div class="controls">
          {%- if field.additional_description is not none -%}
              <p>{{ _(field.additional_description) }}</p>
          {%- endif -%}
          <input id="{{ 'field-' + field.field_name + '-' + lang }}"
                 type="text"
                 name="{{ field.field_name + '-' + lang }}"
                 value="{{ empty_and_escape }}"
                 placeholder="{{ h.scheming_language_text(field.form_placeholder, lang) }}"
                 {{ field.form_attrs if 'form_attrs' in field else {} }} />

          {%- if field.show_url and 'name' in data -%}
            <div class="slug-preview">
                <span class="slug-preview-prefix">{{ domain + '' + data['name']}}</span>
            </div>
          {%- endif -%}
      </div>

  {%- for lang in langs -%}
    {% if loop.index != 1 %}
      <label class="control-label" for="{{ 'field-' + field.field_name + '-' + lang }}">
          {{ _(field.input_title[loop.index - 1]) }}
      </label>
      <div class="controls">
          <input id="{{ 'field-' + field.field_name + '-' + lang }}"
                 type="text"
                 name="{{ field.field_name + '-' + lang }}"
                 value="{{ data[field.field_name + '-' + lang] }}"
                 placeholder="{{ h.scheming_language_text(field.form_placeholder, lang) }}"
                 {{ field.form_attrs if 'form_attrs' in field else {} }} />
      </div>
    {% endif %}
  {%- endfor -%}
  </div>
</div>
<hr/>

{'fraction_non_alphanumeric': 0.20860296916634946, 'fraction_numerical': 0.0043776170536733916, 'mean_word_length': 2.3050314465408803, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 61, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1925212', 'n_tokens_mistral': 1746, 'n_tokens_neox': 1648, 'n_words': 346}