Commit cc70638a652146bc309836f8a6345511c5a980c3
1 parent
6d178f39
Exists in
master
and in
28 other branches
ActionItem121: added a cancel buton to the display_submit_tag
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1190 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
6 additions
and
3 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -176,8 +176,11 @@ module ApplicationHelper |
176 | 176 | end |
177 | 177 | alias_method :display_form_field, :labelled_form_field |
178 | 178 | |
179 | - def display_submit_tag(label) | |
180 | - content_tag('p', submit_tag( label, :class => 'submit'), :class => 'submitline') | |
179 | + # FIXME: do not use window.history on the cancel button, instead go to the page where the user come from | |
180 | + def display_submit_tag(label, options = {}) | |
181 | + cancel_button = '' | |
182 | + cancel_button = "<input type='button' class='bt_cancel' value='" + _('Cancel') + "' onclick='window.history.back()'> " if options[:with_cancel] | |
183 | + content_tag('p', submit_tag( label, :class => 'submit') + cancel_button, :class => 'submitline') | |
181 | 184 | end |
182 | 185 | |
183 | 186 | ... | ... |
app/views/profile_editor/organization_info.rhtml