|
Lines 46-56
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 46 |
if ( $action eq 'create' ) { |
46 |
if ( $action eq 'create' ) { |
| 47 |
my $title = $query->param('title'); |
47 |
my $title = $query->param('title'); |
| 48 |
my $description = $query->param('description'); |
48 |
my $description = $query->param('description'); |
|
|
49 |
my $branchcode = $query->param('branchcode') || undef; |
| 49 |
$template->param( createdTitle => $title ); |
50 |
$template->param( createdTitle => $title ); |
| 50 |
|
51 |
|
| 51 |
my $collection = Koha::RotatingCollection->new( |
52 |
my $collection = Koha::RotatingCollection->new( |
| 52 |
{ colTitle => $title, |
53 |
{ colTitle => $title, |
| 53 |
colDesc => $description, |
54 |
colDesc => $description, |
|
|
55 |
colBranchcode => $branchcode, |
| 54 |
} |
56 |
} |
| 55 |
); |
57 |
); |
| 56 |
|
58 |
|
|
Lines 85-90
if ( $action eq 'create' ) {
Link Here
|
| 85 |
my $colId = $query->param('colId'); |
87 |
my $colId = $query->param('colId'); |
| 86 |
my $title = $query->param('title'); |
88 |
my $title = $query->param('title'); |
| 87 |
my $description = $query->param('description'); |
89 |
my $description = $query->param('description'); |
|
|
90 |
my $branchcode = $query->param('branchcode') || undef; |
| 88 |
|
91 |
|
| 89 |
$template->param( updatedTitle => $title ); |
92 |
$template->param( updatedTitle => $title ); |
| 90 |
|
93 |
|
|
Lines 92-97
if ( $action eq 'create' ) {
Link Here
|
| 92 |
my $collection = Koha::RotatingCollections->find($colId); |
95 |
my $collection = Koha::RotatingCollections->find($colId); |
| 93 |
$collection->colTitle($title); |
96 |
$collection->colTitle($title); |
| 94 |
$collection->colDesc($description); |
97 |
$collection->colDesc($description); |
|
|
98 |
$collection->colBranchcode($branchcode); |
| 95 |
|
99 |
|
| 96 |
eval { $collection->store; }; |
100 |
eval { $collection->store; }; |
| 97 |
|
101 |
|
| 98 |
- |
|
|