{#**
 * 2007-2019 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2019 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *#}

{% trans_default_domain 'Admin.International.Feature' %}

{% block modify_translations %}
  {{ form_start(modifyTranslationsForm, {method: 'get', action: path('_admin_international_translations_modify')}) }}

  <div class="card">
    <h3 class="card-header">
      <i class="material-icons">description</i> {{ 'Modify translations'|trans }}
    </h3>

    <div class="card-block row">
      <div class="card-text">
        <div class="row">
          <div class="col-sm">
            <div class="alert alert-info" role="alert">
              <div class="alert-text">
                {{ 'Here you can modify translations for every line of text inside PrestaShop.'|trans({}, 'Admin.International.Help') }}
                <br>
                {{ 'First, select a type of translation (such as "Back office" or "Installed modules"), and then select the language you want to translate strings in.'|trans({}, 'Admin.International.Help') }}
              </div>
            </div>
          </div>
        </div>

        <div class="form-group row">
          <label class="form-control-label">
            {{ 'Type of translation'|trans }}
          </label>
          <div class="col-sm">
            {{ form_errors(modifyTranslationsForm.translation_type) }}
            {{ form_widget(modifyTranslationsForm.translation_type, {'attr': {'class': 'js-translation-type'}}) }}
          </div>
        </div>
        <div class="form-group row js-email-form-group d-none">
          <label class="form-control-label">
            {{ 'Select the type of email content'|trans }}
          </label>
          <div class="col-sm">
            {{ form_errors(modifyTranslationsForm.email_content_type) }}
            {{ form_widget(modifyTranslationsForm.email_content_type, {'attr': {'class': 'js-email-content-type'}}) }}
          </div>
        </div>
        <div class="form-group row js-theme-form-group d-none">
          <label class="form-control-label">
            {{ 'Select your theme'|trans }}
          </label>
          <div class="col-sm">
            {{ form_errors(modifyTranslationsForm.theme) }}
            {{ form_widget(modifyTranslationsForm.theme) }}
          </div>
        </div>
        <div class="form-group row js-module-form-group d-none">
          <label class="form-control-label">
            {{ 'Select your module'|trans }}
          </label>
          <div class="col-sm">
            {{ form_errors(modifyTranslationsForm.module) }}
            {{ form_widget(modifyTranslationsForm.module, {'attr': {'data-minimumResultsForSearch': '7', 'data-toggle': 'select2'}}) }}
          </div>
        </div>
        <div class="form-group row">
          <label class="form-control-label">
            {{ 'Select your language'|trans }}
          </label>
          <div class="col-sm">
            {{ form_errors(modifyTranslationsForm.language) }}
            {{ form_widget(modifyTranslationsForm.language) }}
          </div>
        </div>
        {{ form_rest(modifyTranslationsForm) }}
      </div>
    </div>

    <div class="card-footer">
      <div class="d-flex justify-content-end">
        <button class="btn btn-primary">
          <i class="material-icons">edit</i>
          <span>{{ 'Modify'|trans({}, 'Admin.Actions') }}</span>
        </button>
      </div>
    </div>
  </div>

  {{ form_end(modifyTranslationsForm) }}
{% endblock %}
