1 | <?php |
---|
2 | /** |
---|
3 | * @package Dotclear |
---|
4 | * @subpackage Backend |
---|
5 | * |
---|
6 | * @copyright Olivier Meunier & Association Dotclear |
---|
7 | * @copyright GPL-2.0-only |
---|
8 | */ |
---|
9 | |
---|
10 | require dirname(__FILE__) . '/../inc/admin/prepend.php'; |
---|
11 | |
---|
12 | dcPage::check('usage,contentadmin'); |
---|
13 | |
---|
14 | $page_title = __('My preferences'); |
---|
15 | |
---|
16 | $user_name = $core->auth->getInfo('user_name'); |
---|
17 | $user_firstname = $core->auth->getInfo('user_firstname'); |
---|
18 | $user_displayname = $core->auth->getInfo('user_displayname'); |
---|
19 | $user_email = $core->auth->getInfo('user_email'); |
---|
20 | $user_url = $core->auth->getInfo('user_url'); |
---|
21 | $user_lang = $core->auth->getInfo('user_lang'); |
---|
22 | $user_tz = $core->auth->getInfo('user_tz'); |
---|
23 | $user_post_status = $core->auth->getInfo('user_post_status'); |
---|
24 | |
---|
25 | $user_options = $core->auth->getOptions(); |
---|
26 | if (empty($user_options['editor']) || !is_array($user_options['editor'])) { |
---|
27 | $user_options['editor'] = []; |
---|
28 | } |
---|
29 | |
---|
30 | $core->auth->user_prefs->addWorkspace('dashboard'); |
---|
31 | $user_dm_doclinks = $core->auth->user_prefs->dashboard->doclinks; |
---|
32 | $user_dm_dcnews = $core->auth->user_prefs->dashboard->dcnews; |
---|
33 | $user_dm_quickentry = $core->auth->user_prefs->dashboard->quickentry; |
---|
34 | $user_dm_nofavicons = $core->auth->user_prefs->dashboard->nofavicons; |
---|
35 | if ($core->auth->isSuperAdmin()) { |
---|
36 | $user_dm_nodcupdate = $core->auth->user_prefs->dashboard->nodcupdate; |
---|
37 | } |
---|
38 | |
---|
39 | $core->auth->user_prefs->addWorkspace('accessibility'); |
---|
40 | $user_acc_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; |
---|
41 | |
---|
42 | $core->auth->user_prefs->addWorkspace('interface'); |
---|
43 | $user_ui_darkmode = $core->auth->user_prefs->interface->darkmode; |
---|
44 | $user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader; |
---|
45 | $user_ui_hidemoreinfo = $core->auth->user_prefs->interface->hidemoreinfo; |
---|
46 | $user_ui_hidehelpbutton = $core->auth->user_prefs->interface->hidehelpbutton; |
---|
47 | $user_ui_showajaxloader = $core->auth->user_prefs->interface->showajaxloader; |
---|
48 | $user_ui_htmlfontsize = $core->auth->user_prefs->interface->htmlfontsize; |
---|
49 | $user_ui_dynfontsize = $core->auth->user_prefs->interface->dynfontsize; |
---|
50 | if ($core->auth->isSuperAdmin()) { |
---|
51 | $user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon; |
---|
52 | } |
---|
53 | $user_ui_iconset = @$core->auth->user_prefs->interface->iconset; |
---|
54 | $user_ui_nofavmenu = $core->auth->user_prefs->interface->nofavmenu; |
---|
55 | $user_ui_media_by_page = ($core->auth->user_prefs->interface->media_by_page ?: 30); |
---|
56 | $user_ui_media_nb_last_dirs = $core->auth->user_prefs->interface->media_nb_last_dirs; |
---|
57 | |
---|
58 | $default_tab = !empty($_GET['tab']) ? html::escapeHTML($_GET['tab']) : 'user-profile'; |
---|
59 | |
---|
60 | if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || |
---|
61 | !empty($_GET['replaced']) || !empty($_POST['appendaction']) || !empty($_POST['removeaction']) || |
---|
62 | !empty($_GET['db-updated']) || !empty($_POST['resetorder'])) { |
---|
63 | $default_tab = 'user-favorites'; |
---|
64 | } elseif (!empty($_GET['updated'])) { |
---|
65 | $default_tab = 'user-options'; |
---|
66 | } |
---|
67 | if (($default_tab != 'user-profile') && ($default_tab != 'user-options') && ($default_tab != 'user-favorites')) { |
---|
68 | $default_tab = 'user-profile'; |
---|
69 | } |
---|
70 | |
---|
71 | # Editors combo |
---|
72 | $editors_combo = dcAdminCombos::getEditorsCombo(); |
---|
73 | $editors = array_keys($editors_combo); |
---|
74 | |
---|
75 | # Format by editors |
---|
76 | $formaters = $core->getFormaters(); |
---|
77 | $format_by_editors = []; |
---|
78 | foreach ($formaters as $editor => $formats) { |
---|
79 | foreach ($formats as $format) { |
---|
80 | $format_by_editors[$format][$editor] = $editor; |
---|
81 | } |
---|
82 | } |
---|
83 | $available_formats = ['' => '']; |
---|
84 | foreach (array_keys($format_by_editors) as $format) { |
---|
85 | $available_formats[$format] = $format; |
---|
86 | if (!isset($user_options['editor'][$format])) { |
---|
87 | $user_options['editor'][$format] = ''; |
---|
88 | } |
---|
89 | } |
---|
90 | $status_combo = dcAdminCombos::getPostStatusescombo(); |
---|
91 | |
---|
92 | $iconsets_combo = [__('Default') => '']; |
---|
93 | $iconsets_root = dirname(__FILE__) . '/images/iconset/'; |
---|
94 | if (is_dir($iconsets_root) && is_readable($iconsets_root)) { |
---|
95 | if (($d = @dir($iconsets_root)) !== false) { |
---|
96 | while (($entry = $d->read()) !== false) { |
---|
97 | if ($entry != '.' && $entry != '..' && substr($entry, 0, 1) != '.' && is_dir($iconsets_root . '/' . $entry)) { |
---|
98 | $iconsets_combo[$entry] = $entry; |
---|
99 | } |
---|
100 | } |
---|
101 | } |
---|
102 | } |
---|
103 | |
---|
104 | # Body base font size (37.5% = 6px, 50% = 8px, 62.5% = 10px, 75% = 12px, 87.5% = 14px) |
---|
105 | $htmlfontsize_combo = [ |
---|
106 | __('Smallest') => '37.5%', |
---|
107 | __('Smaller') => '50%', |
---|
108 | __('Default') => '62.5%', |
---|
109 | __('Larger') => '75%', |
---|
110 | __('Largest') => '87,5%' |
---|
111 | ]; |
---|
112 | # Ensure Font size is set to default is empty |
---|
113 | if ($user_ui_htmlfontsize == '') { |
---|
114 | $user_ui_htmlfontsize = '62.5%'; |
---|
115 | } |
---|
116 | |
---|
117 | # Language codes |
---|
118 | $lang_combo = dcAdminCombos::getAdminLangsCombo(); |
---|
119 | |
---|
120 | # Get 3rd parts xhtml editor flags |
---|
121 | $rte = [ |
---|
122 | 'blog_descr' => [true, __('Blog description (in blog parameters)')], |
---|
123 | 'cat_descr' => [true, __('Category description')] |
---|
124 | ]; |
---|
125 | $rte = new ArrayObject($rte); |
---|
126 | $core->callBehavior('adminRteFlags', $core, $rte); |
---|
127 | # Load user settings |
---|
128 | $rte_flags = @$core->auth->user_prefs->interface->rte_flags; |
---|
129 | if (is_array($rte_flags)) { |
---|
130 | foreach ($rte_flags as $fk => $fv) { |
---|
131 | if (isset($rte[$fk])) { |
---|
132 | $rte[$fk][0] = $fv; |
---|
133 | } |
---|
134 | } |
---|
135 | } |
---|
136 | |
---|
137 | # Get default colums (admin lists) |
---|
138 | $cols = [ |
---|
139 | 'posts' => [__('Posts'), [ |
---|
140 | 'date' => [true, __('Date')], |
---|
141 | 'category' => [true, __('Category')], |
---|
142 | 'author' => [true, __('Author')], |
---|
143 | 'comments' => [true, __('Comments')], |
---|
144 | 'trackbacks' => [true, __('Trackbacks')] |
---|
145 | ]] |
---|
146 | ]; |
---|
147 | $cols = new arrayObject($cols); |
---|
148 | $core->callBehavior('adminColumnsLists', $core, $cols); |
---|
149 | # Load user settings |
---|
150 | $cols_user = @$core->auth->user_prefs->interface->cols; |
---|
151 | if (is_array($cols_user)) { |
---|
152 | foreach ($cols_user as $ct => $cv) { |
---|
153 | foreach ($cv as $cn => $cd) { |
---|
154 | if (isset($cols[$ct][1][$cn])) { |
---|
155 | $cols[$ct][1][$cn][0] = $cd; |
---|
156 | } |
---|
157 | } |
---|
158 | } |
---|
159 | } |
---|
160 | |
---|
161 | # Add or update user |
---|
162 | if (isset($_POST['user_name'])) { |
---|
163 | try |
---|
164 | { |
---|
165 | $pwd_check = !empty($_POST['cur_pwd']) && $core->auth->checkPassword($_POST['cur_pwd']); |
---|
166 | |
---|
167 | if ($core->auth->allowPassChange() && !$pwd_check && $user_email != $_POST['user_email']) { |
---|
168 | throw new Exception(__('If you want to change your email or password you must provide your current password.')); |
---|
169 | } |
---|
170 | |
---|
171 | $cur = $core->con->openCursor($core->prefix . 'user'); |
---|
172 | |
---|
173 | $cur->user_name = $user_name = $_POST['user_name']; |
---|
174 | $cur->user_firstname = $user_firstname = $_POST['user_firstname']; |
---|
175 | $cur->user_displayname = $user_displayname = $_POST['user_displayname']; |
---|
176 | $cur->user_email = $user_email = $_POST['user_email']; |
---|
177 | $cur->user_url = $user_url = $_POST['user_url']; |
---|
178 | $cur->user_lang = $user_lang = $_POST['user_lang']; |
---|
179 | $cur->user_tz = $user_tz = $_POST['user_tz']; |
---|
180 | |
---|
181 | $cur->user_options = new ArrayObject($user_options); |
---|
182 | |
---|
183 | if ($core->auth->allowPassChange() && !empty($_POST['new_pwd'])) { |
---|
184 | if (!$pwd_check) { |
---|
185 | throw new Exception(__('If you want to change your email or password you must provide your current password.')); |
---|
186 | } |
---|
187 | |
---|
188 | if ($_POST['new_pwd'] != $_POST['new_pwd_c']) { |
---|
189 | throw new Exception(__("Passwords don't match")); |
---|
190 | } |
---|
191 | |
---|
192 | $cur->user_pwd = $_POST['new_pwd']; |
---|
193 | } |
---|
194 | |
---|
195 | # --BEHAVIOR-- adminBeforeUserUpdate |
---|
196 | $core->callBehavior('adminBeforeUserProfileUpdate', $cur, $core->auth->userID()); |
---|
197 | |
---|
198 | # Udate user |
---|
199 | $core->updUser($core->auth->userID(), $cur); |
---|
200 | |
---|
201 | # --BEHAVIOR-- adminAfterUserUpdate |
---|
202 | $core->callBehavior('adminAfterUserProfileUpdate', $cur, $core->auth->userID()); |
---|
203 | |
---|
204 | dcPage::addSuccessNotice(__('Personal information has been successfully updated.')); |
---|
205 | |
---|
206 | $core->adminurl->redirect("admin.user.preferences"); |
---|
207 | } catch (Exception $e) { |
---|
208 | $core->error->add($e->getMessage()); |
---|
209 | } |
---|
210 | } |
---|
211 | |
---|
212 | # Update user options |
---|
213 | if (isset($_POST['user_editor'])) { |
---|
214 | try |
---|
215 | { |
---|
216 | $cur = $core->con->openCursor($core->prefix . 'user'); |
---|
217 | |
---|
218 | $cur->user_name = $user_name; |
---|
219 | $cur->user_firstname = $user_firstname; |
---|
220 | $cur->user_displayname = $user_displayname; |
---|
221 | $cur->user_email = $user_email; |
---|
222 | $cur->user_url = $user_url; |
---|
223 | $cur->user_lang = $user_lang; |
---|
224 | $cur->user_tz = $user_tz; |
---|
225 | |
---|
226 | $cur->user_post_status = $user_post_status = $_POST['user_post_status']; |
---|
227 | |
---|
228 | $user_options['edit_size'] = (integer) $_POST['user_edit_size']; |
---|
229 | if ($user_options['edit_size'] < 1) { |
---|
230 | $user_options['edit_size'] = 10; |
---|
231 | } |
---|
232 | $user_options['post_format'] = $_POST['user_post_format']; |
---|
233 | $user_options['editor'] = $_POST['user_editor']; |
---|
234 | $user_options['enable_wysiwyg'] = !empty($_POST['user_wysiwyg']); |
---|
235 | $user_options['toolbar_bottom'] = !empty($_POST['user_toolbar_bottom']); |
---|
236 | |
---|
237 | $cur->user_options = new ArrayObject($user_options); |
---|
238 | |
---|
239 | # --BEHAVIOR-- adminBeforeUserOptionsUpdate |
---|
240 | $core->callBehavior('adminBeforeUserOptionsUpdate', $cur, $core->auth->userID()); |
---|
241 | |
---|
242 | # Update user prefs |
---|
243 | $core->auth->user_prefs->accessibility->put('nodragdrop', !empty($_POST['user_acc_nodragdrop']), 'boolean'); |
---|
244 | $core->auth->user_prefs->interface->put('darkmode', !empty($_POST['user_ui_darkmode']), 'boolean'); |
---|
245 | $core->auth->user_prefs->interface->put('enhanceduploader', !empty($_POST['user_ui_enhanceduploader']), 'boolean'); |
---|
246 | $core->auth->user_prefs->interface->put('hidemoreinfo', !empty($_POST['user_ui_hidemoreinfo']), 'boolean'); |
---|
247 | $core->auth->user_prefs->interface->put('hidehelpbutton', !empty($_POST['user_ui_hidehelpbutton']), 'boolean'); |
---|
248 | $core->auth->user_prefs->interface->put('showajaxloader', !empty($_POST['user_ui_showajaxloader']), 'boolean'); |
---|
249 | $core->auth->user_prefs->interface->put('htmlfontsize', $_POST['user_ui_htmlfontsize'], 'string'); |
---|
250 | $core->auth->user_prefs->interface->put('dynfontsize', !empty($_POST['user_ui_dynfontsize']), 'boolean'); |
---|
251 | if ($core->auth->isSuperAdmin()) { |
---|
252 | # Applied to all users |
---|
253 | $core->auth->user_prefs->interface->put('hide_std_favicon', !empty($_POST['user_ui_hide_std_favicon']), 'boolean', null, true, true); |
---|
254 | } |
---|
255 | $core->auth->user_prefs->interface->put('media_by_page', (integer) $_POST['user_ui_media_by_page'], 'integer'); |
---|
256 | $core->auth->user_prefs->interface->put('media_nb_last_dirs', (integer) $_POST['user_ui_media_nb_last_dirs'], 'integer'); |
---|
257 | $core->auth->user_prefs->interface->put('media_last_dirs', [], 'array', null, false); |
---|
258 | $core->auth->user_prefs->interface->put('media_fav_dirs', [], 'array', null, false); |
---|
259 | |
---|
260 | # Update user columns (lists) |
---|
261 | $cu = []; |
---|
262 | foreach ($cols as $col_type => $cols_list) { |
---|
263 | $ct = []; |
---|
264 | foreach ($cols_list[1] as $col_name => $col_data) { |
---|
265 | $ct[$col_name] = isset($_POST['cols_' . $col_type]) && in_array($col_name, $_POST['cols_' . $col_type], true) ? true : false; |
---|
266 | } |
---|
267 | if (count($ct)) { |
---|
268 | $cu[$col_type] = $ct; |
---|
269 | } |
---|
270 | } |
---|
271 | $core->auth->user_prefs->interface->put('cols', $cu, 'array'); |
---|
272 | |
---|
273 | # Update user xhtml editor flags |
---|
274 | $rf = []; |
---|
275 | foreach ($rte as $rk => $rv) { |
---|
276 | $rf[$rk] = isset($_POST['rte_flags']) && in_array($rk, $_POST['rte_flags'], true) ? true : false; |
---|
277 | } |
---|
278 | $core->auth->user_prefs->interface->put('rte_flags', $rf, 'array'); |
---|
279 | |
---|
280 | # Update user |
---|
281 | $core->updUser($core->auth->userID(), $cur); |
---|
282 | |
---|
283 | # --BEHAVIOR-- adminAfterUserOptionsUpdate |
---|
284 | $core->callBehavior('adminAfterUserOptionsUpdate', $cur, $core->auth->userID()); |
---|
285 | |
---|
286 | dcPage::addSuccessNotice(__('Personal options has been successfully updated.')); |
---|
287 | $core->adminurl->redirect("admin.user.preferences", [], '#user-options'); |
---|
288 | } catch (Exception $e) { |
---|
289 | $core->error->add($e->getMessage()); |
---|
290 | } |
---|
291 | } |
---|
292 | |
---|
293 | # Dashboard options |
---|
294 | if (isset($_POST['db-options'])) { |
---|
295 | try |
---|
296 | { |
---|
297 | # --BEHAVIOR-- adminBeforeUserOptionsUpdate |
---|
298 | $core->callBehavior('adminBeforeDashboardOptionsUpdate', $core->auth->userID()); |
---|
299 | |
---|
300 | # Update user prefs |
---|
301 | $core->auth->user_prefs->dashboard->put('doclinks', !empty($_POST['user_dm_doclinks']), 'boolean'); |
---|
302 | $core->auth->user_prefs->dashboard->put('dcnews', !empty($_POST['user_dm_dcnews']), 'boolean'); |
---|
303 | $core->auth->user_prefs->dashboard->put('quickentry', !empty($_POST['user_dm_quickentry']), 'boolean'); |
---|
304 | $core->auth->user_prefs->dashboard->put('nofavicons', empty($_POST['user_dm_nofavicons']), 'boolean'); |
---|
305 | if ($core->auth->isSuperAdmin()) { |
---|
306 | $core->auth->user_prefs->dashboard->put('nodcupdate', !empty($_POST['user_dm_nodcupdate']), 'boolean'); |
---|
307 | } |
---|
308 | $core->auth->user_prefs->interface->put('iconset', (!empty($_POST['user_ui_iconset']) ? $_POST['user_ui_iconset'] : '')); |
---|
309 | $core->auth->user_prefs->interface->put('nofavmenu', empty($_POST['user_ui_nofavmenu']), 'boolean'); |
---|
310 | |
---|
311 | # --BEHAVIOR-- adminAfterUserOptionsUpdate |
---|
312 | $core->callBehavior('adminAfterDashboardOptionsUpdate', $core->auth->userID()); |
---|
313 | |
---|
314 | dcPage::addSuccessNotice(__('Dashboard options has been successfully updated.')); |
---|
315 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
316 | } catch (Exception $e) { |
---|
317 | $core->error->add($e->getMessage()); |
---|
318 | } |
---|
319 | } |
---|
320 | |
---|
321 | # Add selected favorites |
---|
322 | if (!empty($_POST['appendaction'])) { |
---|
323 | try { |
---|
324 | if (empty($_POST['append'])) { |
---|
325 | throw new Exception(__('No favorite selected')); |
---|
326 | } |
---|
327 | $user_favs = $core->favs->getFavoriteIDs(false); |
---|
328 | foreach ($_POST['append'] as $k => $v) { |
---|
329 | if ($core->favs->exists($v)) { |
---|
330 | $user_favs[] = $v; |
---|
331 | } |
---|
332 | } |
---|
333 | $core->favs->setFavoriteIDs($user_favs, false); |
---|
334 | |
---|
335 | if (!$core->error->flag()) { |
---|
336 | dcPage::addSuccessNotice(__('Favorites have been successfully added.')); |
---|
337 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
338 | } |
---|
339 | } catch (Exception $e) { |
---|
340 | $core->error->add($e->getMessage()); |
---|
341 | } |
---|
342 | } |
---|
343 | |
---|
344 | # Delete selected favorites |
---|
345 | if (!empty($_POST['removeaction'])) { |
---|
346 | try { |
---|
347 | if (empty($_POST['remove'])) { |
---|
348 | throw new Exception(__('No favorite selected')); |
---|
349 | } |
---|
350 | $user_fav_ids = []; |
---|
351 | foreach ($core->favs->getFavoriteIDs(false) as $v) { |
---|
352 | $user_fav_ids[$v] = true; |
---|
353 | } |
---|
354 | foreach ($_POST['remove'] as $v) { |
---|
355 | if (isset($user_fav_ids[$v])) { |
---|
356 | unset($user_fav_ids[$v]); |
---|
357 | } |
---|
358 | } |
---|
359 | $core->favs->setFavoriteIDs(array_keys($user_fav_ids), false); |
---|
360 | if (!$core->error->flag()) { |
---|
361 | dcPage::addSuccessNotice(__('Favorites have been successfully removed.')); |
---|
362 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
363 | } |
---|
364 | } catch (Exception $e) { |
---|
365 | $core->error->add($e->getMessage()); |
---|
366 | } |
---|
367 | } |
---|
368 | |
---|
369 | # Order favs |
---|
370 | $order = []; |
---|
371 | if (empty($_POST['favs_order']) && !empty($_POST['order'])) { |
---|
372 | $order = $_POST['order']; |
---|
373 | asort($order); |
---|
374 | $order = array_keys($order); |
---|
375 | } elseif (!empty($_POST['favs_order'])) { |
---|
376 | $order = explode(',', $_POST['favs_order']); |
---|
377 | } |
---|
378 | |
---|
379 | if (!empty($_POST['saveorder']) && !empty($order)) { |
---|
380 | foreach ($order as $k => $v) { |
---|
381 | if (!$core->favs->exists($v)) { |
---|
382 | unset($order[$k]); |
---|
383 | } |
---|
384 | } |
---|
385 | $core->favs->setFavoriteIDs($order, false); |
---|
386 | if (!$core->error->flag()) { |
---|
387 | dcPage::addSuccessNotice(__('Favorites have been successfully updated.')); |
---|
388 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
389 | } |
---|
390 | } |
---|
391 | |
---|
392 | # Replace default favorites by current set (super admin only) |
---|
393 | if (!empty($_POST['replace']) && $core->auth->isSuperAdmin()) { |
---|
394 | $user_favs = $core->favs->getFavoriteIDs(false); |
---|
395 | $core->favs->setFavoriteIDs($user_favs, true); |
---|
396 | |
---|
397 | if (!$core->error->flag()) { |
---|
398 | dcPage::addSuccessNotice(__('Default favorites have been successfully updated.')); |
---|
399 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
400 | } |
---|
401 | } |
---|
402 | |
---|
403 | # Reset dashboard items order |
---|
404 | if (!empty($_POST['resetorder'])) { |
---|
405 | $core->auth->user_prefs->dashboard->drop('main_order'); |
---|
406 | $core->auth->user_prefs->dashboard->drop('boxes_order'); |
---|
407 | $core->auth->user_prefs->dashboard->drop('boxes_items_order'); |
---|
408 | $core->auth->user_prefs->dashboard->drop('boxes_contents_order'); |
---|
409 | |
---|
410 | if (!$core->error->flag()) { |
---|
411 | dcPage::addSuccessNotice(__('Dashboard items order have been successfully reset.')); |
---|
412 | $core->adminurl->redirect("admin.user.preferences", [], '#user-favorites'); |
---|
413 | } |
---|
414 | } |
---|
415 | |
---|
416 | /* DISPLAY |
---|
417 | -------------------------------------------------------- */ |
---|
418 | dcPage::open($page_title, |
---|
419 | ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')) . |
---|
420 | dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . |
---|
421 | dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . |
---|
422 | dcPage::jsLoad('js/jquery/jquery.pwstrength.js') . |
---|
423 | dcPage::jsJson('preferences', [ |
---|
424 | sprintf(__('Password strength: %s'), __('very weak')), |
---|
425 | sprintf(__('Password strength: %s'), __('weak')), |
---|
426 | sprintf(__('Password strength: %s'), __('mediocre')), |
---|
427 | sprintf(__('Password strength: %s'), __('strong')), |
---|
428 | sprintf(__('Password strength: %s'), __('very strong')) |
---|
429 | ]) . |
---|
430 | dcPage::jsLoad('js/_preferences.js') . |
---|
431 | dcPage::jsPageTabs($default_tab) . |
---|
432 | dcPage::jsConfirmClose('user-form', 'opts-forms', 'favs-form') . |
---|
433 | |
---|
434 | # --BEHAVIOR-- adminPreferencesHeaders |
---|
435 | $core->callBehavior('adminPreferencesHeaders'), |
---|
436 | |
---|
437 | dcPage::breadcrumb( |
---|
438 | [ |
---|
439 | html::escapeHTML($core->auth->userID()) => '', |
---|
440 | $page_title => '' |
---|
441 | ]) |
---|
442 | ); |
---|
443 | |
---|
444 | # User profile |
---|
445 | echo '<div class="multi-part" id="user-profile" title="' . __('My profile') . '">'; |
---|
446 | |
---|
447 | echo |
---|
448 | '<h3>' . __('My profile') . '</h3>' . |
---|
449 | '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="user-form">' . |
---|
450 | |
---|
451 | '<p><label for="user_name">' . __('Last Name:') . '</label>' . |
---|
452 | form::field('user_name', 20, 255, [ |
---|
453 | 'default' => html::escapeHTML($user_name), |
---|
454 | 'autocomplete' => 'family-name' |
---|
455 | ]) . |
---|
456 | '</p>' . |
---|
457 | |
---|
458 | '<p><label for="user_firstname">' . __('First Name:') . '</label>' . |
---|
459 | form::field('user_firstname', 20, 255, [ |
---|
460 | 'default' => html::escapeHTML($user_firstname), |
---|
461 | 'autocomplete' => 'given-name' |
---|
462 | ]) . |
---|
463 | '</p>' . |
---|
464 | |
---|
465 | '<p><label for="user_displayname">' . __('Display name:') . '</label>' . |
---|
466 | form::field('user_displayname', 20, 255, [ |
---|
467 | 'default' => html::escapeHTML($user_displayname), |
---|
468 | 'autocomplete' => 'nickname' |
---|
469 | ]) . |
---|
470 | '</p>' . |
---|
471 | |
---|
472 | '<p><label for="user_email">' . __('Email:') . '</label>' . |
---|
473 | form::email('user_email', [ |
---|
474 | 'default' => html::escapeHTML($user_email), |
---|
475 | 'autocomplete' => 'email' |
---|
476 | ]) . |
---|
477 | '</p>' . |
---|
478 | |
---|
479 | '<p><label for="user_url">' . __('URL:') . '</label>' . |
---|
480 | form::url('user_url', [ |
---|
481 | 'size' => 30, |
---|
482 | 'default' => html::escapeHTML($user_url), |
---|
483 | 'autocomplete' => 'url' |
---|
484 | ]) . |
---|
485 | '</p>' . |
---|
486 | |
---|
487 | '<p><label for="user_lang">' . __('Language for my interface:') . '</label>' . |
---|
488 | form::combo('user_lang', $lang_combo, $user_lang, 'l10n') . '</p>' . |
---|
489 | |
---|
490 | '<p><label for="user_tz">' . __('My timezone:') . '</label>' . |
---|
491 | form::combo('user_tz', dt::getZones(true, true), $user_tz) . '</p>'; |
---|
492 | |
---|
493 | if ($core->auth->allowPassChange()) { |
---|
494 | echo |
---|
495 | '<h4 class="vertical-separator pretty-title">' . __('Change my password') . '</h4>' . |
---|
496 | |
---|
497 | '<div class="pw-table">' . |
---|
498 | '<p class="pw-cell"><label for="new_pwd">' . __('New password:') . '</label>' . |
---|
499 | form::password('new_pwd', 20, 255, |
---|
500 | [ |
---|
501 | 'extra_html' => 'data-indicator="pwindicator"', |
---|
502 | 'autocomplete' => 'new-password'] |
---|
503 | ) . '</p>' . |
---|
504 | '<div id="pwindicator">' . |
---|
505 | ' <div class="bar"></div>' . |
---|
506 | ' <p class="label no-margin"></p>' . |
---|
507 | '</div>' . |
---|
508 | '</div>' . |
---|
509 | |
---|
510 | '<p><label for="new_pwd_c">' . __('Confirm new password:') . '</label>' . |
---|
511 | form::password('new_pwd_c', 20, 255, |
---|
512 | [ |
---|
513 | 'autocomplete' => 'new-password'] |
---|
514 | ) . '</p>' . |
---|
515 | |
---|
516 | '<p><label for="cur_pwd">' . __('Your current password:') . '</label>' . |
---|
517 | form::password('cur_pwd', 20, 255, |
---|
518 | [ |
---|
519 | 'autocomplete' => 'current-password'] |
---|
520 | ) . '</p>' . |
---|
521 | '<p class="form-note warn">' . |
---|
522 | __('If you have changed your email or password you must provide your current password to save these modifications.') . |
---|
523 | '</p>'; |
---|
524 | } |
---|
525 | |
---|
526 | echo |
---|
527 | '<p class="clear vertical-separator">' . |
---|
528 | $core->formNonce() . |
---|
529 | '<input type="submit" accesskey="s" value="' . __('Update my profile') . '" /></p>' . |
---|
530 | '</form>' . |
---|
531 | |
---|
532 | '</div>'; |
---|
533 | |
---|
534 | # User options : some from actual user profile, dashboard modules, ... |
---|
535 | echo '<div class="multi-part" id="user-options" title="' . __('My options') . '">'; |
---|
536 | |
---|
537 | echo |
---|
538 | '<form action="' . $core->adminurl->get("admin.user.preferences") . '#user-options" method="post" id="opts-forms">' . |
---|
539 | '<h3>' . __('My options') . '</h3>'; |
---|
540 | |
---|
541 | echo |
---|
542 | '<div class="fieldset">' . |
---|
543 | '<h4 id="user_options_interface">' . __('Interface') . '</h4>' . |
---|
544 | |
---|
545 | '<p><label for="user_ui_darkmode" class="classic">' . |
---|
546 | form::checkbox('user_ui_darkmode', 1, $user_ui_darkmode) . ' ' . |
---|
547 | __('Activate dark mode') . '</label></p>' . |
---|
548 | |
---|
549 | '<p><label for="user_ui_enhanceduploader" class="classic">' . |
---|
550 | form::checkbox('user_ui_enhanceduploader', 1, $user_ui_enhanceduploader) . ' ' . |
---|
551 | __('Activate enhanced uploader in media manager') . '</label></p>' . |
---|
552 | |
---|
553 | '<p><label for="user_acc_nodragdrop" class="classic">' . |
---|
554 | form::checkbox('user_acc_nodragdrop', 1, $user_acc_nodragdrop) . ' ' . |
---|
555 | __('Disable javascript powered drag and drop for ordering items') . '</label></p>' . |
---|
556 | '<p class="clear form-note">' . __('If checked, numeric fields will allow to type the elements\' ordering number.') . '</p>' . |
---|
557 | |
---|
558 | '<p><label for="user_ui_hidemoreinfo" class="classic">' . |
---|
559 | form::checkbox('user_ui_hidemoreinfo', 1, $user_ui_hidemoreinfo) . ' ' . |
---|
560 | __('Hide all secondary information and notes') . '</label></p>' . |
---|
561 | |
---|
562 | '<p><label for="user_ui_hidehelpbutton" class="classic">' . |
---|
563 | form::checkbox('user_ui_hidehelpbutton', 1, $user_ui_hidehelpbutton) . ' ' . |
---|
564 | __('Hide help button') . '</label></p>' . |
---|
565 | |
---|
566 | '<p><label for="user_ui_showajaxloader" class="classic">' . |
---|
567 | form::checkbox('user_ui_showajaxloader', 1, $user_ui_showajaxloader) . ' ' . |
---|
568 | __('Show asynchronous requests indicator') . '</label></p>' . |
---|
569 | |
---|
570 | '<p><label for="user_ui_htmlfontsize" class="classic">' . __('Font size:') . '</label>' . ' ' . |
---|
571 | form::combo('user_ui_htmlfontsize', $htmlfontsize_combo, $user_ui_htmlfontsize) . '</p>' . |
---|
572 | |
---|
573 | '<p><label for="user_ui_dynfontsize" class="classic">' . |
---|
574 | form::checkbox('user_ui_dynfontsize', 1, $user_ui_dynfontsize) . ' ' . |
---|
575 | __('Activate adpative font size') . '</label></p>' . |
---|
576 | '<p class="clear form-note">' . __('If checked, font size will vary depending on viewport size (from 12px to 16px with default font size selected).') . '</p>'; |
---|
577 | |
---|
578 | echo |
---|
579 | '<p><label for="user_ui_media_by_page" class="classic">' . __('Number of elements displayed per page in media manager:') . '</label> ' . |
---|
580 | form::number('user_ui_media_by_page', 0, 999, (integer) $user_ui_media_by_page) . '</p>'; |
---|
581 | |
---|
582 | echo |
---|
583 | '<p><label for="user_ui_media_nb_last_dirs" class="classic">' . __('Number of recent folders proposed in media manager:') . '</label> ' . |
---|
584 | form::number('user_ui_media_nb_last_dirs', 0, 999, (integer) $user_ui_media_nb_last_dirs) . '</p>' . |
---|
585 | '<p class="clear form-note">' . __('Leave empty to ignore, displayed only if Javascript is enabled in your browser.') . '</p>'; |
---|
586 | |
---|
587 | if ($core->auth->isSuperAdmin()) { |
---|
588 | echo |
---|
589 | '<p><label for="user_ui_hide_std_favicon" class="classic">' . |
---|
590 | form::checkbox('user_ui_hide_std_favicon', 1, $user_ui_hide_std_favicon) . ' ' . |
---|
591 | __('Do not use standard favicon') . '</label> ' . |
---|
592 | '<span class="clear form-note warn">' . __('This will be applied for all users') . '.</span>' . |
---|
593 | '</p>'; //Opera sucks; |
---|
594 | } |
---|
595 | |
---|
596 | echo |
---|
597 | '</div>'; |
---|
598 | |
---|
599 | echo |
---|
600 | '<div class="fieldset">' . |
---|
601 | '<h4 id="user_options_columns">' . __('Optional columns displayed in lists') . '</h4>'; |
---|
602 | $odd = true; |
---|
603 | foreach ($cols as $col_type => $col_list) { |
---|
604 | echo '<div class="two-boxes ' . ($odd ? 'odd' : 'even') . '">'; |
---|
605 | echo '<h5>' . $col_list[0] . '</h5>'; |
---|
606 | foreach ($col_list[1] as $col_name => $col_data) { |
---|
607 | echo |
---|
608 | '<p><label for="cols_' . $col_type . '-' . $col_name . '" class="classic">' . |
---|
609 | form::checkbox(['cols_' . $col_type . '[]', 'cols_' . $col_type . '-' . $col_name], $col_name, $col_data[0]) . $col_data[1] . '</label>'; |
---|
610 | } |
---|
611 | echo '</div>'; |
---|
612 | $odd = !$odd; |
---|
613 | } |
---|
614 | echo '</div>'; |
---|
615 | |
---|
616 | echo |
---|
617 | '<div class="fieldset">' . |
---|
618 | '<h4 id="user_options_edition">' . __('Edition') . '</h4>'; |
---|
619 | |
---|
620 | echo '<div class="two-boxes odd">'; |
---|
621 | foreach ($format_by_editors as $format => $editors) { |
---|
622 | echo |
---|
623 | '<p class="field"><label for="user_editor_' . $format . '">' . sprintf(__('Preferred editor for %s:'), $format) . '</label>' . |
---|
624 | form::combo( |
---|
625 | ['user_editor[' . $format . ']', 'user_editor_' . $format], |
---|
626 | array_merge([__('Choose an editor') => ''], $editors), |
---|
627 | $user_options['editor'][$format] |
---|
628 | ) . '</p>'; |
---|
629 | } |
---|
630 | echo |
---|
631 | '<p class="field"><label for="user_post_format">' . __('Preferred format:') . '</label>' . |
---|
632 | form::combo('user_post_format', $available_formats, $user_options['post_format']) . '</p>'; |
---|
633 | |
---|
634 | echo |
---|
635 | '<p class="field"><label for="user_post_status">' . __('Default entry status:') . '</label>' . |
---|
636 | form::combo('user_post_status', $status_combo, $user_post_status) . '</p>' . |
---|
637 | |
---|
638 | '<p class="field"><label for="user_edit_size">' . __('Entry edit field height:') . '</label>' . |
---|
639 | form::number('user_edit_size', 10, 999, (integer) $user_options['edit_size']) . '</p>' . |
---|
640 | |
---|
641 | '<p><label for="user_wysiwyg" class="classic">' . |
---|
642 | form::checkbox('user_wysiwyg', 1, $user_options['enable_wysiwyg']) . ' ' . |
---|
643 | __('Enable WYSIWYG mode') . '</label></p>' . |
---|
644 | |
---|
645 | '<p><label for="user_toolbar_bottom" class="classic">' . |
---|
646 | form::checkbox('user_toolbar_bottom', 1, $user_options['toolbar_bottom']) . ' ' . |
---|
647 | __('Display editor\'s toolbar at bottom of textarea (if possible)') . '</label></p>' . |
---|
648 | |
---|
649 | '</div>'; |
---|
650 | |
---|
651 | echo '<div class="two-boxes even">'; |
---|
652 | echo '<h5>' . __('Use xhtml editor for:') . '</h5>'; |
---|
653 | foreach ($rte as $rk => $rv) { |
---|
654 | echo |
---|
655 | '<p><label for="rte_' . $rk . '" class="classic">' . |
---|
656 | form::checkbox(['rte_flags[]', 'rte_' . $rk], $rk, $rv[0]) . $rv[1] . '</label>'; |
---|
657 | } |
---|
658 | echo '</div>'; |
---|
659 | |
---|
660 | echo '</div>'; // fieldset |
---|
661 | |
---|
662 | echo |
---|
663 | '<h4 class="pretty-title">' . __('Other options') . '</h4>'; |
---|
664 | |
---|
665 | # --BEHAVIOR-- adminPreferencesForm |
---|
666 | $core->callBehavior('adminPreferencesForm', $core); |
---|
667 | |
---|
668 | echo |
---|
669 | '<p class="clear vertical-separator">' . |
---|
670 | $core->formNonce() . |
---|
671 | '<input type="submit" accesskey="s" value="' . __('Save my options') . '" /></p>' . |
---|
672 | '</form>'; |
---|
673 | |
---|
674 | echo '</div>'; |
---|
675 | |
---|
676 | # My dashboard |
---|
677 | echo '<div class="multi-part" id="user-favorites" title="' . __('My dashboard') . '">'; |
---|
678 | $ws = $core->auth->user_prefs->addWorkspace('favorites'); |
---|
679 | echo '<h3>' . __('My dashboard') . '</h3>'; |
---|
680 | |
---|
681 | # Favorites |
---|
682 | echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="favs-form" class="two-boxes odd">'; |
---|
683 | |
---|
684 | echo '<div id="my-favs" class="fieldset"><h4>' . __('My favorites') . '</h4>'; |
---|
685 | |
---|
686 | $count = 0; |
---|
687 | $user_fav = $core->favs->getFavoriteIDs(false); |
---|
688 | foreach ($user_fav as $id) { |
---|
689 | $fav = $core->favs->getFavorite($id); |
---|
690 | if ($fav != false) { |
---|
691 | // User favorites only |
---|
692 | if ($count == 0) { |
---|
693 | echo '<ul class="fav-list">'; |
---|
694 | } |
---|
695 | |
---|
696 | $count++; |
---|
697 | echo '<li id="fu-' . $id . '">' . '<label for="fuk-' . $id . '">' . |
---|
698 | '<img src="' . dc_admin_icon_url($fav['small-icon']) . '" alt="" /> ' . '<span class="zoom"><img src="' . dc_admin_icon_url($fav['large-icon']) . '" alt="" /></span>' . |
---|
699 | form::number(['order[' . $id . ']'], [ |
---|
700 | 'min' => 1, |
---|
701 | 'max' => count($user_fav), |
---|
702 | 'default' => $count, |
---|
703 | 'class' => 'position', |
---|
704 | 'extra_html' => 'title="' . sprintf(__('position of %s'), $fav['title']) . '"' |
---|
705 | ]) . |
---|
706 | form::hidden(['dynorder[]', 'dynorder-' . $id . ''], $id) . |
---|
707 | form::checkbox(['remove[]', 'fuk-' . $id], $id) . __($fav['title']) . '</label>' . |
---|
708 | '</li>'; |
---|
709 | } |
---|
710 | } |
---|
711 | if ($count > 0) { |
---|
712 | echo '</ul>'; |
---|
713 | } |
---|
714 | |
---|
715 | if ($count > 0) { |
---|
716 | echo |
---|
717 | '<div class="clear">' . |
---|
718 | '<p>' . form::hidden('favs_order', '') . |
---|
719 | $core->formNonce() . |
---|
720 | '<input type="submit" name="saveorder" value="' . __('Save order') . '" /> ' . |
---|
721 | |
---|
722 | '<input type="submit" class="delete" name="removeaction" ' . |
---|
723 | 'value="' . __('Delete selected favorites') . '" ' . |
---|
724 | 'onclick="return window.confirm(\'' . html::escapeJS( |
---|
725 | __('Are you sure you want to remove selected favorites?')) . '\');" /></p>' . |
---|
726 | |
---|
727 | ($core->auth->isSuperAdmin() ? |
---|
728 | '<div class="info">' . |
---|
729 | '<p>' . __('If you are a super administrator, you may define this set of favorites to be used by default on all blogs of this installation.') . '</p>' . |
---|
730 | '<p><input class="reset" type="submit" name="replace" value="' . __('Define as default favorites') . '" />' . '</p>' . |
---|
731 | '</div>' |
---|
732 | : |
---|
733 | '') . |
---|
734 | |
---|
735 | '</div>'; |
---|
736 | } else { |
---|
737 | echo |
---|
738 | '<p>' . __('Currently no personal favorites.') . '</p>'; |
---|
739 | } |
---|
740 | |
---|
741 | $avail_fav = $core->favs->getFavorites($core->favs->getAvailableFavoritesIDs()); |
---|
742 | $default_fav_ids = []; |
---|
743 | foreach ($core->favs->getFavoriteIDs(true) as $v) { |
---|
744 | $default_fav_ids[$v] = true; |
---|
745 | } |
---|
746 | echo '</div>'; # /box my-fav |
---|
747 | |
---|
748 | echo '<div class="fieldset" id="available-favs">'; |
---|
749 | # Available favorites |
---|
750 | echo '<h5 class="pretty-title">' . __('Other available favorites') . '</h5>'; |
---|
751 | $count = 0; |
---|
752 | uasort($avail_fav, function ($a, $b) { |
---|
753 | return strcoll( |
---|
754 | strtolower(dcUtils::removeDiacritics($a['title'])), |
---|
755 | strtolower(dcUtils::removeDiacritics($b['title']))); |
---|
756 | }); |
---|
757 | |
---|
758 | foreach ($avail_fav as $k => $v) { |
---|
759 | if (in_array($k, $user_fav)) { |
---|
760 | unset($avail_fav[$k]); |
---|
761 | } |
---|
762 | } |
---|
763 | foreach ($avail_fav as $k => $fav) { |
---|
764 | if ($count == 0) { |
---|
765 | echo '<ul class="fav-list">'; |
---|
766 | } |
---|
767 | |
---|
768 | $count++; |
---|
769 | echo '<li id="fa-' . $k . '">' . '<label for="fak-' . $k . '">' . |
---|
770 | '<img src="' . dc_admin_icon_url($fav['small-icon']) . '" alt="" /> ' . |
---|
771 | '<span class="zoom"><img src="' . dc_admin_icon_url($fav['large-icon']) . '" alt="" /></span>' . |
---|
772 | form::checkbox(['append[]', 'fak-' . $k], $k) . |
---|
773 | $fav['title'] . '</label>' . |
---|
774 | (isset($default_fav_ids[$k]) ? ' <span class="default-fav"><img src="images/selected.png" alt="' . __('(default favorite)') . '" /></span>' : '') . |
---|
775 | '</li>'; |
---|
776 | } |
---|
777 | if ($count > 0) { |
---|
778 | echo '</ul>'; |
---|
779 | } |
---|
780 | |
---|
781 | echo |
---|
782 | '<p>' . |
---|
783 | $core->formNonce() . |
---|
784 | '<input type="submit" name="appendaction" value="' . __('Add to my favorites') . '" /></p>'; |
---|
785 | echo '</div>'; # /available favorites |
---|
786 | |
---|
787 | echo '</form>'; |
---|
788 | |
---|
789 | # Dashboard items |
---|
790 | echo |
---|
791 | '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="db-forms" class="two-boxes even">' . |
---|
792 | |
---|
793 | '<div class="fieldset">' . |
---|
794 | '<h4>' . __('Menu') . '</h4>' . |
---|
795 | '<p><label for="user_ui_nofavmenu" class="classic">' . |
---|
796 | form::checkbox('user_ui_nofavmenu', 1, !$user_ui_nofavmenu) . ' ' . |
---|
797 | __('Display favorites at the top of the menu') . '</label></p></div>'; |
---|
798 | |
---|
799 | echo |
---|
800 | '<div class="fieldset">' . |
---|
801 | '<h4>' . __('Dashboard icons') . '</h4>' . |
---|
802 | '<p><label for="user_dm_nofavicons" class="classic">' . |
---|
803 | form::checkbox('user_dm_nofavicons', 1, !$user_dm_nofavicons) . ' ' . |
---|
804 | __('Display dashboard icons') . '</label></p>'; |
---|
805 | |
---|
806 | if (count($iconsets_combo) > 1) { |
---|
807 | echo |
---|
808 | '<p><label for="user_ui_iconset" class="classic">' . __('Iconset:') . '</label> ' . |
---|
809 | form::combo('user_ui_iconset', $iconsets_combo, $user_ui_iconset) . '</p>'; |
---|
810 | } else { |
---|
811 | echo '<p class="hidden">' . form::hidden('user_ui_iconset', '') . '</p>'; |
---|
812 | } |
---|
813 | echo |
---|
814 | '</div>'; |
---|
815 | |
---|
816 | echo |
---|
817 | '<div class="fieldset">' . |
---|
818 | '<h4>' . __('Dashboard modules') . '</h4>' . |
---|
819 | |
---|
820 | '<p><label for="user_dm_doclinks" class="classic">' . |
---|
821 | form::checkbox('user_dm_doclinks', 1, $user_dm_doclinks) . ' ' . |
---|
822 | __('Display documentation links') . '</label></p>' . |
---|
823 | |
---|
824 | '<p><label for="user_dm_dcnews" class="classic">' . |
---|
825 | form::checkbox('user_dm_dcnews', 1, $user_dm_dcnews) . ' ' . |
---|
826 | __('Display Dotclear news') . '</label></p>' . |
---|
827 | |
---|
828 | '<p><label for="user_dm_quickentry" class="classic">' . |
---|
829 | form::checkbox('user_dm_quickentry', 1, $user_dm_quickentry) . ' ' . |
---|
830 | __('Display quick entry form') . '</label></p>'; |
---|
831 | |
---|
832 | if ($core->auth->isSuperAdmin()) { |
---|
833 | echo |
---|
834 | '<p><label for="user_dm_nodcupdate" class="classic">' . |
---|
835 | form::checkbox('user_dm_nodcupdate', 1, $user_dm_nodcupdate) . ' ' . |
---|
836 | __('Do not display Dotclear updates') . '</label></p>'; |
---|
837 | } |
---|
838 | |
---|
839 | echo '</div>'; |
---|
840 | |
---|
841 | # --BEHAVIOR-- adminDashboardOptionsForm |
---|
842 | $core->callBehavior('adminDashboardOptionsForm', $core); |
---|
843 | |
---|
844 | echo |
---|
845 | '<p>' . |
---|
846 | form::hidden('db-options', '-') . |
---|
847 | $core->formNonce() . |
---|
848 | '<input type="submit" accesskey="s" value="' . __('Save my dashboard options') . '" /></p>' . |
---|
849 | '</form>'; |
---|
850 | |
---|
851 | # Dashboard items order (reset) |
---|
852 | echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="order-reset" class="two-boxes even">'; |
---|
853 | echo '<div class="fieldset"><h4>' . __('Dashboard items order') . '</h4>'; |
---|
854 | echo |
---|
855 | '<p>' . |
---|
856 | $core->formNonce() . |
---|
857 | '<input type="submit" name="resetorder" value="' . __('Reset dashboard items order') . '" /></p>'; |
---|
858 | echo '</div>'; |
---|
859 | echo '</form>'; |
---|
860 | |
---|
861 | echo '</div>'; # /multipart-user-favorites |
---|
862 | |
---|
863 | dcPage::helpBlock('core_user_pref'); |
---|
864 | dcPage::close(); |
---|