Add setting of is_local to organisations
This commit is contained in:
parent
d881b3f95f
commit
ef36cbc541
3 changed files with 24 additions and 4 deletions
|
@ -35,6 +35,7 @@ sub add_org_submit {
|
|||
$validation->optional('sector');
|
||||
$validation->optional('postcode')->postcode;
|
||||
$validation->optional('pending');
|
||||
$validation->optional('is_local');
|
||||
|
||||
if ( $validation->has_error ) {
|
||||
$c->flash( error => 'The validation has failed' );
|
||||
|
@ -53,6 +54,7 @@ sub add_org_submit {
|
|||
postcode => $validation->param('postcode'),
|
||||
submitted_by_id => $c->current_user->id,
|
||||
pending => defined $validation->param('pending') ? 0 : 1,
|
||||
is_local => $validation->param('is_local'),
|
||||
},
|
||||
type => 'organisation',
|
||||
});
|
||||
|
@ -94,6 +96,7 @@ sub valid_edit {
|
|||
$validation->optional('sector');
|
||||
$validation->required('postcode')->postcode;
|
||||
$validation->optional('pending');
|
||||
$validation->optional('is_local');
|
||||
|
||||
if ( $validation->has_error ) {
|
||||
$c->flash( error => 'The validation has failed' );
|
||||
|
@ -111,6 +114,7 @@ sub valid_edit {
|
|||
sector => $validation->param('sector'),
|
||||
postcode => $validation->param('postcode'),
|
||||
pending => defined $validation->param('pending') ? 0 : 1,
|
||||
is_local => $validation->param('is_local'),
|
||||
});
|
||||
} );
|
||||
} finally {
|
||||
|
|
Reference in a new issue