Fix inscription page.

1.10.x
Julio Montoya 10 years ago
parent a893afb1db
commit 7cebf9ed19
  1. 14
      main/auth/inscription.php
  2. 6
      main/template/default/auth/inscription.tpl
  3. 4
      main/template/default/layout/blank.tpl

@ -743,13 +743,16 @@ if ($form->validate()) {
$tpl->assign('inscription_content', $content); $tpl->assign('inscription_content', $content);
$tpl->assign('text_after_registration', $text_after_registration); $tpl->assign('text_after_registration', $text_after_registration);
$tpl->assign('hide_header', $hideHeaders);
$inscription = $tpl->get_template('auth/inscription.tpl'); $inscription = $tpl->get_template('auth/inscription.tpl');
$tpl->display($inscription); $tpl->display($inscription);
} }
} else { } else {
// Custom pages // Custom pages
if (CustomPages::enabled()) { if (CustomPages::enabled()) {
CustomPages::display(CustomPages::REGISTRATION, array('form' => $form)); CustomPages::display(
CustomPages::REGISTRATION, array('form' => $form)
);
} else { } else {
if (!api_is_anonymous()) { if (!api_is_anonymous()) {
@ -775,17 +778,12 @@ if ($form->validate()) {
CourseManager::redirectToCourse([]); CourseManager::redirectToCourse([]);
} }
if ($hideHeaders) { $tpl = new Template($tool_name);
$showHeader = false;
} else {
$showHeader = true;
}
$tpl = new Template($tool_name, $showHeader, $showHeader);
$tpl->assign('inscription_header', Display::page_header($tool_name)); $tpl->assign('inscription_header', Display::page_header($tool_name));
$tpl->assign('inscription_content', $content); $tpl->assign('inscription_content', $content);
$tpl->assign('form', $form->returnForm()); $tpl->assign('form', $form->returnForm());
$tpl->assign('hide_header', $hideHeaders);
$inscription = $tpl->get_template('auth/inscription.tpl'); $inscription = $tpl->get_template('auth/inscription.tpl');
$tpl->display($inscription); $tpl->display($inscription);

@ -1,4 +1,8 @@
{% extends template ~ "/layout/layout_1_col.tpl" %} {%
extends hide_header == true
? template ~ "/layout/blank.tpl"
: template ~ "/layout/layout_1_col.tpl"
%}
{% block content %} {% block content %}

@ -1 +1,3 @@
{{ content }} {% block content %}
{{ content }}
{% endblock %}

Loading…
Cancel
Save