|
48 | 48 |
|
49 | 49 | $url = api_get_self().'?'.api_get_cidreq().'&action=add_users_to_category&id='.$categoryId; |
50 | 50 |
|
51 | | -Display::addFlash(Display::return_message(get_lang('UserLpCategorySubscriptionDescription'))); |
| 51 | +$message = Display::return_message(get_lang('UserLpCategorySubscriptionDescription')); |
52 | 52 |
|
53 | 53 | // Building the form for Groups |
54 | 54 | $form = new FormValidator('lp_edit', 'post', $url); |
55 | 55 | $form->addElement('hidden', 'group_form', 1); |
| 56 | +$form->addLabel('', $message); |
56 | 57 |
|
57 | 58 | // Group list |
58 | 59 | $groupList = \CourseManager::get_group_list_of_course( |
|
119 | 120 |
|
120 | 121 | // Getting subscribed users to a category. |
121 | 122 | $subscribedUsersInCategory = $category->getUsers(); |
122 | | - |
123 | 123 | $selectedChoices = []; |
124 | 124 | foreach ($subscribedUsersInCategory as $item) { |
125 | 125 | $selectedChoices[] = $item->getUser()->getId(); |
|
128 | 128 | // Building the form for Users |
129 | 129 | $formUsers = new FormValidator('lp_edit', 'post', $url); |
130 | 130 | $formUsers->addElement('hidden', 'user_form', 1); |
| 131 | +$formUsers->addLabel('', $message); |
131 | 132 |
|
132 | 133 | $userMultiSelect = $formUsers->addElement( |
133 | 134 | 'advmultiselect', |
|
138 | 139 | $formUsers->addButtonSave(get_lang('Save')); |
139 | 140 |
|
140 | 141 | $defaults = []; |
141 | | - |
142 | 142 | if (!empty($selectedChoices)) { |
143 | 143 | $defaults['users'] = $selectedChoices; |
144 | 144 | } |
|
205 | 205 | get_lang('SubscribeGroupsToLpCategory') |
206 | 206 | ]; |
207 | 207 | $tabs = Display::tabs($headers, [$formUsers->toHtml(), $form->toHtml()]); |
208 | | - $tpl->assign('tabs', $tabs); |
| 208 | + $tpl->assign('content', $tabs); |
| 209 | + $tpl->display_one_col_template(); |
209 | 210 | } |
210 | | - |
211 | | -$layout = $tpl->get_template('learnpath/subscribe_users.tpl'); |
212 | | -$tpl->display($layout); |
0 commit comments