diff --git a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm index 9a9a919..6921c6a 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm @@ -29,6 +29,7 @@ sub add_org_submit { $validation->required('town'); $validation->optional('sector'); $validation->optional('postcode')->postcode; + $validation->optional('pending'); if ( $validation->has_error ) { $c->flash( error => 'The validation has failed' ); @@ -45,6 +46,8 @@ sub add_org_submit { town => $validation->param('town'), sector => $validation->param('sector'), postcode => $validation->param('postcode'), + submitted_by_id => $c->current_user->id, + pending => defined $validation->param('pending') ? 0 : 1, }, type => 'organisation', }); diff --git a/templates/admin/organisations/add_org.html.ep b/templates/admin/organisations/add_org.html.ep index 6e7702e..be22d3c 100644 --- a/templates/admin/organisations/add_org.html.ep +++ b/templates/admin/organisations/add_org.html.ep @@ -15,19 +15,51 @@

Add an Organisation

- +