OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

When a user create a new role, redirect the use to the edit page instead of index

Open MikeAlhayek opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe.

When a new role is created, currently we redirect the user to the Index view. After a user adds a new role, they would likely want to assign permissions to it. from a user experience, I think it would be more logical to redirect the user to the Edit screen of that role instead.

Describe the solution you'd like

After a new role is successfully created, redirect the user to the edit view return RedirectToAction(nameof(Edit), new { id = role.RoleName});

MikeAlhayek avatar Jul 05 '22 19:07 MikeAlhayek

May be you need a Save and Continue option

ns8482e avatar Jul 07 '22 14:07 ns8482e

I might not disagree, but we should see if this is a pattern we actually copy in many places.

sebastienros avatar Jul 07 '22 19:07 sebastienros

I think we used this pattern in content items. I rethink again about the scenario, seems Save and Continue will not solve the problem. We might need another option underneath Create, let us say Create and Edit Permissions this way you either create a role and return back to the roles page or create a role, then redirect to set the proper permission for the created role

@CrestApps is this make sense to the issue that you - and all we are - facing?

hishamco avatar Jul 08 '22 22:07 hishamco

So we introduced the Save and Continue for a reason, in content items, IMHO there's a need here to add such options. Your thought guys?

hishamco avatar Jul 08 '22 22:07 hishamco

Create = Create the role and go back to the list of roles page Create and Continue = Create the role and go to that role edit page Save = Save the role and go back to the list of roles page Save and Continue = Save the role and stay on that role edit page

That makes sense to me. Though, what @sebastienros means is if that would make sense to have a Shape for this if the pattern can be used in different places.

Skrypt avatar Jul 09 '22 16:07 Skrypt

The above options confuses little bit ;) let us focus on the create page options, Create and Continue might be confusing because many will think it will create a role and continue return back to create a new one

hishamco avatar Jul 09 '22 17:07 hishamco