Skip to content

Commit

Permalink
Changed browse_level preference wording to match edit mode in add/edi…
Browse files Browse the repository at this point in the history
…t forms.
  • Loading branch information
John Luxford committed Jan 4, 2009
1 parent 448730a commit d7b1f40
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
17 changes: 15 additions & 2 deletions inc/app/cms/boxes/user/preferences/index.php
Expand Up @@ -68,7 +68,16 @@ function PreferencesForm () {
$this->widgets[$key]->extra = 'onfocus="formhelp_show (this, \'' . addslashes ($v) . '\')" onblur="formhelp_hide ()"';
}
}
$this->widgets[$key]->setValue (session_pref ($key));
if ($key == 'browse_level') {
$p = session_pref ($key);
if ($p == 'normal') {
$this->widgets[$key]->setValue ('easy');
} else {
$this->widgets[$key]->setValue ($p);
}
} else {
$this->widgets[$key]->setValue (session_pref ($key));
}
}

$w =& $this->addWidget ('msubmit', 'submit_button');
Expand Down Expand Up @@ -109,7 +118,11 @@ function onSubmit ($vals) {
}

foreach ($vals as $key => $value) {
session_pref_set ($key, $value);
if ($key == 'browse_level' && $value == 'easy') {
session_pref_set ('browse_level', 'normal');
} else {
session_pref_set ($key, $value);
}
}

page_title (intl_get ('Preferences Saved'));
Expand Down
8 changes: 4 additions & 4 deletions inc/conf/auth/preferences/index.php
Expand Up @@ -24,17 +24,17 @@
[browse_level]
alt = Browse Level
alt = Edit Mode
instructions = "Which level of functionality do you want to be shown when browsing for content in the control panel?"
instructions = "Which level of functionality do you want to be shown when editing content in the control panel?"
type = select
value 1 = advanced
value 2 = normal
value 2 = easy
default_value = normal
default_value = easy
[lang]
Expand Down
1 change: 1 addition & 0 deletions install/changes.txt
Expand Up @@ -51,6 +51,7 @@ Changes in 5.0.2-stable
- Improved the onbeforeunload warning so it doesn't show on cancel.
- Fixed error in SiteSearch RSS feed.
- Changed SiteSearch indexer to try to reduce memory usage.
- Changed browse_level preference wording to match edit mode in add/edit forms.

Changes in 5.0.1-stable

Expand Down

0 comments on commit d7b1f40

Please sign in to comment.