{% include 'header.twig' %}
<main class="app-main">
  <div class="page-content">
    <div class="container-fluid">

      <div class="hp-bbox mt-5 mb-5">
        <div class="row">
          <div class="col-lg-6">
            <div class="hpbb-body">
              <h2 class="hp-title">
              {{ lang['smmspot.verify.title'] }}
              </h2>
              <p class="hpbb-text">
                {{ lang['smmspot.verify.text'] }} 
                							
              </p>
            </div>
          </div>
        </div>
      </div>

      <div class="card">
        <div class="card-afip-body">
          <div class="row align-items-center">

          {% if successText %}
          <div class="alert alert-dismissible alert-success ">
            <button type="button" class="close" data-dismiss="alert">
              ×
            </button>
            {{ successText }}
          </div>
        {% endif %}
        {% if errorText %}
          <div class="alert alert-dismissible alert-danger ">
            <button type="button" class="close" data-dismiss="alert">
              ×
            </button>
            {{ errorText }}
          </div>
        {% endif %}

        {% if verify %}
									 
									 <form method="post" action="/verify/mail">

									  <div class="form-group">
										<label for="username" class="control-label">{{ lang['verify.email'] }}</label>
										<input type="text" class="form-control"  placeholder="{{ user['email'] }}" disabled>
									  </div>

										<div class="form-group">
										  <div class="g-recaptcha" data-sitekey="{{ captchaKey }}"></div>
										</div>

										<button type="submit" class="btn btn-primary click">{{ lang['verify.submit'] }}</button>
										<span class="pull-right pull-right-middle"><a href="#" data-toggle="modal" data-target="#editAccount">{{ lang['verify.edit'] }}</a></span>
									</form>
									  <div id="editAccount" class="modal fade" role="dialog">
										<div class="modal-dialog">
										  <div class="modal-content">
											<div class="modal-header">
											  
											  <h4 class="modal-title">{{ lang['verify.edit.title'] }}</h4>       <button type="button" class="close" data-dismiss="modal">×</button>
											</div>
											<div class="modal-body">
											  <form method="post" action="/verify/edit">
												<div class="form-group">
												  <label for="username" class="control-label">{{ lang['verify.email'] }}</label>
												  <input type="text" name="email" class="form-control"  value="{{ user['email'] }}">
												</div>
											</div>
											<div class="modal-footer">
											  <button type="submit" class="btn btn-primary">{{ lang['verify.edit.submit'] }}</button></form>
											 
											</div>
										  </div>
										</div>
									  </div>       
									{% else %}
									 

										<div class="form-group">
										  <div class="g-recaptcha" data-sitekey="{{ captchaKey }}"></div>
										</div>

										<button type="submit" class="btn btn-primary click">{{ lang['verify.submit'] }}</button>
										<span class="pull-right pull-right-middle"><a href="#" data-toggle="modal" data-target="#editAccount">{{ lang['verify.edit'] }}</a></span>
									</form>
									
								  <div id="editAccount" class="modal fade" role="dialog">
									<div class="modal-dialog">
									  <div class="modal-content">
										<div class="modal-header">
										  
										  <h4 class="modal-title">{{ lang['verify.edit.title'] }}</h4><button type="button" class="close" data-dismiss="modal">×</button>
										</div>
										<div class="modal-body">
										  <form method="post" action="/verify/edit">
											<div class="form-group">
											  <label for="username" class="control-label">{{ lang['verify.telephone'] }}</label>
											  <input type="text" name="telephone" class="form-control"  value="{{ user['telephone'] }}">
											</div>
										</div>
										<div class="modal-footer">
										  <button type="submit" class="btn btn-primary">{{ lang['verify.edit.submit'] }}</button></form>
										</div>
									  </div>
									</div>
								  </div>     
								  
								{% endif %}

            </div>
          <!-- row -->
          </div>
        <!-- ./card-afip-body -->
        </div>

      </div>
    </div>
  </main>


        {% for lang in site['languages'] %}
          {% if lang['active'] %}
            <script src="https://www.google.com/recaptcha/api.js?hl={{ lang['code'] }}"></script>
          {% endif %}
        {% endfor %}

        {% include 'footer.twig' %}
        