summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-23 14:58:30 +0200
committerAzul <azul@leap.se>2014-04-25 12:18:40 +0200
commit689c10b618c6c469ce82a7f09e117567def577de (patch)
tree2e0d37efb7821ac65f03056a28366809c786d50d /app
parent76ad25ba0ee344f185f8e8cdfe066685cd3b0447 (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 'app')
-rw-r--r--app/views/sessions/new.html.haml4
-rw-r--r--app/views/users/new.html.haml4
2 files changed, 2 insertions, 6 deletions
diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml
index 316eec1..6f3b324 100644
--- a/app/views/sessions/new.html.haml
+++ b/app/views/sessions/new.html.haml
@@ -6,6 +6,4 @@
= simple_form_for [:api, @session], :validate => true, :html => { :id => :new_session, :class => 'form-horizontal' } do |f|
= f.input :login, :required => false, :label => t(:username), :input_html => { :id => :srp_username }
= f.input :password, :required => false, :input_html => { :id => :srp_password }
- .form-actions
- = f.button :submit, :value => t(:login), :class => 'btn-primary'
- = link_to t(:cancel), home_path, :class => 'btn'
+ = f.button :wrapped, value: t(:login), cancel: home_path
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml
index 173dd8c..3478989 100644
--- a/app/views/users/new.html.haml
+++ b/app/views/users/new.html.haml
@@ -13,7 +13,5 @@
= f.input :login, :label => t(:username), :required => false, :input_html => { :id => :srp_username }
= f.input :password, :required => false, :validate => true, :input_html => { :id => :srp_password }
= f.input :password_confirmation, :required => false, :validate => true, :input_html => { :id => :srp_password_confirmation }
- .form-actions
- = f.button :submit, :value => t(:signup), :class => 'btn btn-primary'
- = link_to t(:cancel), home_path, :class => 'btn'
+ = f.button :wrapped, value: t(:signup), cancel: home_path