2872: Fix auto-disable/enable "Run" button on pipeline page.
authorTom Clegg <tom@curoverse.com>
Fri, 6 Jun 2014 16:56:03 +0000 (12:56 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 6 Jun 2014 16:56:03 +0000 (12:56 -0400)
apps/workbench/app/assets/javascripts/pipeline_instances.js
apps/workbench/app/helpers/application_helper.rb

index 4b17b4eeb8528028ed05fea3927d433850378064..54595ab4f53ee4978427835b91511c34fad95d5d 100644 (file)
@@ -1,5 +1,5 @@
 function run_pipeline_button_state() {
-    var a = $('a.editable.required.editable-empty');
+    var a = $('a.editable.required.editable-empty,input.form-control.required[value=]');
     if (a.length > 0) {
         $(".run-pipeline-button").addClass("disabled");
     }
index 552e79e699739f4f1e6b02390304c6dcff55cf43..fd13bc4a8aa2f7cb9e72185d7839377336901e93 100644 (file)
@@ -267,7 +267,9 @@ module ApplicationHelper
          }.to_json,
         })
       return content_tag('div', :class => 'input-group') do
-        html = text_field_tag(dn, display_value, :class => 'form-control')
+        html = text_field_tag(dn, display_value,
+                              :class =>
+                              "form-control #{'required' if required}")
         html + content_tag('span', :class => 'input-group-btn') do
           link_to('Choose',
                   modal_path,