<!--TODO:
- Styles auslagern
- Service-Mail?
- Test für mobile Geräte
- genereller Funktionstest
-->

<style>
    #login {
        width: 600px !important;
        padding: 1% 0 0;
    }

    #select-vorlage {
        font-size: 24px;
        line-height: 1.33333333;
        width: 100%;
        border-width: 0.0625rem;
        padding: 0.1875rem 0.3125rem;
        margin: 0 6px 16px 0;
        min-height: 40px;
        max-height: none;
    }
</style>




        {% if code is not empty %}
          <p>
            <label for="code">{{ label }}</label>
            <input type="text"
                    id="code"
                    name="code"
                    value="{{code}}"
                    class="input"
                    style="color: grey; cursor: not-allowed;"
                    readonly
            >
          </p>
        {% else %}
          {% if redeemCodeManually %}
            <p>
              <label for="code">{{ label }}</label>
              <input type="number"
                min="0"
                id="code"
                name="code"
                class="input"
              >
            </p>
          {% endif %}

        {% endif %}

    
    {% if company is not null %}
    <p class="form-group w-100">
        <label class="label-above w-100" for="select-vorlage">Team</label>
        <select class="mw-100 p-2" id="select-vorlage" name="group_id" {% if companygroup is not null %}style="color:grey; cursor:not-allowed" readonly{% endif %}>
            {% if companygroup is null %}
                <option value="0">Team wählen</option>
                {% for group in groups %}
                    <option value="{{group.id}}">{{group.name}}</option>
                {% endfor %}
            {% else %}
                {% for group in groups %}
                    {% if group.id==companygroup.id%}
                        <option value="{{group.id}}">{{group.name}}</option>
                    {% endif %}
                {% endfor %}
            {% endif %}
        </select>
    </p>
    {% endif %}

  {% if register_problem and register_solution %}
    <div class="accordion ts-accordion mb-4" id="accordionProblemSolution">
        <div class="">
          <div class="card-header" id="headingProblem">
            <h2 class="mb-0">
              <button class="btn btn-link btn-block text-left collapsed accordiontitle accordiontitle-small" type="button" data-toggle="collapse" data-target="#collapseSolution" aria-expanded="false" aria-controls="collapseSolution">
                <i class="fas fa-plus ts-accordion-plus"></i> {{register_problem}}
              </button>
            </h2>
          </div>
          <div id="collapseSolution" class="collapse" aria-labelledby="headingProblem" data-parent="#accordionProblemSolution">
            <div class="mb-3">
                <p>
                  {{register_solution | replace ({'adminmail': '<a href=mailto:'~ admin_mail ~'>'~admin_mail~'</a>' }) | raw  }}     
                </p>  
            </div>
          </div>
        </div>
      </div>
      {% endif %}
    {% if privacy_terms_URL %}
      <div class="form-group form-check d-flex align-items-center p-0">
        <input type="checkbox" class="form-check-input" id="privacy_terms_checkbox" name="privacy_terms_checkbox" required>
        <label class="form-check-label ml-4" for="privacy_terms_checkbox">Ich habe die <a href="{{privacy_terms_URL}}" target="_blank">Teilnahmeinformationen und Datenschutzerklärung </a> zur Teilnahme an {{website_name}} gelesen und verstanden. Ich erkläre mich mit der Teilnahme unter den genannten Bedingungen einverstanden. </label>
      </div>
    {% endif %}