diff options
author | Azul <azul@leap.se> | 2014-04-23 14:58:30 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-04-25 12:18:40 +0200 |
commit | 689c10b618c6c469ce82a7f09e117567def577de (patch) | |
tree | 2e0d37efb7821ac65f03056a28366809c786d50d /engines/support/app/views/tickets/new.html.haml | |
parent | 76ad25ba0ee344f185f8e8cdfe066685cd3b0447 (diff) |
simple form: add wrapped and loading... buttons #5542
the loading... text on the buttons was not capitalized before.
So in order to change this in a (more or less) single place i added
new button types to simple_form:
button :wrapped - normal button, with loading and an optional cancel button wrapped in the classical bootstrap action div.
cancel option contains the url to go to when canceling.
button :loading - simple button with loading text capitalized by using i18n (simple_form.buttons.loading)
Conflicts:
engines/support/app/views/tickets/new.html.haml
Diffstat (limited to 'engines/support/app/views/tickets/new.html.haml')
-rw-r--r-- | engines/support/app/views/tickets/new.html.haml | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/support/app/views/tickets/new.html.haml b/engines/support/app/views/tickets/new.html.haml index 65ed67b..ab008d2 100644 --- a/engines/support/app/views/tickets/new.html.haml +++ b/engines/support/app/views/tickets/new.html.haml @@ -14,9 +14,4 @@ = c.input :body, :label => t(:description), :as => :text, :input_html => {:class => "full-width", :rows=> 5} - if admin? = c.input :private, :as => :boolean, :label => false, :inline_label => true - .form-actions - = f.button :submit, :class => 'btn-primary', :value => t(:create_thing, :thing => t(:ticket)) - - if logged_in? - = link_to t(:cancel), auto_tickets_path, :class => :btn - - else - = link_to t(:cancel), home_path, :class => 'btn' + = f.button :wrapped, cancel: (logged_in? ? auto_tickets_path : home_path) |