From aad5855aa388f5d54ed42b25c1387d264c297e77 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 28 Jun 2015 03:37:48 +0200 Subject: [PATCH] Added onSubmitCallback for modal controller. --- .../app/controllers/_application_controller.js.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index c31b1dc1b..228d65d39 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -607,6 +607,8 @@ class App.ControllerModal extends App.Controller onSubmit: (e) => e.preventDefault() + if @onSubmitCallback + @onSubmitCallback() @log 'error', 'You need to implement your own "onSubmit" method!' class App.ErrorModal extends App.ControllerModal