app/views/kublog/posts/_email_form.html.erb in kublog-0.0.1.1 vs app/views/kublog/posts/_email_form.html.erb in kublog-0.9.0

- old
+ new

@@ -1,13 +1,31 @@ -<div style='display:none'> - <%= link_to '#', '#email-template', :class => 'submit_fancybox', :id => 'link-to-email-template' %> - <div id="email-template"> - <h2><%= t('.format_email') %></h2> - <div class='field'> - <%= f.text_area :email_body %> +<div class='field'> + <%= check_box_tag :email_notify, 1, notification.default?, + :checked => false, :class => 'email_checkbox' %> + <%= label_tag :email_notify, t('.email_notification') %> + <% unless user_kinds.empty? %> + <div class='optional'> + <ul> + <% user_kinds.each do |user_kind|%> + <li> + <%= check_box_tag "#{nf.object_name}[roles][]", user_kind, nil %> + <%= label_tag "#{nf.object_name}[roles][#{user_kind}]", user_kind.titleize %> + </li> + <% end %> + </ul> </div> - <div class='field'> - <%= f.submit :id => 'email_submit' %> <%= t('.or') %> - <%= link_to t('.cancel'), '#', :id => 'email_cancel' %> + <% end %> + <div style='display:none' class='optional_lightbox'> + <%= nf.hidden_field :kind, :disabled => !notification.default? %> + <%= link_to '#', '#email-template', :class => 'submit_fancybox', :id => 'link-to-email-template' %> + <div id="email-template"> + <h2><%= t('.format_email') %></h2> + <div class='field'> + <%= nf.text_area :content, :class => 'email_content', :disabled => !notification.default? %> + </div> + <div class='field'> + <%= submit_tag t('.send_email'), :id => 'email_submit' %> <%= t('.or') %> + <%= link_to t('.cancel'), '#', :id => 'email_cancel' %> + </div> </div> </div> </div> \ No newline at end of file