<% # encoding: utf-8 %>

<%= form_for(@bulletin_category, :remote => true, :url => @url) do |f| %>
<%#= form_for(@bulletin_category, :remote => true, :url => panel_announcement_back_end_bulletin_category_path(@bulletin_category)) do |f| %>

  <div class="field">
    <%= f.label :key %><br />
    <%= f.text_field :key %>
  </div>
  
  <div class="field">
    <%= f.label :name %><br />
	<%= f.fields_for :i18n_variable, (@bulletin_category.new_record? ? @bulletin_category.build_i18n_variable : @bulletin_category.i18n_variable) do |f| %>
	  <% @site_valid_locales.each do |locale| %>
		<%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %>
		<%= f.text_field locale, :style => "width:130px" %>
	  <% end %>
	<% end %>
  </div>
  
  <div class="field">
	<%= f.label :display %> <br />
	<%#= f.select :display, BulletinCategory::PAYMENT_TYPES, :prompt => 'Select a display method' %>

	<%= f.radio_button :display, "List" %>List
	<%#= f.label :display, 'list', :value => '1', :checked => @a %> 
	<%= f.radio_button :display, "Picture" %>Picture
	<%#= f.label :display, 'picture', :value => '2', :checked => @b %> 
	<br />顯示方式是設定在前台頁面時，資訊所呈現的樣式
  </div>
  
  <div class="actions">
    <%= f.submit %>
  </div>
  
<% end %>
 