summaryrefslogtreecommitdiffstats
path: root/app/views/watchers/_new.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-09 18:37:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-09 18:37:16 +0000
commit1b1c510ff99cfca216082926e5ce9e2e981b2506 (patch)
treeae25be505ae388435276a44a7755186c70ebe5e7 /app/views/watchers/_new.html.erb
parentc22f60271f7c6726a28b2a319041c11b2a782b5e (diff)
downloadredmine-1b1c510ff99cfca216082926e5ce9e2e981b2506.tar.gz
redmine-1b1c510ff99cfca216082926e5ce9e2e981b2506.zip
Ability to add non-member users as watchers (#5159).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8592 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/watchers/_new.html.erb')
-rw-r--r--app/views/watchers/_new.html.erb30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/watchers/_new.html.erb b/app/views/watchers/_new.html.erb
new file mode 100644
index 000000000..56a122a51
--- /dev/null
+++ b/app/views/watchers/_new.html.erb
@@ -0,0 +1,30 @@
+<h3 class="title"><%= l(:permission_add_issue_watchers) %></h3>
+
+<% form_remote_tag :url => {:controller => 'watchers',
+ :action => 'create',
+ :object_type => watched.class.name.underscore,
+ :object_id => watched},
+ :method => :post,
+ :html => {:id => 'new-watcher-form'} do %>
+
+ <p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
+ <%= observe_field(:user_search,
+ :frequency => 0.5,
+ :update => :users_for_watcher,
+ :method => :get,
+ :url => {
+ :controller => 'watchers',
+ :action => 'autocomplete_for_user',
+ :object_type => watched.class.name.underscore,
+ :object_id => watched},
+ :with => 'q') %>
+
+ <div id="users_for_watcher">
+ <%= principals_check_box_tags 'watcher[user_ids][]', watched.addable_watcher_users %>
+ </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 %>