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