Changes between Initial Version and Version 1 of Ticket #5681, comment 4
- Timestamp:
- Jun 23, 2011, 4:49:44 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5681, comment 4
initial v1 1 Use case: When I have a model with admin attribute `save_as = True`, and save it via admin in a way that it triggers validation (ie. some fields are missing or incorrect).1 Use case: When I have a model with admin attribute `save_as = True`, and save it via admin in a way that it triggers validation errors (ie. some fields are missing or incorrect). 2 2 3 3 Users Uninen (the original reporter) and Cornel (in comment:2) report three issues here: 4 4 5 5 1. In that case the user should be presented the same form (the "edit" form instead of the "add" form as it happens currently), because as long as the form is not valid the instance should be the same. 6 2. ''Save as new'' button disappears from the page (it is replaced by the usual ''Save and add another'' button of an "add" form. 6 2. ''Save as new'' button disappears from the page (it is replaced by the usual ''Save and add another'' button of an "add" form.) 7 7 3. After correcting the given values, when saving the object, it's saved on top of the old object and not as a new as was intended. 8 8 9 9 Currently item 3 (the only that would cause data loss) doesn't happen anymore (possibly some other work in the area during the last three years fixed it). A new model instance is created when you press either the ''Save and add another'', ''Save an continue editing'' or ''Save'' buttons. 10 10 11 I don't agree with items 1 and 2, once the user has made the decision she wants to create a clone copy of the original model instance, the form shown after a validation error doesn't have to be the one pointing to the original object. IMHO it is better the way it works now: An "add" form is shown with all the valid field pre-filled and all the possible save optionscreate a new model instance without endangering the original one.11 I don't agree with items 1 and 2, once the user has made the decision she wants to create a clone copy of the original model instance, the form shown after a validation error doesn't have to be the one pointing to the original object. IMHO it is better the way it works now: An "add" form is shown with all the valid fields pre-filled and all the possible save options do create a new model instance without endangering the original one. 12 12 13 13 I'm moving back this ticket to Decision needed.