src/CorporateTrainingBundle/Resources/views/password-reset/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layout.html.twig' %}
  2. {% block header %}
  3.   {% include 'site-hint.html.twig' %}
  4.   {{ block_show('jianmo:login_bg') }}
  5.   {#{% include '@CorporateTraining/ct-default/header.html.twig' %}#}
  6. {% endblock %}
  7. {% set bodyClass = "pwd_reset index_bg_item" %}
  8. {% block title %}{{ 'password_reset.title'|trans }} - {{ parent() }}{% endblock %}
  9. {% do script(['libs/jquery-validation.js','app/js/auth/password-reset/index.js']) %}
  10. {#{% block stylesheets %}
  11.     {{ parent() }}
  12.     <link rel="stylesheet" type="text/css" href="{{ asset('bundles/corporatetraining/css/main.css') }}">
  13. {% endblock %}#}
  14. {% block content %}
  15.   <div class="pwd-reset-container">
  16.     <div class="pwd-reset-section">
  17.       <div class="panel panel-default panel-page pwd-reset-main clearfix">
  18.         {% if (setting('cloud_email_crm.status')|default('disable')) != 'enable' and (setting('cloud_sms.sms_enabled')|default('')) != '1' and (setting('mailer.enabled', '')) != '1' %}
  19.           <h3 class="text-center mbxl">{{ 'password_reset.content'|trans }}</h3>
  20.           <div class="text-center mbm"><a class="btn btn-default" href="javascript:history.back();">{{ 'form.btn.return'|trans }}</a></div>
  21.         {% else %}
  22.           <h2 class="ft-xlg text-center mbxl">{{ 'password_reset.content.title'|trans }}</h2>
  23.         {% endif %}
  24.         <ul class="nav nav-tabs js-find-password">
  25.           {% if (setting('cloud_email_crm.status')|default('disable')) == 'enable' or (setting('mailer.enabled', '')) == '1'%}
  26.           <li class="active js-find-by-email nav-reset-tab">
  27.             <a style="cursor: pointer;">{{ 'password_reset.content.email'|trans }}
  28.             </a>
  29.           </li>
  30.           {% endif %}
  31.           {% if (setting('cloud_sms.sms_enabled')|default('')) == '1' %}
  32.             <li class="js-find-by-mobile nav-reset-tab">
  33.               <a style="cursor: pointer;">{{ 'password_reset.content.mobile'|trans }}
  34.               </a>
  35.             </li>
  36.           {% endif %}
  37.         </ul>
  38.         {% if (setting('cloud_email_crm.status')|default('disable')) == 'enable' or (setting('mailer.enabled', '')) == '1' %}
  39.         <form id="password-reset-form" class="form-vertical" method="post">
  40.           <div class="form-group input-icon-wrap">
  41.             {{ form_label(form.email, 'password_reset.content.email'|trans, {label_attr:{class:'control-label hidden'}}) }}
  42.             <i class="es-icon es-icon-mail"></i>
  43.             <div class="controls">
  44.               {{ form_widget(form.email, {attr:{class:'form-control input-md-style', placeholder:'password_reset.content.email.placeholder'|trans}}) }}
  45.               <p class="help-block">{{ ' '|trans({'%name%': setting('site.name')}) }}</p>
  46.             </div>
  47.           </div>
  48.           <div class="form-group">
  49.             <div class="controls password-btn-block-wrap">
  50.               {{ form_rest(form) }}
  51.               <button type="submit" class="btn btn-primary btn-block bor-no"
  52.                       data-loading-text="{{ 'password_reset.content.btn.reset_btn.loading'|trans }}...">{{ 'password_reset.content.btn.reset_btn'|trans }}</button>
  53.             </div>
  54.             {% if error %}
  55.               <div id="alertxx" class="alert alert-danger-position">{{ error }}</div> {% endif %}
  56.             <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  57.           </div>
  58.           <div class="pull-right mbm"><a class="link-gray" href="{{ path('login') }}">{{ 'form.btn.return'|trans }}</a></div>
  59.         </form>
  60.         {% endif %}
  61.         {% if (setting('cloud_sms.sms_enabled')|default('')) == '1' %}
  62.         <form id="password-reset-by-mobile-form" class="form-vertical"
  63.               action="{{ path('password_reset_by_sms') }}" method="post" {% if ((setting('cloud_email_crm.status')|default('disable')) == 'enable' or (setting('cloud_sms.sms_enabled')|default('')) == '1') and ((setting('mailer.enabled', '')) == '1' or (setting('cloud_email_crm.status')|default('disable')) == 'enable') %} style="display:none;" {% endif %}>
  64.           {# <div class="form-group">
  65.             <label class="control-label required" for="nickname">用户名</label>
  66.             <div class="controls">
  67.               <input type="text" id="nickname" name="nickname"  class="form-control" data-role="nickname">
  68.             </div>
  69.           </div> #}
  70.           <div class="form-group">
  71.             <label class="control-label required hidden" for="mobile">{{ 'password_reset.content.mobile'|trans }}</label>
  72.             <div class="controls input-icon-wrap">
  73.               <i class="es-icon es-icon-phone1 phone-icon"></i>
  74.               <input type="text" id="mobile" name="mobile"
  75.                      data-url="{{ path('password_reset_check_mobile') }}"
  76.                      class="form-control input-md-style" data-role="mobile"
  77.                      placeholder="{{ 'password_reset.content.mobile.placeholder'|trans }}">
  78.             </div>
  79.           </div>
  80.           <div class="form-group">
  81.             <label class="control-label required hidden" for="sms-code">{{ 'password_reset.content.sms_code'|trans }}</label>
  82.             <div class="controls input-icon-wrap">
  83.               <div class="sms-check-btn pull-right">
  84.                 <a href="#modal" data-toggle="modal" class="btn btn-default btn-sm js-sms-send disabled"
  85.                    data-url="{{ path('register_captcha_modal') }}"
  86.                    data-sms-url="{{ path('edu_cloud_sms_send') }}">
  87.                   <span id="js-time-left"></span>
  88.                   <span id="js-fetch-btn-text">{{ 'password_reset.content.get_sms_code'|trans }}</span>
  89.                 </a>
  90.               </div>
  91.               <div class="sms-check-input">
  92.                 <input type="text" class="form-control input-md-sms-style input-md-style" id="sms-code"
  93.                        name="sms_code" required="required"
  94.                        data-url="{{ path('edu_cloud_sms_check',{type:'sms_forget_password'}) }}"
  95.                        placeholder="{{ 'password_reset.content.sms_check'|trans }}">
  96.               </div>
  97.               <div class="help-block"></div>
  98.             </div>
  99.           </div>
  100.           <div class="form-group">
  101.             <div class="controls password-btn-block-wrap">
  102.               <button type="submit" class="btn btn-primary btn-lg btn-block bor-no"
  103.                       data-loading-text="{{ 'password_reset.submit_btn_loading'|trans }}">{{ 'password_reset.content.btn.reset_btn'|trans }}</button>
  104.             </div>
  105.             <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  106.           </div>
  107.           <div class="pull-right mbm"><a class="link-gray" href="javascript:history.back();">{{ 'form.btn.return'|trans }}</a></div>
  108.         </form>
  109.         {% endif %}
  110.       </div><!-- /panel -->
  111.     </div>
  112.   </div>
  113. {% endblock %}
  114. {% block footer %}
  115.   {% include '@CorporateTraining/ct-default/footer-index.html.twig' %}
  116. {% endblock %}