Facebox needs to get back a text/html response. We were using text/javascript to indicate that we wanted a remote form and text/html to indicate we wanted a non-remote form. The trouble is, if we request with text/javascript then that is the format we get back. It doesn't really make sense to use formats that way anyway, so I changed it to an explicit parameter. This had the nice side effect of simplifying our new-aspect views.
26 lines
861 B
Text
26 lines
861 B
Text
-# Copyright (c) 2010, Diaspora Inc. This file is
|
|
-# licensed under the Affero General Public License version 3 or later. See
|
|
-# the COPYRIGHT file.
|
|
|
|
.span-12.last
|
|
#facebox_header
|
|
%h3
|
|
= t('contacts.index.add_a_new_aspect')
|
|
|
|
= form_for(Aspect.new, :remote => @remote) do |aspect|
|
|
= aspect.error_messages
|
|
- if @person_id
|
|
= aspect.hidden_field :person_id, :value => @person_id
|
|
%p
|
|
= aspect.label :name , t('.name')
|
|
= aspect.text_field :name, :maxlength => 20
|
|
|
|
%p.checkbox_select
|
|
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
|
|
= aspect.check_box :contacts_visible, :default => true
|
|
|
|
%br
|
|
|
|
.bottom_submit_section
|
|
= submit_tag t('cancel'), :class => 'button', :type => :reset, :rel => "close"
|
|
= aspect.submit t('.create'), :class => 'button creation'
|