|
|
|
@ -44,20 +44,20 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="single-attribute"> |
|
|
|
|
<%= form_for(:watcher, |
|
|
|
|
url: watchers_path(watched.class.name.underscore.pluralize, watched), |
|
|
|
|
method: :post, |
|
|
|
|
remote: true, |
|
|
|
|
complete: "Form.Element.focus('watcher_user_id');", |
|
|
|
|
html: { id: 'new-watcher-form', style: (@watcher ? '' : 'display:none;') }) do |f| %> |
|
|
|
|
<div class="grid-block"> |
|
|
|
|
<div class="grid-content small-6"> |
|
|
|
|
<%= labelled_tabular_form_for(:watcher, |
|
|
|
|
url: watchers_path(watched.class.name.underscore.pluralize, watched), |
|
|
|
|
method: :post, |
|
|
|
|
remote: true, |
|
|
|
|
complete: "Form.Element.focus('watcher_user_id');", |
|
|
|
|
html: { id: 'new-watcher-form', style: (@watcher ? '' : 'display:none;') }) do |f| %> |
|
|
|
|
<div class="choice"> |
|
|
|
|
<div class="choice--select"> |
|
|
|
|
<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}.sort_by{|name, id | name}), |
|
|
|
|
{ :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" }, |
|
|
|
|
class: 'form--select' %> |
|
|
|
|
{ :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---", no_label: true } %> |
|
|
|
|
|
|
|
|
|
<%= submit_tag l(:button_add), class: 'button -highlight' %> |
|
|
|
|
<%= toggle_link l(:button_cancel), 'new-watcher-form', {}, class: 'button' %> |
|
|
|
|
</div> |
|
|
|
|
<div class="choice--button"> |
|
|
|
|
<%= submit_tag l(:button_add), class: 'button' %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|