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