Skip to content

Commit

Permalink
Remove unused template using $tpl->display_one_col_template();
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Dec 19, 2017
1 parent f1f1e3b commit 467cc27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
12 changes: 4 additions & 8 deletions main/lp/lp_subscribe_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,12 @@ function ($i, SessionRelCourseRelUser $sessionCourseUser) use (&$subscribedUsers
// 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()) {
Expand Down Expand Up @@ -202,13 +198,13 @@ function ($i, SessionRelCourseRelUser $sessionCourseUser) use (&$subscribedUsers
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);
6 changes: 0 additions & 6 deletions main/template/default/learnpath/subscribe_users.tpl

This file was deleted.

0 comments on commit 467cc27

Please sign in to comment.