Sha256: a8f4160b8499c17e1d404f065fbf736fd79f5840b940307b2ca7db940b45884a

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

<% if !(session[:help_popups_clearance].nil?) || (Rails.configuration.help_popups_simple_auth == false) %>
	<script>
		function deleteTopic(topic_id){
			if (confirm("Are you sure you want to delete this help topic?")){
				formObj = document.getElementById("deleteForm");
				formObj.submit();
			}
		}
	</script>

	<%= form_for @topic do |f| %>
		<h2>Editing Topic</h2>
		<%= render 'shared/error_messages', :object => f.object %><br/>
		<%= render 'fields', :f => f %>
		<br/>
		<%= f.submit "Edit Topic" %> <input type="button" class="redButton" value="Delete" onclick="deleteTopic(<%= @topic.id %>)"> &nbsp; &nbsp; <input type="button" value="Cancel" onclick="document.location='<%= topics_path %>'">
	<% end %>

	<%= form_tag(topic_path, :method => :delete, :id => "deleteForm") %>
<% 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/>
	<% 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'> &nbsp; &nbsp; <input type='submit' value='Submit'></form>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
help_popups-1.0.5 app/views/help_popups/topics/edit.html.erb
help_popups-1.0.4 app/views/help_popups/topics/edit.html.erb
help_popups-1.0.3 app/views/help_popups/topics/edit.html.erb
help_popups-1.0.2 app/views/help_popups/topics/edit.html.erb
help_popups-1.0.1 app/views/help_popups/topics/edit.html.erb