Skip to content

Commit

Permalink
Merge pull request #54 from timble/feature/53-koowajs
Browse files Browse the repository at this point in the history
Merge Feature/53 koowajs
  • Loading branch information
ercanozkaya authored Jan 14, 2019
2 parents ac04b68 + 3086a58 commit 3e37476
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 68 deletions.
9 changes: 9 additions & 0 deletions dist/js/koowa.js
Original file line number Diff line number Diff line change
Expand Up @@ -1592,13 +1592,22 @@ Koowa.Controller.Grid = Koowa.Controller.extend({
* Controller class specialized for forms, extends Koowa.Controller
*/
Koowa.Controller.Form = Koowa.Controller.extend({
_actionDelete: function(context) {
context.method = 'delete';

return this._actionDefault(context);
},
_actionDefault: function(context){
if (context.validate && !this.trigger('validate', [context])) {
return false;
}

this.form.append($('<input/>', {name: '_action', type: 'hidden', value: context.action}));

if (context.method) {
this.form.append($('<input/>', {name: '_method', type: 'hidden', value: context.method}));
}

this.trigger('submit', [context]);
this.form.submit();
}
Expand Down
2 changes: 1 addition & 1 deletion dist/js/koowa.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e37476

Please sign in to comment.