1 package SL::Helper::UserPreferences::UpdatePositions;
4 use parent qw(Rose::Object);
7 use List::MoreUtils qw(none);
9 use SL::Helper::UserPreferences;
11 use Rose::Object::MakeMethods::Generic (
12 'scalar --get_set_init' => [ qw(user_prefs) ],
15 sub get_show_update_button {
16 !!$_[0]->user_prefs->get('show_update_button');
19 sub store_show_update_button {
20 $_[0]->user_prefs->store('show_update_button', $_[1]);
24 SL::Helper::UserPreferences->new(
25 namespace => $_[0]->namespace,
30 sub namespace { 'UpdatePositions' }
43 SL::Helper::UserPreferences::UpdatePositions - preferences intended
44 to store user settings for displaying an update button for the postions
45 of document forms to update the positions (parts) from master data.
49 use SL::Helper::UserPreferences::UpdatePositions;
50 my $prefs = SL::Helper::UserPreferences::UpdatePositions->new();
52 $prefs->store_show_update_button(1);
53 my $value = $prefs->get_show_update_button;
57 This module manages storing the user's choise for displaying an update button
58 in the positions area in forms (new order controller).
66 Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt>