File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
src/app/Library/CrudPanel/Traits Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,19 @@ public function getSaveActionDefaultForCurrentOperation()
2424 */
2525 public function getFallBackSaveAction ()
2626 {
27- //we get the higher order in save actions array. It will return something only when explicit by developer
27+ //we get the higher order in save actions array. By default it would be `save_and_back`
2828 $ higherAction = $ this ->getSaveActionByOrder (1 );
2929
30- if ( empty ( $ higherAction )) {
31- if ( $ this -> hasOperationSetting ( ' defaultSaveAction ' ) ) {
32- return $ this -> getOperationSetting ( ' defaultSaveAction ' );
33- }
30+ // if there is an higher action and that action is not the backpack default higher one `save_and_back` we return it.
31+ if (! empty ( $ higherAction ) && key ( $ higherAction ) !== ' save_and_back ' ) {
32+ return key ( $ higherAction );
33+ }
3434
35- return $ this ->getSaveActionDefaultForCurrentOperation ();
35+ if ($ this ->hasOperationSetting ('defaultSaveAction ' )) {
36+ return $ this ->getOperationSetting ('defaultSaveAction ' );
3637 }
3738
38- return key ( $ higherAction );
39+ return $ this -> getSaveActionDefaultForCurrentOperation ( );
3940 }
4041
4142 /**
You can’t perform that action at this time.
0 commit comments