Permalink
Browse files

Adding locales to classifieds forms

  • Loading branch information...
1 parent 1ac56ac commit 65e8ba199225da37315139555bd778956b05d386 @chewbranca chewbranca committed Nov 14, 2011
Showing with 7 additions and 6 deletions.
  1. +2 −2 app/views/classifieds/edit.html.haml
  2. +2 −4 app/views/classifieds/new.html.haml
  3. +3 −0 config/locales/en.yml
@@ -68,10 +68,10 @@
= form.input :location_text, :label => 'Location', :hint => t('classifieds.new.hint_classified_location'), :required => false
%li
%label{:for => "classified_listing_type"}= t('classifieds.listing_type.title')
- = form.select :listing_type, options_for_select(Classified.listing_types.map {|c| [t("classifieds.listing_type_strings.#{c}"), c] }, @classified.listing_type)
+ = form.select :listing_type, options_for_select(Classified.listing_types.map {|c| [t("classifieds.listing_type_strings.#{c.to_s}"), c.to_s] }, @classified.listing_type)
%li
%label{:for => "classified_allow_type"}= t('classifieds.allow_type.title')
- = form.select :allow, options_for_select(Classified.allow_types.map {|c| c.to_s }, @classified.allow)
+ = form.select :allow, options_for_select(Classified.allow_types.map {|c| [t("classifieds.allow_type.#{c.to_s}"), c.to_s] }, @classified.allow)
- @classified.categorizations.build if @classified.categorizations.empty?
%fieldset
- form.semantic_fields_for :categorizations do |category_form|
@@ -86,12 +86,10 @@
= form.input :price, :hint => t('.hint_classified_price'), :required => false
%li
%label{:for => "classified_listing_type"}= t('classifieds.listing_type.title')
- -# TODO:: FIXME
- -#= form.select :listing_type, options_for_select(Classified.listing_types.map {|c| [t("classifieds.listing_type_strings.#{c.to_s}"), c.to_s] }, t("classifieds.listing_type_strings.#{@classified.listing_type}"))
- = form.select :listing_type, options_for_select(Classified.listing_types.map {|c| c.to_s }, @classified.listing_type)
+ = form.select :listing_type, options_for_select(Classified.listing_types.map {|c| [t("classifieds.listing_type_strings.#{c.to_s}"), c.to_s] }, @classified.listing_type)
%li
%label{:for => "classified_allow_type"}= t('classifieds.allow_type.title')
- = form.select :allow, options_for_select(Classified.allow_types.map {|c| c.to_s }, @classified.allow)
+ = form.select :allow, options_for_select(Classified.allow_types.map {|c| [t("classifieds.allow_type.#{c.to_s}"), c.to_s] }, @classified.allow)
- @classified.categorizations.build if @classified.categorizations.empty?
%fieldset
- form.semantic_fields_for :categorizations do |category_form|
@@ -493,6 +493,9 @@ en:
title: "Select a listing type"
status: "Status: {{state}}"
allow_type:
+ all: "Public"
+ friends: "Just my friends"
+ friends_of_friends: "Friends of my friends"
title: "Viewable by"
tags:
tags_title: "Tags"

0 comments on commit 65e8ba1

Please sign in to comment.