projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pflichtenheftitems: Masken für neue (Unter)Funktionsblöcke
[kivitendo-erp.git]
/
SL
/
Controller
/
PaymentTerm.pm
diff --git
a/SL/Controller/PaymentTerm.pm
b/SL/Controller/PaymentTerm.pm
index
631428e
..
b504bb7
100644
(file)
--- a/
SL/Controller/PaymentTerm.pm
+++ b/
SL/Controller/PaymentTerm.pm
@@
-13,7
+13,8
@@
use Rose::Object::MakeMethods::Generic
scalar => [ qw(payment_term languages) ],
);
scalar => [ qw(payment_term languages) ],
);
-__PACKAGE__->run_before('load_payment_term', only => [ qw( edit update destroy move_up move_down) ]);
+__PACKAGE__->run_before('check_auth');
+__PACKAGE__->run_before('load_payment_term', only => [ qw( edit update destroy) ]);
__PACKAGE__->run_before('load_languages', only => [ qw(new list edit create update) ]);
#
__PACKAGE__->run_before('load_languages', only => [ qw(new list edit create update) ]);
#
@@
-64,16
+65,20
@@
sub action_destroy {
$self->redirect_to(action => 'list');
}
$self->redirect_to(action => 'list');
}
-sub action_
move_up
{
+sub action_
reorder
{
my ($self) = @_;
my ($self) = @_;
- $self->{payment_term}->move_position_up;
- $self->redirect_to(action => 'list');
+
+ SL::DB::PaymentTerm->reorder_list(@{ $::form->{payment_term_id} || [] });
+
+ $self->render(\'', { type => 'json' });
}
}
-sub action_move_down {
- my ($self) = @_;
- $self->{payment_term}->move_position_down;
- $self->redirect_to(action => 'list');
+#
+# filters
+#
+
+sub check_auth {
+ $::auth->assert('config');
}
#
}
#