Chris@1295:
<%= l(:permission_add_issue_watchers) %>
Chris@1295:
Chris@1295: <%= form_tag({:controller => 'watchers',
Chris@1295: :action => (watched ? 'create' : 'append'),
Chris@1295: :object_type => (watched && watched.class.name.underscore),
Chris@1295: :object_id => watched,
Chris@1295: :project_id => @project},
Chris@1295: :remote => true,
Chris@1295: :method => :post,
Chris@1295: :id => 'new-watcher-form') do %>
Chris@1295:
Chris@1295: <%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %>
Chris@1295: <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
Chris@1295: :action => 'autocomplete_for_user',
Chris@1295: :object_type => (watched && watched.class.name.underscore),
Chris@1295: :object_id => watched,
Chris@1295: :project_id => @project) }')" %>
Chris@1295:
Chris@1295:
Chris@1295: <%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
Chris@1295:
Chris@1295:
Chris@1295:
Chris@1295: <%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %>
Chris@1295: <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
Chris@1295:
Chris@1295: <% end %>