[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.2-37-g49d17ab
Shawn Moore
shawn at bestpractical.com
Mon Aug 28 16:59:13 EDT 2017
The branch, 4.4-trunk has been updated
via 49d17abd08503a4aa316d40e7f50b3266cb1411f (commit)
via bda14314196a65c9a2440c92b21834101e37d896 (commit)
from 07e6b3f51709b6bfff68d18b4b186a74d571a18b (commit)
Summary of changes:
share/html/Prefs/SearchOptions.html | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit bda14314196a65c9a2440c92b21834101e37d896
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date: Thu Aug 17 10:16:17 2017 -0400
Allow users to restore default search preferences
User can now reset search preferences to default search options.
Fixes: I#32854
diff --git a/share/html/Prefs/SearchOptions.html b/share/html/Prefs/SearchOptions.html
index eba5a81..264ef46 100644
--- a/share/html/Prefs/SearchOptions.html
+++ b/share/html/Prefs/SearchOptions.html
@@ -58,7 +58,9 @@
RowsPerPage => $RowsPerPage,
OrderBy => $OrderBy,
Order => $Order &>
-
+% if ($session{'CurrentUser'}->UserObj->Preferences("SearchDisplay")) {
+<& /Elements/Submit, Name => 'Reset', Label => loc('Restore Default Preferences')&>
+% }
<& /Elements/Submit, Name => 'SavePreferences', Label => loc('Save Changes') &>
</form>
<%INIT>
@@ -81,6 +83,11 @@ if ($ARGS{'SavePreferences'}) {
push @actions, $ok ? loc("Preferences saved.") : $msg;
}
+# If we're restoring default preferences, delete the user's changes
+if ($Reset) {
+ my ($ok, $msg) = $session{'CurrentUser'}->UserObj->DeletePreferences("SearchDisplay");
+ push @actions, $ok ? loc("Default preferences restored.") : $msg;
+}
# Read from user preferences
my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
@@ -103,5 +110,5 @@ $Description => undef
$Order => undef
$OrderBy => undef
$RowsPerPage => undef
+$Reset => undef
</%ARGS>
-
commit 49d17abd08503a4aa316d40e7f50b3266cb1411f
Merge: 07e6b3f bda1431
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Aug 28 16:58:36 2017 -0400
Merge branch '4.4/search-preference-updates' into 4.4-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list