Remove useless templates, replaced with common template.

By common I mean the use of $template->display_one_col_template();
pull/2487/head
jmontoyaa 7 years ago
parent 694138422a
commit cd0d11d17a
  1. 8
      main/auth/lostPassword.php
  2. 12
      main/auth/resend_confirmation_mail.php
  3. 6
      main/auth/reset.php
  4. 4
      main/template/default/auth/confirm_session_subscription.tpl
  5. 5
      main/template/default/auth/lost_password.tpl
  6. 1
      main/template/default/auth/resend_confirmation_mail.tpl
  7. 4
      main/template/default/auth/set_temp_password.tpl

@ -189,8 +189,6 @@ if (CustomPages::enabled() && CustomPages::exists(CustomPages::LOST_PASSWORD)) {
exit;
}
$controller = new IndexManager($tool_name);
$controller->set_login_form();
$controller->tpl->assign('form', $form->returnForm());
$template = $controller->tpl->get_template('auth/lost_password.tpl');
$controller->tpl->display($template);
$tpl = new Template(null);
$tpl->assign('content', $form->toHtml());
$tpl->display_one_col_template();

@ -11,19 +11,13 @@ $form->addButtonSend(get_lang('Send'));
if ($form->validate()) {
$values = $form->exportValues();
$user = UserManager::getManager()->findUserByUsername($values['user']);
/** @var \Chamilo\UserBundle\Entity\User $thisUser */
$thisUser = Database::getManager()->getRepository('ChamiloUserBundle:User')->findBy(['username' => $values['user']]);
UserManager::sendUserConfirmationMail($thisUser);
Display::addFlash(Display::return_message(get_lang('EmailSent')));
UserManager::sendUserConfirmationMail($user);
header('Location: '.api_get_path(WEB_PATH));
exit;
}
$tpl = new Template(null);
$tpl->assign('form', $form->toHtml());
$content = $tpl->get_template('auth/resend_confirmation_mail.tpl');
$tpl->assign('content', $tpl->fetch($content));
$tpl->assign('content', $form->toHtml());
$tpl->display_one_col_template();

@ -32,7 +32,6 @@ if (empty($ttl)) {
}
if ($form->validate()) {
$em = Database::getManager();
$values = $form->exportValues();
$password = $values['pass1'];
$token = $values['token'];
@ -67,8 +66,5 @@ if ($form->validate()) {
}
$tpl = new Template(null);
$tpl->assign('form', $form->toHtml());
$content = $tpl->get_template('auth/set_temp_password.tpl');
$tpl->assign('content', $tpl->fetch($content));
$tpl->assign('content', $form->toHtml());
$tpl->display_one_col_template();

@ -1,6 +1,8 @@
<div class="row">
<div class="col-sm-3 col-sm-offset-3">
<a href="{{ _p.web_main }}auth/courses.php?{{ {'action':'subscribe_to_session', 'session_id':session_id, 'confirm':'1'}|url_encode() }}" class="btn btn-success btn-block">{{ 'Yes'|get_lang }}</a>
<a href="{{ _p.web_main }}auth/courses.php?{{ {'action':'subscribe_to_session', 'session_id':session_id, 'confirm':'1'}|url_encode() }}" class="btn btn-success btn-block">
{{ 'Yes'|get_lang }}
</a>
</div>
<div class="col-sm-3">
<button type="button" class="btn btn-danger btn-block" data-dismiss="modal">{{ 'No'|get_lang }}</button>

@ -1,5 +0,0 @@
{% extends template ~ "/layout/layout_1_col.tpl" %}
{% block content %}
{{ form }}
{% endblock %}

@ -1,4 +0,0 @@
{% if error_message %}
{{ error_message }}
{% endif %}
{{form}}
Loading…
Cancel
Save