X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FPrefs%2FOther.html;h=99240710810f8835131f34fbdece1ba1295317f7;hb=01721976fa3324f41a3093cda68bc38a7eec5ff5;hp=e0b15815396207aae1cd8562a35359e5da89327f;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/share/html/Prefs/Other.html b/rt/share/html/Prefs/Other.html index e0b158153..992407108 100644 --- a/rt/share/html/Prefs/Other.html +++ b/rt/share/html/Prefs/Other.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,16 +46,14 @@ %# %# END BPS TAGGED BLOCK }}} <& /Elements/Header, Title => $title &> -<& /User/Elements/Tabs, - current_tab => 'Prefs/Other.html', - Title => $title, -&> +<& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> -
+ % foreach my $section( RT->Config->Sections ) { <&|/Widgets/TitleBox, title => loc( $section ) &> % foreach my $option( RT->Config->Options( Section => $section ) ) { +% next if $option eq 'EmailFrequency' && !RT->Config->Get('RecordOutgoingEmail'); % my $meta = RT->Config->Meta( $option ); <& $meta->{'Widget'}, Default => 1, @@ -69,9 +67,9 @@ % } -% if ( RT->Config->Get('GnuPG')->{'Enable'} ) { +% if ( RT->Config->Get('Crypt')->{'Enable'} ) { <&|/Widgets/TitleBox, title => loc( 'Cryptography' ) &> -<&|/l&>Preferred key: <& /Elements/GnuPG/SelectKeyForEncryption, EmailAddress => $UserObj->EmailAddress, Default => $UserObj->PreferredKey &> +<&|/l&>Preferred key: <& /Elements/Crypt/SelectKeyForEncryption, EmailAddress => $UserObj->EmailAddress, Default => $UserObj->PreferredKey &> % } @@ -79,17 +77,22 @@
<%INIT> my @results; -my $title = loc("Settings"); +my $title = loc("Preferences"); my $UserObj = $session{'CurrentUser'}->UserObj; my $preferences = $UserObj->Preferences( $RT::System ); -if ((defined $PreferredKey) && $PreferredKey ne $UserObj->FirstAttribute('PreferredKey')) { +if (defined($PreferredKey) and (not $UserObj->FirstAttribute('PreferredKey') + or $PreferredKey ne $UserObj->FirstAttribute('PreferredKey')->Content)) { my ($code, $msg) = $UserObj->SetAttribute(Name => 'PreferredKey', Content => $PreferredKey); - push @results, loc('Preferred Key: [_1]', loc_fuzzy($msg)); + push @results, loc('Preferred Key: [_1]', $msg) unless $code; } if ( $Update ) { + my $fsconf = eval { FS::Conf->new }; + if ( $fsconf && $fsconf->exists('disable_acl_changes') ) { + push @results, loc("Preference changes disabled in public demo."); + } else { $preferences ||= {}; $m->comp( '/Widgets/BulkProcess', Meta => { map { $_ => RT->Config->Meta($_) } RT->Config->Options @@ -102,6 +105,7 @@ if ( $Update ) { my ($ok, $msg) = $UserObj->SetPreferences( $RT::System, $preferences ); push @results, $ok ? loc("Preferences saved.") : $msg; + } } <%ARGS>