diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.coffee
index c9814a085..e33e18f45 100644
--- a/app/assets/javascripts/app/controllers/_application_controller_form.coffee
+++ b/app/assets/javascripts/app/controllers/_application_controller_form.coffee
@@ -511,7 +511,6 @@ class App.ControllerForm extends App.Controller
else
form = $(form)
- #console.log('FF', form)
# get form
if form.is('form') is true
#console.log('direct from')
@@ -534,15 +533,20 @@ class App.ControllerForm extends App.Controller
lookupForm = @findForm(form)
if lookupForm
+ if lookupForm.is('button, input, select, textarea, div, span')
+ App.Log.debug 'ControllerForm', 'disable item...', lookupForm
+ lookupForm.attr('readonly', true)
+ lookupForm.attr('disabled', true)
+ return
App.Log.debug 'ControllerForm', 'disable form...', lookupForm
# set forms to read only during communication with backend
lookupForm.find('button, input, select, textarea').attr('readonly', true)
# disable additionals submits
- lookupForm.find('button.btn').attr('disabled', true)
+ lookupForm.find('button').attr('disabled', true)
else
- App.Log.notice 'ControllerForm', 'disable item...', form
+ App.Log.debug 'ControllerForm', 'disable item...', form
form.attr('readonly', true)
form.attr('disabled', true)
@@ -551,15 +555,20 @@ class App.ControllerForm extends App.Controller
lookupForm = @findForm(form)
if lookupForm
+ if lookupForm.is('button, input, select, textarea, div, span')
+ App.Log.debug 'ControllerForm', 'disable item...', lookupForm
+ lookupForm.attr('readonly', false)
+ lookupForm.attr('disabled', false)
+ return
App.Log.debug 'ControllerForm', 'enable form...', lookupForm
# enable fields again
lookupForm.find('button, input, select, textarea').attr('readonly', false)
# enable submits again
- lookupForm.find('button.btn').attr('disabled', false)
+ lookupForm.find('button').attr('disabled', false)
else
- App.Log.notice 'ControllerForm', 'enable item...', form
+ App.Log.debug 'ControllerForm', 'enable item...', form
form.attr('readonly', false)
form.attr('disabled', false)
diff --git a/app/views/tests/form_find.html.erb b/app/views/tests/form_find.html.erb
new file mode 100644
index 000000000..3f8b84f93
--- /dev/null
+++ b/app/views/tests/form_find.html.erb
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/routes/test.rb b/config/routes/test.rb
index 986d311c7..9e2a315ec 100644
--- a/config/routes/test.rb
+++ b/config/routes/test.rb
@@ -5,6 +5,7 @@ Zammad::Application.routes.draw do
match '/tests_model', to: 'tests#model', via: :get
match '/tests_model_ui', to: 'tests#model_ui', via: :get
match '/tests_form', to: 'tests#form', via: :get
+ match '/tests_form_find', to: 'tests#form_find', via: :get
match '/tests_form_trim', to: 'tests#form_trim', via: :get
match '/tests_form_extended', to: 'tests#form_extended', via: :get
match '/tests_form_validation', to: 'tests#form_validation', via: :get
diff --git a/public/assets/tests/form_find.js b/public/assets/tests/form_find.js
new file mode 100644
index 000000000..8474dc541
--- /dev/null
+++ b/public/assets/tests/form_find.js
@@ -0,0 +1,39 @@
+
+// form
+test( "find form check", function() {
+
+ $('#forms').append('