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. 2
      main/template/default/layout/blank.tpl

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

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

Loading…
Cancel
Save