make aspect list visible option on new_aspect pane
This commit is contained in:
parent
dcf6469ded
commit
3ebda174fb
2 changed files with 10 additions and 3 deletions
|
|
@ -37,6 +37,10 @@ class AspectsController < ApplicationController
|
||||||
end
|
end
|
||||||
def create
|
def create
|
||||||
@aspect = current_user.aspects.create(params[:aspect])
|
@aspect = current_user.aspects.create(params[:aspect])
|
||||||
|
#hack, we don't know why mass assignment is not working
|
||||||
|
@aspect.contacts_visible = params[:aspect][:contacts_visible]
|
||||||
|
@aspect.save
|
||||||
|
|
||||||
if @aspect.valid?
|
if @aspect.valid?
|
||||||
flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name)
|
flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name)
|
||||||
if current_user.getting_started
|
if current_user.getting_started
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,12 @@
|
||||||
%p
|
%p
|
||||||
= aspect.label :name , t('.name')
|
= aspect.label :name , t('.name')
|
||||||
= aspect.text_field :name, :maxlength => 20
|
= aspect.text_field :name, :maxlength => 20
|
||||||
= t('aspects.contacts_visible')
|
|
||||||
= aspect.check_box :contacts_visible, :default => true
|
%p.checkbox_select
|
||||||
|
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
|
||||||
|
= aspect.check_box :contacts_visible, :default => true
|
||||||
|
|
||||||
%br
|
%br
|
||||||
= t('aspects.contacts_not_visible')
|
|
||||||
= aspect.submit t('.create'), :class => 'button'
|
= aspect.submit t('.create'), :class => 'button'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue