@@ -107,22 +107,33 @@ public function onDatabaseTableMigrationApply()
107
107
$ this ->controller ->widget ->versionList ->refreshActivePlugin ()
108
108
);
109
109
110
- $ widget = $ this ->makeBaseFormWidget ($ table );
111
- $ this ->vars ['tableName ' ] = $ table ;
112
-
113
- $ result ['builderResponseData ' ] = [
114
- 'builderObjectName ' =>$ table ,
115
- 'tabId ' => $ this ->getTabId ($ table ),
116
- 'tabTitle ' => $ table ,
117
- 'tableName ' => $ table ,
118
- 'operation ' => $ operation ,
119
- 'pluginCode ' => $ pluginCode ->toCode (),
120
- 'tab ' => $ this ->makePartial ('tab ' , [
121
- 'form ' => $ widget ,
122
- 'pluginCode ' => $ this ->getPluginCode ()->toCode (),
123
- 'tableName ' => $ table
124
- ])
125
- ];
110
+ if ($ operation === 'delete ' ) {
111
+ $ result ['builderResponseData ' ] = [
112
+ 'builderObjectName ' => $ table ,
113
+ 'tabId ' => $ this ->getTabId ($ table ),
114
+ 'tabTitle ' => $ table ,
115
+ 'tableName ' => $ table ,
116
+ 'operation ' => $ operation ,
117
+ 'pluginCode ' => $ pluginCode ->toCode ()
118
+ ];
119
+ } else {
120
+ $ widget = $ this ->makeBaseFormWidget ($ table );
121
+ $ this ->vars ['tableName ' ] = $ table ;
122
+
123
+ $ result ['builderResponseData ' ] = [
124
+ 'builderObjectName ' => $ table ,
125
+ 'tabId ' => $ this ->getTabId ($ table ),
126
+ 'tabTitle ' => $ table ,
127
+ 'tableName ' => $ table ,
128
+ 'operation ' => $ operation ,
129
+ 'pluginCode ' => $ pluginCode ->toCode (),
130
+ 'tab ' => $ this ->makePartial ('tab ' , [
131
+ 'form ' => $ widget ,
132
+ 'pluginCode ' => $ this ->getPluginCode ()->toCode (),
133
+ 'tableName ' => $ table
134
+ ])
135
+ ];
136
+ }
126
137
127
138
return $ result ;
128
139
}
0 commit comments