<% # Render as follows: # # render( # :partial => 'edit', # :locals => { # :currency => , # :action => :create | :update # } # ) # # ...where is the currency to edit, :action is used for the # internationalised text in the 'submit' action button. In addition, a # "delete" button is shown for the :update case. form_for( currency ) do | f | %> <%= f.error_messages %>

<%= f.label :name %>
<%= f.text_field :name, :size => 30, :maxlength => Currency::MAXLEN_NAME %>

<%= f.label :code %> (ISO 4217) (?) <%= f.text_field :code, :size => 5, :maxlength => Currency::MAXLEN_CODE %>

<%= f.label :symbol %> <%= apphelp_view_hint( :symbol_hint ) %>
<%= f.text_field :symbol, :size => 30, :maxlength => Currency::MAXLEN_SYMBOL %>

<%= f.label :show_after_number %> <%= f.check_box :show_after_number %>

<%= f.label :decimal_precision %>
<%= currencyhelp_decimal_precision_menu( :form => f ) %>

<%= f.label :rounding_algorithm %>
<%= currencyhelp_rounding_algorithm_menu( :form => f ) %>

<%= f.label :formatting_template %>
<%= f.text_field :integer_template, :size => Currency::MAXLEN_INTEGER_TEMPLATE, :maxlength => Currency::MAXLEN_INTEGER_TEMPLATE %> <%= f.text_field :delimiter, :size => 3, :maxlength => Currency::MAXLEN_DELIMITER %> <%= f.text_field :fraction_template, :size => Currency::MAXLEN_FRACTION_TEMPLATE, :maxlength => Currency::MAXLEN_FRACTION_TEMPLATE %>

<%= apphelp_submit( f, action ) %> <% if ( action == :create ) -%> <%= apphelp_protected_button_to( :index, { :method => :currencies_path } ) %> <% else -%> <%= apphelp_protected_buttons_to( nil, [ :show, { :method => :currency_path }, @currency ], [ :index, { :method => :currencies_path } ] ) %> <% end -%>
<% end %>