Project

General

Profile

« Previous | Next » 

Revision 676cb428

Added by Marc Dequènes about 16 years ago

  • ID 676cb4287e4a0318bd7fd51e706f6265c4d4a2ec

[fix] remove hardcoded submit label in display_standard_form_buttons() helper and propagate submit_label view variable to it

View differences:

app/helpers/application_helper.rb
" <span class=\"middle\">" + text + "</span>", new_polymorphic_path(res.dup))
end
def display_standard_form_buttons
def display_standard_form_buttons(submit_label)
res = resource_family(resource_model.new)
"<div class=\"actions\">" + display_image_submit_tag('actions/gtk-ok', :medium, :title => _("Add")) +
"<div class=\"actions\">" + display_image_submit_tag('actions/gtk-ok', :medium, :title => submit_label) +
"<div class=\"big-action-placeholder\"></div>" +
link_to(display_icon_tag('actions/gtk-cancel', :medium, :title => _("Cancel")), polymorphic_path(res.dup)) +
"</div>"
app/views/admin/artwork_conditions/_form.rhtml
<%=
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_groups/_form.rhtml
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
form_comment(table)
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_materials/_form.rhtml
<%=
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_placement_reasons/_form.rhtml
<%=
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_sets/_form.rhtml
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
form_comment(table)
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_sizes/_form.rhtml
table.field :height, _("Height (cm):"), :text_field, :value => mm_to_cm(@artwork_size.height), :size => 5
table.field :width, _("Width (cm):"), :text_field, :value => mm_to_cm(@artwork_size.width), :size => 5
table.field :standard, _("Standard?"), :check_box
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artwork_step_images/_form.rhtml
table.field :date, _("Date:"), :date_select
table.field :uploaded_data, _("Image:"), :file_field
form_comment(table)
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/artworks/_form.rhtml
end
form_comment(cat)
end
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%
app/views/admin/techniques/_form.rhtml
stacking_form(f) do |table|
table.field :name, _("Name:"), :text_field
table.field :acronym, _("Acronym:"), :text_field, :size => 4
table.content display_standard_form_buttons
table.content display_standard_form_buttons(submit_label)
end
%>
<%

Also available in: Unified diff