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