Chris@1464
|
1 <h3 class="title"><%= l(:permission_add_issue_watchers) %></h3>
|
Chris@1464
|
2
|
Chris@1464
|
3 <%= form_tag({:controller => 'watchers',
|
Chris@1464
|
4 :action => (watched ? 'create' : 'append'),
|
Chris@1464
|
5 :object_type => (watched && watched.class.name.underscore),
|
Chris@1464
|
6 :object_id => watched,
|
Chris@1464
|
7 :project_id => @project},
|
Chris@1464
|
8 :remote => true,
|
Chris@1464
|
9 :method => :post,
|
Chris@1464
|
10 :id => 'new-watcher-form') do %>
|
Chris@1464
|
11
|
Chris@1464
|
12 <p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
Chris@1464
|
13 <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
Chris@1464
|
14 :action => 'autocomplete_for_user',
|
Chris@1464
|
15 :object_type => (watched && watched.class.name.underscore),
|
Chris@1464
|
16 :object_id => watched,
|
Chris@1464
|
17 :project_id => @project) }')" %>
|
Chris@1464
|
18
|
Chris@1464
|
19 <div id="users_for_watcher">
|
Chris@1464
|
20 <%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
|
Chris@1464
|
21 </div>
|
Chris@1464
|
22
|
Chris@1464
|
23 <p class="buttons">
|
Chris@1464
|
24 <%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %>
|
Chris@1464
|
25 <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
Chris@1464
|
26 </p>
|
Chris@1464
|
27 <% end %>
|