Fogbugz #48: Form fuer neuen Kontakt angefangen.

This commit is contained in:
gchq 2011-05-04 23:34:36 +02:00
parent 3f1c7b6190
commit 239fd998eb
2 changed files with 31 additions and 2 deletions

View file

@ -3,6 +3,7 @@ class ContactsController < ApplicationController
end
def new
@contact = Contact.new
end
def create

View file

@ -1,2 +1,30 @@
<h1>Contacts#new</h1>
<p>Find me in app/views/contacts/new.html.erb</p>
<h1>New Contact</h1>
<%= form_for @contact, :html => {:class => "new_data_form"} do |f| %>
<fieldset>
<legend>Contact details</legend>
<%= label_tag(:firstname, "First name") %>
<%= f.text_field :firstname %>
<%= label_tag(:lastname, "Last name") %>
<%= f.text_field :lastname %>
<%= label_tag(:street, "Street name") %>
<%= f.text_field :street %>
<%= label_tag(:housenr, "House number") %>
<%= f.text_field :housenr %>
<%= label_tag(:plz, "Zip code") %>
<%= f.text_field :plz %>
<%= label_tag(:place, "Place") %>
<%= f.text_field :place %>
<%= label_tag(:country, "Country") %>
<%= f.text_field :country %>
<%= submit_tag("Save contact") %>
</fieldset>
<% end %>