Mojolicious-Plugin-Notifications
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/Notifications/Alertify.pm view on Meta::CPAN
in a hash reference.
In case an C<ok> or C<cancel> parameter is passed, this will create a confirmation
notification. The C<ok> and C<cancel> URLs will receive a POST request,
once the buttons are pressed.
In case an C<ok_label> is passed, this will be the label
for the confirmation button.
In case a C<cancel_label> is passed, this will be the label
for the cancelation button.
The POST will have a L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.
B<Confirmation is EXPERIMENTAL!>
=head2 notifications
# In templates
%= notifications 'alertify';
%= notifications 'alertify', 'bootstrap', -no_include, -no_css
lib/Mojolicious/Plugin/Notifications/Alertify.pm view on Meta::CPAN
JavaScript snippet.
Accepts the controller as an optional first parameter,
the notification type, a hash reference with parameters,
and the message. In case the parameters include C<ok> or C<cancel> routes,
a confirmation notification is used.
If the first parameter is a L<Mojolicious::Controller> object,
and the notification is a confirmation, the requests will have
a L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.
B<Confirmation is EXPERIMENTAL!>
=head1 SEE ALSO
L<Alertify.js|http://fabien-d.github.io/alertify.js/>.
=head1 AVAILABILITY
lib/Mojolicious/Plugin/Notifications/HTML.pm view on Meta::CPAN
In case an C<ok> parameter is passed, this will add a POST form
for confirmation. In case an C<ok_label> is passed, this will be the label
for the confirmation button.
In case a C<cancel> parameter is passed, this will add a POST form
for cancelation. In case a C<cancel_label> is passed, this will be the label
for the cancelation button.
If the first parameter is a L<Mojolicious::Controller> object,
the button will have a
L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.
This is meant to be used by other engines as a fallback.
B<Confirmation is EXPERIMENTAL!>
=head1 AVAILABILITY
https://github.com/Akron/Mojolicious-Plugin-Notifications
lib/Mojolicious/Plugin/Notifications/Humane.pm view on Meta::CPAN
at L<Humane.js|http://wavded.github.io/humane-js/> to see,
which notification types are presupported.
In addition to types and messages, further refinements can
be passed at the second position.
In case an C<ok> parameter is passed, this will create a
notification that requires a click to be closed.
The C<ok> URL will receive a POST request on closing.
The POST will have a L<csrf_token|Mojolicious::Plugin::TagHelpers/csrf_token>
parameter to validate.
B<Confirmation is EXPERIMENTAL!>
=head2 notifications
# In tempates
%= notifications 'humane';
%= notifications 'humane' => [qw/warn success/];
%= notifications 'humane' => [qw/warn success/], -no_css;
( run in 1.046 second using v1.01-cache-2.11-cpan-39bf76dae61 )