<commit_before>{% extends '::base.html.twig' %}

{% block body %}

<h3>Neue Berichtigung</h3>
<form id="correctionNew" class="new" action="{{ path('PapyrillioBeehiveBundle_correctionnew') }}" method="post" {{ form_enctype(form) }}>
    {{ form_errors(form) }}

    <div>
        <label>Band</label>
        <select name="compilation">        
        {% for compi in compilations %}
          <option value="{{ compi.id }}" {{ compi.id == form.vars.value.compilation.id ? 'selected="selected"' : '' }}>{{ compi.title }}</option>
        {% endfor %}
        </select>
    </div>
    <div>
        <label>BL_Ed_Nr</label>
        <select name="editionSort" id="editionSort">        
        {% for edi in editions %}
          <option value="{{ edi.id }}" {{ edi.id == form.vars.value.edition.id ? 'selected="selected"' : '' }}>{{ edi.sort }}</option>
        {% endfor %}
        </select>
    </div>
    <div>
        <label>Edition</label>
        <select name="edition" id="editionTitle">
        {% for edi in editions %}
          <option value="{{ edi.id }}" {{ edi.id == form.vars.value.edition.id ? 'selected="selected"' : '' }}>{{ edi.title }}</option>
        {% endfor %}
        </select>
    </div>
    
    <div class="text">
      {{ form_label(form.text) }}
      {{ form_widget(form.text) }}
      {{ form_errors(form.text) }}
    </div>
    
    <div class="position">
      {{ form_label(form.position) }}
      {{ form_widget(form.position) }}
      {{ form_errors(form.position) }}
    </div>
    
    <div class="description">
      {{ form_label(form.description) }}
      {{ form_widget(form.description, { 'attr': { 'class': 'greek' } }) }}
      {{ form_errors(form.description) }}
    </div>
    
    <h5>Aufgaben definieren</h5>
    {% for task in ['bl', 'hgv', 'tm', 'ddb', 'apis', 'biblio'] %}
      <div class="task {{ task }} greek">
        <label>{{ task | upper }}</label>
        <input name="task[{{ task }}]" id="task_{{ task }}" type="text" />
      </div>
    {% endfor %}
    
    <div class="idno">
    {{ form_rest(form) }}
    </div>

    <input class="submit" type="submit" name="new" value="Datensatz anlegen" />
</form>

{% endblock %}

{% block javascripts %}
  {{ parent() }}
  
  <script src="{{ asset('js/correction.js') }}" type="text/javascript"></script>

  <script type="text/javascript">
  
  $(document).ready(function(){
    $('#editionTitle').change(function(event){
      $('#editionSort').val(this.value);
      if(this.value == 1){
        $('#form_tm').removeAttr('required');<commit_msg>add entry helper for line field of correction form for new corrections<commit_after>{% extends '::base.html.twig' %}

{% block body %}

<h3>Neue Berichtigung</h3>
<form id="correctionNew" class="new" action="{{ path('PapyrillioBeehiveBundle_correctionnew') }}" method="post" {{ form_enctype(form) }}>
    {{ form_errors(form) }}

    <div>
        <label>Band</label>
        <select name="compilation">        
        {% for compi in compilations %}
          <option value="{{ compi.id }}" {{ compi.id == form.vars.value.compilation.id ? 'selected="selected"' : '' }}>{{ compi.title }}</option>
        {% endfor %}
        </select>
    </div>
    <div>
        <label>BL_Ed_Nr</label>
        <select name="editionSort" id="editionSort">        
        {% for edi in editions %}
          <option value="{{ edi.id }}" {{ edi.id == form.vars.value.edition.id ? 'selected="selected"' : '' }}>{{ edi.sort }}</option>
        {% endfor %}
        </select>
    </div>
    <div>
        <label>Edition</label>
        <select name="edition" id="editionTitle">
        {% for edi in editions %}
          <option value="{{ edi.id }}" {{ edi.id == form.vars.value.edition.id ? 'selected="selected"' : '' }}>{{ edi.title }}</option>
        {% endfor %}
        </select>
    </div>
    
    <div class="text">
      {{ form_label(form.text) }}
      {{ form_widget(form.text) }}
      {{ form_errors(form.text) }}
    </div>
    
    <div class="position">
      {{ form_label(form.position) }}
      {{ form_widget(form.position) }}
      {{ form_errors(form.position) }}
    </div>
    
    <div class="description">
      {{ form_label(form.description) }}
      {{ form_widget(form.description, { 'attr': { 'class': 'greek' } }) }}
      {{ form_errors(form.description) }}
    </div>
    
    <h5>Aufgaben definieren</h5>
    {% for task in ['bl', 'hgv', 'tm', 'ddb', 'apis', 'biblio'] %}
      <div class="task {{ task }} greek">
        <label>{{ task | upper }}</label>
        <input name="task[{{ task }}]" id="task_{{ task }}" type="text" />
      </div>
    {% endfor %}
    
    <div class="idno">
    {{ form_rest(form) }}
    </div>

    <input class="submit" type="submit" name="new" value="Datensatz anlegen" />
</form>

{% endblock %}

{% block javascripts %}
  {{ parent() }}
  
  <script src="{{ asset('js/jquery/jquery-specialedit.hacked.js') }}" type="text/javascript"></script>
  <script src="{{ asset('js/correction.js') }}" type="text/javascript"></script>

  <script type="text/javascript">
  
  $(document).ready(function(){
    $('#form_position').specialedit(['R°', 'V°']);
    $('#editionTitle').change(function(event){
      $('#editionSort').val(this.value);
      if(this.value == 1){
        $('#form_tm').removeAttr('required');
{'fraction_non_alphanumeric': 0.2160737812911726, 'fraction_numerical': 0.0018821757952192735, 'mean_word_length': 2.7291228070175437, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, 'https://': 0, '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': '830244', 'n_tokens_mistral': 1843, 'n_tokens_neox': 1765, 'n_words': 314}