Remove unused template using $tpl->display_one_col_template();

pull/2487/head
jmontoyaa 7 years ago
parent f1f1e3bb25
commit 467cc27b10
  1. 12
      main/lp/lp_subscribe_users.php
  2. 6
      main/template/default/learnpath/subscribe_users.tpl

@ -152,16 +152,12 @@ $groupMultiSelect = $form->addElement(
// submit button
$form->addButtonSave(get_lang('Save'));
Display::addFlash(Display::return_message(get_lang('UserLpSubscriptionDescription')));
$defaults = array();
if (!empty($selectedGroupChoices)) {
$defaults['groups'] = $selectedGroupChoices;
}
$form->setDefaults($defaults);
$tpl = new Template();
$currentUser = api_get_user_entity(api_get_user_id());
if ($form->validate()) {
@ -202,13 +198,13 @@ if ($form->validate()) {
header("Location: $url");
exit;
} else {
Display::addFlash(Display::return_message(get_lang('UserLpSubscriptionDescription')));
$headers = [
get_lang('SubscribeUsersToLp'),
get_lang('SubscribeGroupsToLp')
];
$tpl = new Template();
$tabs = Display::tabs($headers, [$formUsers->toHtml(), $form->toHtml()]);
$tpl->assign('tabs', $tabs);
$tpl->assign('content', $tabs);
$tpl->display_one_col_template();
}
$layout = $tpl->get_template('learnpath/subscribe_users.tpl');
$tpl->display($layout);

@ -1,6 +0,0 @@
{% extends template ~ "/layout/layout_1_col.tpl" %}
{% block content %}
{{ tabs }}
{% endblock %}
Loading…
Cancel
Save