From 9292866fbc1be364a716ac9efb105a0350a2de72 Mon Sep 17 00:00:00 2001 From: M Somerville Date: Wed, 2 Sep 2020 16:30:57 +0100 Subject: Form wizard code. --- perllib/FixMyStreet/App/Form/Page/Simple.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 perllib/FixMyStreet/App/Form/Page/Simple.pm (limited to 'perllib/FixMyStreet/App/Form/Page/Simple.pm') diff --git a/perllib/FixMyStreet/App/Form/Page/Simple.pm b/perllib/FixMyStreet/App/Form/Page/Simple.pm new file mode 100644 index 000000000..89a871e2e --- /dev/null +++ b/perllib/FixMyStreet/App/Form/Page/Simple.pm @@ -0,0 +1,25 @@ +package FixMyStreet::App::Form::Page::Simple; +use Moose; +extends 'HTML::FormHandler::Page'; + +# What page to go to after successful submission of this page +has next => ( is => 'ro', isa => 'Str|CodeRef' ); + +# A function that will be called to generate an update_field_list parameter +has update_field_list => ( + is => 'ro', + isa => 'CodeRef', + predicate => 'has_update_field_list', +); + +# A function called after all form processing, just before template display +# (to e.g. set up the map) +has post_process => ( + is => 'ro', + isa => 'CodeRef', +); + +# Catalyst action to forward to once this page has been reached +has finished => ( is => 'ro', isa => 'CodeRef' ); + +1; -- cgit v1.2.3