app/views/help_popups/topics/new.html.erb in help_popups-1.0.0 vs app/views/help_popups/topics/new.html.erb in help_popups-1.0.1
- old
+ new
@@ -1,7 +1,17 @@
-<%= form_for @topic do |f| %>
- <h2>Adding New Topic</h2>
- <%= render 'shared/error_messages', :object => f.object %><br/>
- <%= render 'fields', :f => f %>
+<% if !(session[:help_popups_clearance].nil?) || (Rails.configuration.help_popups_simple_auth == false) %>
+ <%= form_for @topic do |f| %>
+ <h2>Adding New Topic</h2>
+ <%= render 'shared/error_messages', :object => f.object %><br/>
+ <%= render 'fields', :f => f %>
+ <br/>
+ <%= f.submit "Add Topic" %> <input type="button" value="Cancel" onclick="document.location='<%= topics_path %>'">
+ <% end %>
+<% else %>
+ You must login before you can access the Help Popups administration.<br/>
+ Please enter the password you defined for <b>config.help_popups_password</b>: <br/>
<br/>
- <%= f.submit "Add Topic" %> <input type="button" value="Cancel" onclick="document.location='<%= topics_path %>'">
+ <% flash.each do |key, value| %>
+ <%= content_tag(:div, value, :class => "flash #{key}") %>
+ <% end %>
+ <form action='/help_popups/login' method='post'><input type='text' size='20' id='help_popups_password' name='help_popups_password'> <input type='submit' value='Submit'></form>
<% end %>
\ No newline at end of file