ItEr47S14RFControlesRelacionadosPermismosItEr46S15: When the status is STORED, changes to a different one and then changes back to STORED, the save buttons are disabled again.
This commit is contained in:
parent
bec1af921f
commit
8fb3f25dd7
1 changed files with 10 additions and 0 deletions
|
|
@ -423,6 +423,7 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
setEditionDisabled(true);
|
||||
}
|
||||
orderAuthorizationController.initEdit((Order) orderModel.getOrder());
|
||||
initialStatus = order.getState();
|
||||
initializeTabs();
|
||||
showWindow(editWindow);
|
||||
}
|
||||
|
|
@ -604,6 +605,7 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
setEditionDisabled(true);
|
||||
}
|
||||
orderAuthorizationController.initEdit(order);
|
||||
initialStatus = order.getState();
|
||||
showEditWindow(_("Edit order"));
|
||||
}
|
||||
else {
|
||||
|
|
@ -1014,6 +1016,8 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
((Button)editWindow.getFellowIfAny("save_and_continue")).setDisabled(disabled);
|
||||
}
|
||||
|
||||
private OrderStatusEnum initialStatus;
|
||||
|
||||
public void onStatusChange() {
|
||||
Order order = (Order)orderModel.getOrder();
|
||||
if(orderModel.userCanWrite(order, SecurityUtils.getSessionUserLoginName())
|
||||
|
|
@ -1022,5 +1026,11 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
//any other one
|
||||
setEditionDisabled(false);
|
||||
}
|
||||
if(initialStatus == OrderStatusEnum.STORED &&
|
||||
order.getState() == OrderStatusEnum.STORED) {
|
||||
//Status was STORED, it was changed to a different one and then
|
||||
//changed back to STORED, so we have to disable the save buttons
|
||||
setEditionDisabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue