To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / plugins / redmine_bibliography / app / views / publications / _add_project_form.html.erb @ 1286:d0d6bbe9f2e0

History | View | Annotate | Download (1.17 KB)

1
<% form_remote_for(:publication, 
2
                     :url => {:controller => 'publications', :action => 'add_project', :id => @publication, :project_id => @project}, 
3
                     :method => :post,
4
                     :html => { :id => 'add_project_form' }, 
5
                                                                           :loading => "$('project-add-submit').disable()",
6
                                                                           :complete => "$('project-add-submit').enable()") do |f| %>
7
                                                                <fieldset><legend><%=l(:label_add_project_to_publication)%></legend>
8
              <p>
9
                <%= label_tag "project_search", l(:label_project_search) %><%= text_field_tag 'project_search', nil %>
10
              </p>
11
             
12
              <%= observe_field(:project_search,
13
               :frequency => 0.5,
14
               :update => :projects,
15
               :url => { :controller => 'publications', :action => 'autocomplete_for_project', :id => @publication },
16
               :with => 'q')
17
                %>
18

    
19
                                        <div id="projects">
20
                                        <% if params[:q] && params[:q].length > 1 %>
21
                                            <%= projects_check_box_tags 'project[project_ids][]', @projects %>
22
                                        <% end %>
23
                                        </div>
24

    
25
        <p><%= submit_tag l(:button_add), :id => 'project-add-submit' %></p>
26
    
27
    
28
      </fieldset>
29
  <% end %>