Fix link not showing for default front end

This commit is contained in:
chris 2013-03-19 18:23:35 +08:00
parent f3c809fd58
commit ff30b3d05e
1 changed files with 6 additions and 1 deletions

View File

@ -93,8 +93,10 @@ helper Admin::PagePartsHelper
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
end
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type], params[:page][:frontend_field_is_link] ) if params[:page][:frontend_field]
params[:page][:frontend_field_type] = nil
params[:page][:frontend_field_is_link] = nil
if params[:page][:tag] && params[:page][:tag].include?("nil")
params[:page][:tag] = []
@ -104,6 +106,9 @@ helper Admin::PagePartsHelper
params[:page][:category] = []
end
params[:page][:frontend_field].each{|t| t[2] = (t[2]=="true" ? true : false )} if !params[:page][:frontend_field].blank?
if @item.update_attributes(params[:page])
flash[:notice] = t('update.success.page')
respond_to do |format|