[Cubicweb] remove cancel and apply buttons
nicolas.chauvat at logilab.fr
Wed Jun 3 16:04:16 CEST 2015
On Wed, Jun 03, 2015 at 03:53:25PM +0200, Rabah Meradi wrote:
> When creating or editing an entity, CubicWeb provides three buttons:
> * validate: create the entity an redirect to view page. We should
> perhaps change the name to 'create' (in creation view) as the action is
> creating an entity.
> * apply: create the entity and redirect to the edit view
> * cancel: return to the last visited page
> I see problems with apply and cancel buttons. For me these two buttons
> are to be removed for the below reasons:
> * I don't see the utility to create an entity and edit it just after
> without doing any other actions (view it for example).
Currently, you can not add relations to an entity that was not
"Apply" is useful if you want to create then add relations.
> * 'apply' isn't descriptive. apply is better suited when making changes
> but here the entity isn't created yet so we can't make changes to it.
> Perhaps we should choose another name if we decide to keep it.
"Create and add relations" ?
But then the buttons would need to change when the entity is modified
instead of being created.
We could have a single button "Save the changes" in that case.
> * the cancel button has the same functionality to the browser's back
> button and users tend to use it when they have done something wrong.
> To implement the action of the cancel button we use session to retrieve
> last visited pages. Storing data in session is something we want to
> avoid to respect REST principles.
That's a valid point.
> Other websites only provide create and preview buttons.
> Articles about cancel buttons:
I am not 100% sure what people expect when they click on "modify", then
change the content of some fields, then hit the back button.
logilab.fr - services en informatique scientifique et gestion de connaissances
More information about the Cubicweb