Nova Empresa
<% javascript 'dynamic_cidades' %>
<%= error_messages_for :empresa %>
<% form_for((@empresa), :html => {:multipart => true}) do |f| %>
<%= f.collection_select :uf_id, Uf.find(:all, :order => "sigla"), :id, :nome, :prompt => 'Selecione um estado' %>
<%= f.collection_select :cidade_id, Cidade.find(:all, :order => "nome"), :id, :nome, :prompt => 'Selecione uma cidade' %>
<%= f.hidden_field :cidade_id, :id => 'selecionado' %>
Razão Social *
<%= f.text_field :razao_social, :size => 50, :maxlength => 100 %>
Nome Fantasia *
<%= f.text_field :nome_fantasia, :size => 50, :maxlength => 100 %>
CNPJ *
<%= f.text_field :cnpj, :size => 17, :maxlength => 14 %>
Consultar CNPJ
Inscrição Estadual
<%= f.text_field :ie, :size => 17, :maxlength => 17 %>
Consultar I.E.
Telefone
<%= f.text_field :telefone, :size => 17, :maxlength => 15 %>
Fax
<%= f.text_field :fax, :size => 17, :maxlength => 15 %>
E-mail
<%= f.text_field :email, :size => 50, :maxlength => 100 %>
Home Page
<%= f.text_field :site, :size => 50, :maxlength => 100 %>
Logomarca
<%= f.file_field :empresalogo %>
<%= f.submit "Salvar" %>
<% end %>
* Campos obrigatórios
<%= link_to 'Voltar', empresas_path %>