30 lines
		
	
	
		
			642 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			642 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <% if flash[:error].present? %>
 | |
|   <div class="error">
 | |
|     <%= flash[:error] %>
 | |
|     <p>
 | |
|       <% quiz.errors.messages.each do |k,v| %>
 | |
|         <%= "#{k.to_s} #{v.join(' and ')}" %><br />
 | |
|       <% end %>
 | |
|     </p>
 | |
|   </div>
 | |
| <% end %>
 | |
| 
 | |
| <%= form_for quiz, url: action do |form| %>
 | |
|   <div class="form-group">
 | |
|     <%= form.label :name, "Quiz Description" %>
 | |
|     <%= form.text_field :name %>
 | |
|   </div>
 | |
| 
 | |
|   <div class="form-group">
 | |
|     <%= form.label :dept, 'Department' %>
 | |
|     <%= form.text_field :dept %>
 | |
|   </div>
 | |
| 
 | |
|   <div class="form-group">
 | |
|     <%= form.label :unit, 'Unit' %>
 | |
|     <%= form.text_field :unit %>
 | |
|   </div>
 | |
| 
 | |
|   <%= form.submit %>
 | |
| <% end %>
 |