1 package SL::Controller::ClientConfig;
4 use parent qw(SL::Controller::Base);
9 __PACKAGE__->run_before('check_auth');
13 my ($self, %params) = @_;
15 $self->{payment_options} = [ { title => $::locale->text("never"), value => 0 },
16 { title => $::locale->text("every time"), value => 1 },
17 { title => $::locale->text("on the same day"), value => 2 }, ];
19 $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
21 $self->render('client_config/form', title => $::locale->text('Client Configuration'));
26 my ($self, %params) = @_;
28 SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
30 flash_later('info', $::locale->text('Client Configuration saved!'));
32 $self->redirect_to(action => 'edit');
36 #################### private stuff ##########################
39 $::auth->assert('admin');