Revision cea9f6f8
Von Werner Hahn vor etwa 6 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
42 | 42 |
use SL::CA; |
43 | 43 |
use SL::Form; |
44 | 44 |
use SL::Helper::Flash; |
45 |
use SL::Helper::UserPreferences; |
|
45 | 46 |
use SL::User; |
46 | 47 |
use SL::USTVA; |
47 | 48 |
use SL::Iconv; |
... | ... | |
573 | 574 |
my $form = $main::form; |
574 | 575 |
my %myconfig = %main::myconfig; |
575 | 576 |
my $locale = $main::locale; |
577 |
my $defaults = SL::DB::Default->get; |
|
576 | 578 |
|
577 | 579 |
_build_cfg_options('dateformat', qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd)); |
578 | 580 |
_build_cfg_options('timeformat', qw(hh:mm hh:mm:ss)); |
... | ... | |
643 | 645 |
}; |
644 | 646 |
} |
645 | 647 |
|
648 |
my $user_prefs = SL::Helper::UserPreferences->new( |
|
649 |
namespace => 'TopQuickSearch', |
|
650 |
); |
|
651 |
my $prefs_val; |
|
652 |
my @quick_search_modules; |
|
653 |
if ($user_prefs) { |
|
654 |
$prefs_val = $user_prefs->get('quick_search_modules'); |
|
655 |
@quick_search_modules = split ',', $prefs_val; |
|
656 |
} |
|
657 |
|
|
658 |
my $enabled_quick_search = [ SL::Controller::TopQuickSearch->new->available_modules ]; |
|
659 |
$form->{ENABLED_QUICK_SEARCHMODULES} = \@{$enabled_quick_search}; |
|
660 |
$form->{DEFAULT_QUICK_SEARCHMODULES} = \@quick_search_modules; |
|
661 |
|
|
646 | 662 |
$myconfig{show_form_details} = 1 unless (defined($myconfig{show_form_details})); |
647 | 663 |
$form->{CAN_CHANGE_PASSWORD} = $main::auth->can_change_password(); |
648 | 664 |
$form->{todo_cfg} = { TODO->get_user_config('login' => $::myconfig{login}) }; |
... | ... | |
650 | 666 |
$form->{title} = $locale->text('Edit Preferences for #1', $::myconfig{login}); |
651 | 667 |
|
652 | 668 |
setup_am_config_action_bar(); |
653 |
|
|
654 | 669 |
$form->header(); |
655 | 670 |
|
656 | 671 |
$form->{full_signature} = $form->create_email_signature(); |
... | ... | |
671 | 686 |
|
672 | 687 |
TODO->save_user_config('login' => $::myconfig{login}, %{ $form->{todo_cfg} || { } }); |
673 | 688 |
|
689 |
my $user_prefs = SL::Helper::UserPreferences->new( |
|
690 |
namespace => 'TopQuickSearch', |
|
691 |
); |
|
692 |
my $quick_search_modules = join ',', @{$form->{quick_search_modules}}; |
|
693 |
$user_prefs->store('quick_search_modules', $quick_search_modules); |
|
694 |
|
|
674 | 695 |
if (AM->save_preferences($form)) { |
675 | 696 |
if ($::auth->can_change_password() |
676 | 697 |
&& defined $form->{new_password} |
Auch abrufbar als: Unified diff
TopQuickSearch für den Benutzer konfigurierbar gemacht.
Über UserPreferences, allerdings wird die Mandantenkonfiguration (quick_search_modules) nicht
berücksichtigt. Der Benutzer hat alle Schnellsuchen zur Verfügung.
Das L.multiselect2side macht Probleme deswegen auskommeniert. Wenn aktiv wird das
Emailsignaturfeld m Tab "Persönliche Einstellungen" doppelt angezeigt,
beide Felder und Links (Signatur bearbeiten und volle Signatur prüfen) sind sichtbar.