<commit_before>{% extends "FOMUserBundle:Login:box.html.twig" %}
{% block css %}
  <link rel="stylesheet" href="{{ path('mapbender_core_application_assets', {'slug': 'mb3-login', 'type': 'css'}) }}"/>
{% endblock %}

{% block title %}{{ 'fom.user.login.login.title' | trans}}{% endblock %}

{% block box_content %}
  <div class="loginBox login">
    <h2 class="contentTitle">{{ 'fom.user.login.login.caption' | trans }}</h2>

    <form action="{{ path("fom_user_login_logincheck") }}" method="post" id="login" novalidate="novalidate">
      {% if error %}
        <div class="messageBox error">
          {% if error.message == "Bad credentials" %}
            {{ 'fom.user.login.errors.bad-credentials' | trans }}
          {% else %}
            {{ error.message | trans }}
          {% endif %}
        </div>
      {% endif %}

      <label class="left labelInput" for="username">{{ 'fom.user.login.login.username' | trans}}:</label>
      <input class="input" id="username" type="text" name="_username" value="{{ last_username }}" autofocus />

      <div class="clearContainer"></div>

      <label class="left labelInput" for="password">{{ 'fom.user.login.login.password' | trans}}:</label>
      <input class="input" type="password" id="password" name="_password" />

      <div class="clearContainer"></div>

      {% if selfregister == true %}
      <a class="linkButton iconLinkButton left" href="{{ path('fom_user_registration_form') }}">{{ 'fom.user.login.login.register' | trans}}</a>
      {% endif %}
      {% if reset_password == true %}
      <a class="linkButton iconLinkButton left" href="{{ path('fom_user_password_form') }}">{{ 'fom.user.login.login.forgot_password' | trans}}?</a>
      {% endif %}

      <input type="submit" class="right button" value="{{ 'fom.user.login.login.login' | trans}}" />
      <div class="clearContainer"></div>
    </form>
  </div>
  <script type="text/javascript">
    if(top != window) {
      top.location.href = location.href;
      top.location.reload();
    }
    var Mapbender = Mapbender || {};
    Mapbender.configuration = {elements:{}};
  </script>
  <script>

      {% if  cookieconsent is defined %}

      var backgroundColor = {{ cookieconsent.backgroundColor| default("#000000")| json_encode | raw }};
      var backgroundTextColor = {{ cookieconsent.backgroundTextColor| default ("#FFF" )| json_encode| raw }};

      var buttonColor = {{ cookieconsent.buttonColor| default ("#CAD401" )| json_encode| raw }};
      var buttonTextColor = {{ cookieconsent.buttonTextColor| default ("#000000" )| json_encode| raw }};


      var message = {{ cookieconsent.message| default ("This website uses cookies to ensure you get the best experience on our website. ") | json_encode | raw }};
      var dismissText = {{ cookieconsent.dismissText | default ("Got it")| json_encode | raw }};
      var linkText = {{ cookieconsent.linkText| default ("Learn More" ) | json_encode | raw }};
      var linkUrl = {{ cookieconsent.linkUrl| default ("https://cookiesandyou.com/" ) | json_encode | raw }};
      var theme   = {{ cookieconsent.theme| default ("classic" ) | json_encode | raw }};
      var position   = {{ cookieconsent.position| default ("bottom-right" ) | json_encode | raw }};



      window.addEventListener("load", function() {

          window.cookieconsent.initialise({
              "palette": {
                  "popup":  {
                      "background": backgroundColor,
                      "text": backgroundTextColor
                  },
                  "button": {
                      "background": buttonColor,
                      "text": buttonTextColor
                  }
              },
              "theme": theme,
              "position": position,
              "content": {
                  "message": message,
                  "dismiss": dismissText,
                  "link":    linkText,
                  "href":    linkUrl
              }
          })
      });

      {% endif %}

  </script>
  <link rel="stylesheet" type="text/css" href="{{ asset('components/cookieconsent/build/cookieconsent.min.css') }}"/>
  <script src="{{ asset('components/cookieconsent/build/cookieconsent.min.js') }}"></script>
{% endblock %}<commit_msg>Import cookie code from CoreBundleTwig<commit_after>{% extends "FOMUserBundle:Login:box.html.twig" %}
{% block css %}
  <link rel="stylesheet" href="{{ path('mapbender_core_application_assets', {'slug': 'mb3-login', 'type': 'css'}) }}"/>
  <link rel="stylesheet" type="text/css" href="{{ asset('components/cookieconsent/build/cookieconsent.min.css') }}"/>
{% endblock %}

{% block title %}{{ 'fom.user.login.login.title' | trans}}{% endblock %}

{% block box_content %}
  <div class="loginBox login">
    <h2 class="contentTitle">{{ 'fom.user.login.login.caption' | trans }}</h2>

    <form action="{{ path("fom_user_login_logincheck") }}" method="post" id="login" novalidate="novalidate">
      {% if error %}
        <div class="messageBox error">
          {% if error.message == "Bad credentials" %}
            {{ 'fom.user.login.errors.bad-credentials' | trans }}
          {% else %}
            {{ error.message | trans }}
          {% endif %}
        </div>
      {% endif %}

      <label class="left labelInput" for="username">{{ 'fom.user.login.login.username' | trans}}:</label>
      <input class="input" id="username" type="text" name="_username" value="{{ last_username }}" autofocus />

      <div class="clearContainer"></div>

      <label class="left labelInput" for="password">{{ 'fom.user.login.login.password' | trans}}:</label>
      <input class="input" type="password" id="password" name="_password" />

      <div class="clearContainer"></div>

      {% if selfregister == true %}
      <a class="linkButton iconLinkButton left" href="{{ path('fom_user_registration_form') }}">{{ 'fom.user.login.login.register' | trans}}</a>
      {% endif %}
      {% if reset_password == true %}
      <a class="linkButton iconLinkButton left" href="{{ path('fom_user_password_form') }}">{{ 'fom.user.login.login.forgot_password' | trans}}?</a>
      {% endif %}

      <input type="submit" class="right button" value="{{ 'fom.user.login.login.login' | trans}}" />
      <div class="clearContainer"></div>
    </form>
  </div>
  <script type="text/javascript">
    if(top != window) {
      top.location.href = location.href;
      top.location.reload();
    }
    var Mapbender = Mapbender || {};
    Mapbender.configuration = {elements:{}};
  </script>
    {% include 'MapbenderCoreBundle::cookieconsent.html.twig' %}
{% endblock %}
{'fraction_non_alphanumeric': 0.18045226893307026, 'fraction_numerical': 0.0031871300652602822, 'mean_word_length': 2.965102286401925, 'pattern_counts': {'":': 14, '<': 65, '<?xml version=': 0, '>': 65, 'https://': 1, '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': '6984094', 'n_tokens_mistral': 2057, 'n_tokens_neox': 1923, 'n_words': 398}