3016: prefill input search with value configured in the template
authorradhika <radhika@curoverse.com>
Wed, 30 Jul 2014 18:16:51 +0000 (14:16 -0400)
committerradhika <radhika@curoverse.com>
Wed, 30 Jul 2014 18:16:51 +0000 (14:16 -0400)
apps/workbench/app/helpers/application_helper.rb
apps/workbench/app/views/application/_choose.html.erb

index 1b186c5420fc85739559fe0fabbf8bb20204bf93..ec29b03a2d3f77e8dedfe62370b7c0119d985e0b 100644 (file)
@@ -266,6 +266,7 @@ module ApplicationHelper
          action_name: 'OK',
          action_href: pipeline_instance_path(id: object.uuid),
          action_method: 'patch',
+         preconfigured_search_str: "#{value_info[:search_for]}",
          action_data: {
            merge: true,
            selection_param: selection_param,
index d006a112b77d05eb73883a07bc8bc38ffa08c4fd..0d3f71b12459604e099fd5926e8159c9eefbe3c2 100644 (file)
@@ -32,7 +32,7 @@
               </ul>
             </div>
           <% end %>
-          <input type="text" class="form-control filterable-control focus-on-display" placeholder="Search" data-filterable-target=".modal.arv-choose .selectable-container"/>
+          <input type="text" value="<%=params[:preconfigured_search_str] || ''%>" class="form-control filterable-control focus-on-display" placeholder="Search" data-filterable-target=".modal.arv-choose .selectable-container"/>
         </div>
         <div style="height: 1em" />