From 38e59df2cbeac1cc58962eabdfad49942b32c8f6 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 6 Jun 2014 12:56:03 -0400 Subject: [PATCH] 2872: Fix auto-disable/enable "Run" button on pipeline page. --- apps/workbench/app/assets/javascripts/pipeline_instances.js | 2 +- apps/workbench/app/helpers/application_helper.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js index 4b17b4eeb8..54595ab4f5 100644 --- a/apps/workbench/app/assets/javascripts/pipeline_instances.js +++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js @@ -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"); } diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 552e79e699..fd13bc4a8a 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -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, -- 2.30.2