2012-01-09 22:37:16 +04:00
|
|
|
<h3 class="title"><%= l(:permission_add_issue_watchers) %></h3>
|
|
|
|
|
2012-07-18 22:48:39 +04:00
|
|
|
<%= form_tag({:controller => 'watchers',
|
|
|
|
:action => (watched ? 'create' : 'append'),
|
|
|
|
:object_type => watched.class.name.underscore,
|
|
|
|
:object_id => watched},
|
|
|
|
:remote => true,
|
|
|
|
:method => :post,
|
|
|
|
:id => 'new-watcher-form') do %>
|
2012-01-09 22:37:16 +04:00
|
|
|
|
|
|
|
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
2012-01-09 22:37:16 +04:00
|
|
|
:action => 'autocomplete_for_user',
|
|
|
|
:object_type => watched.class.name.underscore,
|
2012-07-22 17:29:26 +04:00
|
|
|
:object_id => watched) }')" %>
|
2012-01-09 22:37:16 +04:00
|
|
|
|
|
|
|
<div id="users_for_watcher">
|
2012-03-24 16:57:28 +04:00
|
|
|
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
|
2012-01-09 22:37:16 +04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="buttons">
|
|
|
|
<%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %>
|
|
|
|
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|