You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Martin Grigorov <mg...@apache.org> on 2015/07/10 09:03:34 UTC

Confirmation of dangerous action

Hi Dan, Jeroen,

I remember we have discussed functionality for the Wicket Viewer to provide
a "Are you sure?" button/link for important/dangerous actions. For example
for delete actions.
Currently this is worked around with an extra boolean property, i.e. the
user has to check the "Yes, I want to delete" checkbox to be able to delete
an entity.

Could something like http://mistic100.github.io/Bootstrap-Confirmation/ do
the job?
I.e. clicking on such "dangerous" link will show the popup asking for
confirmation and then the user will have to click the "Confirm" button to
proceed.

In Isis we could add @Action(needsConfirmation=boolean) and if it is 'true'
then the extra behavior will be added to the link/button.
For the labels of the Confirm/Cancel buttons I think it would be better to
use Wicket/Isis I18N to not pollute the @Action annotation with extra
attributes.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: Confirmation of dangerous action

Posted by Martin Grigorov <mg...@apache.org>.
Thanks!

I've added a link to this discussion in the ticket.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Jul 10, 2015 at 10:18 AM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Martin,
>
> looks like a very nice way to do this.  My only thought is whether it
> should be on the button/menu item that brings up the prompt, or on the OK
> button of the action prompt dialog itself.  My feeling is it should be the
> latter.  Of course, for no-arg actions it should also be on button/menu
> item instead (because there would be no prompt).
>
> I see we've previously raised a ticket [1] for this idea, so perhaps you
> could add this suggestion to it?
>
> Cheers
> Dan
>
> [1] https://issues.apache.org/jira/browse/ISIS-1007
>
>
> On 10 July 2015 at 08:03, Martin Grigorov <mg...@apache.org> wrote:
>
> > Hi Dan, Jeroen,
> >
> > I remember we have discussed functionality for the Wicket Viewer to
> provide
> > a "Are you sure?" button/link for important/dangerous actions. For
> example
> > for delete actions.
> > Currently this is worked around with an extra boolean property, i.e. the
> > user has to check the "Yes, I want to delete" checkbox to be able to
> delete
> > an entity.
> >
> > Could something like http://mistic100.github.io/Bootstrap-Confirmation/
> do
> > the job?
> > I.e. clicking on such "dangerous" link will show the popup asking for
> > confirmation and then the user will have to click the "Confirm" button to
> > proceed.
> >
> > In Isis we could add @Action(needsConfirmation=boolean) and if it is
> 'true'
> > then the extra behavior will be added to the link/button.
> > For the labels of the Confirm/Cancel buttons I think it would be better
> to
> > use Wicket/Isis I18N to not pollute the @Action annotation with extra
> > attributes.
> >
> > Martin Grigorov
> > Freelancer. Available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
>

Re: Confirmation of dangerous action

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Martin,

looks like a very nice way to do this.  My only thought is whether it
should be on the button/menu item that brings up the prompt, or on the OK
button of the action prompt dialog itself.  My feeling is it should be the
latter.  Of course, for no-arg actions it should also be on button/menu
item instead (because there would be no prompt).

I see we've previously raised a ticket [1] for this idea, so perhaps you
could add this suggestion to it?

Cheers
Dan

[1] https://issues.apache.org/jira/browse/ISIS-1007


On 10 July 2015 at 08:03, Martin Grigorov <mg...@apache.org> wrote:

> Hi Dan, Jeroen,
>
> I remember we have discussed functionality for the Wicket Viewer to provide
> a "Are you sure?" button/link for important/dangerous actions. For example
> for delete actions.
> Currently this is worked around with an extra boolean property, i.e. the
> user has to check the "Yes, I want to delete" checkbox to be able to delete
> an entity.
>
> Could something like http://mistic100.github.io/Bootstrap-Confirmation/ do
> the job?
> I.e. clicking on such "dangerous" link will show the popup asking for
> confirmation and then the user will have to click the "Confirm" button to
> proceed.
>
> In Isis we could add @Action(needsConfirmation=boolean) and if it is 'true'
> then the extra behavior will be added to the link/button.
> For the labels of the Confirm/Cancel buttons I think it would be better to
> use Wicket/Isis I18N to not pollute the @Action annotation with extra
> attributes.
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>