Small fix to templates/factory/frontpage ( http://rt.cpan.org/NoAuth/Bug.html?id=11236 )
MasonX support in Maypole::Application ( https://rt.cpan.org/NoAuth/Bug.html?id=12383 )
Maypole::Model::CDBI::Plain / Maypole Config issue ( http://rt.cpan.org/NoAuth/Bug.html?id=11530 )
+ Repeat Submission detection support
+
+ Additional Requirements : Digest::MD5
2.09 Mon Jan 25 22:00:00 2005
Fixes:
Template => 0,
Template::Plugin::Class => 0,
Test::MockModule => 0,
+ Digest::MD5 => 0,
}, # e.g., Module::Name => 1.1
(
$] >= 5.005
die "Do not use Maypole directly; use Apache::MVC or similar";
}
+# Session and Repeat Submission Handling
+
+sub make_random_id {
+ use Maypole::Session;
+ return Maypole::Session::generate_unique_id();
+}
+
=head1 NAME
Maypole - MVC web application framework
can handle exceptions the user, or falls back to the default
exception method of your Maypole application.
+=head3 make_random_id
+
+returns a unique id for this request can be used to prevent or detect repeat submissions.
=head3 handler
[% END; %]
<input type="submit" name="create" value="create"/>
+ <input type="hidden" name="__form_id" value="[% request.make_random_id %]">
</fieldset>
</form>
</div>
IF errors.$col;
'<span class="error">'; errors.$col;'</span>';
END;
- END;
- '<input type="submit" name="edit" value="edit"/>';
- "</fieldset></form>";
-
END %]
+ <input type="submit" name="edit" value="edit"/>
+ <input type="hidden" name="__form_id" value="[% request.make_random_id %]">
+ </fieldset></form>
+
+ [% END %]
[% ELSE %]
[% INCLUDE addnew %]
[% END %]