29 lines
		
	
	
		
			776 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			776 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <% if @client.editable? %>
 | |
|   <%= form_with(model: client) do |form| %>
 | |
|     <% if client.errors.any? %>
 | |
|       <div style="color: red">
 | |
|         <h2><%= pluralize(client.errors.count, "error") %> prohibited this client from being saved:</h2>
 | |
| 
 | |
|         <ul>
 | |
|           <% client.errors.each do |error| %>
 | |
|             <li><%= error.full_message %></li>
 | |
|           <% end %>
 | |
|         </ul>
 | |
|       </div>
 | |
|     <% end %>
 | |
| 
 | |
|     <% client_form_fields.each do |attrib| %>
 | |
|       <div>
 | |
|         <%= form.label attrib, style: "display: block" %>
 | |
|         <%= form.text_field attrib, value: client.send(attrib) %><br>
 | |
|       </div>
 | |
|     <% end %>
 | |
| 
 | |
|     <div>
 | |
|       <%= form.submit %>
 | |
|     </div>
 | |
|   <% end %>
 | |
| <% else %>
 | |
|   <p>This client is used in multiple subprojects and cannot be edited.</p>
 | |
| <% end %>
 | 
