From 2cf1371f2d3680304f8d69c6eff0dba331f6d06c Mon Sep 17 00:00:00 2001 From: petusa Date: Thu, 25 May 2017 15:08:21 +0400 Subject: [PATCH] Disable button upon form submission with progress indication - Font Awesome progress indicator/spinner Icon added to Get Beta Access button in a declarative way - dependencies added to Gemfile and assets application resources (js/css) - en/de language files updated with please_wait translation - Gemfile.lock updated - previous obsolete code parts removed => I know it has just been replaced lately --- Gemfile | 4 ++++ Gemfile.lock | 23 +++++++++++++---------- app/assets/javascripts/application.js | 1 + app/assets/stylesheets/application.scss | 1 + app/views/invite/index.html.erb | 11 ++--------- config/locales/de.yml | 1 + config/locales/en.yml | 1 + 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index f1bc2463..1c041e83 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,10 @@ gem 'coffee-rails', '~> 4.1.0' gem 'jquery-rails' +# Use font awesome as the fancy icontastic library + +gem "font-awesome-rails" + # Added by Felix gem 'fastlane', '>= 2.33.0', '< 3.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 2a829957..61db3e40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) arel (6.0.4) - autoprefixer-rails (6.7.7.2) + autoprefixer-rails (7.1.1) execjs babosa (1.0.2) binding_of_caller (0.7.2) @@ -62,7 +62,7 @@ GEM commander-fastlane (4.4.4) highline (~> 1.7.2) concurrent-ruby (1.0.5) - debug_inspector (0.0.2) + debug_inspector (0.0.3) domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) dotenv (2.2.1) @@ -77,7 +77,7 @@ GEM faraday_middleware (0.11.0.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.0) - fastlane (2.33.0) + fastlane (2.35.0) CFPropertyList (>= 2.3, < 3.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -109,6 +109,8 @@ GEM xcodeproj (>= 1.4.4, < 2.0.0) xcpretty (>= 0.2.4, < 1.0.0) xcpretty-travis-formatter (>= 0.0.3) + font-awesome-rails (4.7.0.2) + railties (>= 3.2, < 5.2) gh_inspector (1.0.3) globalid (0.4.0) activesupport (>= 4.2.0) @@ -148,7 +150,7 @@ GEM multi_json (~> 1.10) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.4) + mail (2.6.5) mime-types (>= 1.16, < 4) memoist (0.15.0) mime-types (3.1) @@ -156,18 +158,18 @@ GEM mime-types-data (3.2016.0521) mini_magick (4.5.1) mini_portile2 (2.1.0) - minitest (5.10.1) + minitest (5.10.2) multi_json (1.12.1) multi_xml (0.6.0) multipart-post (2.0.0) nanaimo (0.2.3) - nokogiri (1.7.1) + nokogiri (1.7.2) mini_portile2 (~> 2.1.0) os (0.9.6) plist (3.3.0) public_suffix (2.0.5) puma (3.8.2) - rack (1.6.5) + rack (1.6.8) rack-test (0.6.3) rack (>= 1.0) rails (4.2.8) @@ -205,7 +207,7 @@ GEM retriable (2.1.0) rouge (2.0.7) rubyzip (1.2.1) - sass (3.4.23) + sass (3.4.24) sass-rails (5.0.6) railties (>= 4.0.0, < 6) sass (~> 3.1) @@ -219,7 +221,7 @@ GEM jwt (~> 1.5) multi_json (~> 1.10) slack-notifier (1.5.1) - spring (2.0.1) + spring (2.0.2) activesupport (>= 4.2) sprockets (3.7.1) concurrent-ruby (~> 1.0) @@ -268,6 +270,7 @@ DEPENDENCIES byebug coffee-rails (~> 4.1.0) fastlane (>= 2.33.0, < 3.0.0) + font-awesome-rails http_accept_language (~> 2.0.5) jquery-rails puma @@ -279,4 +282,4 @@ DEPENDENCIES web-console (~> 2.0) BUNDLED WITH - 1.14.6 + 1.15.0 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1f9dad65..3ed58b53 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,4 +12,5 @@ // //= require_tree . //= require jquery +//= require jquery_ujs //= require bootstrap-sprockets \ No newline at end of file diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 2eb37b4e..187d08bf 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -14,3 +14,4 @@ @import "bootstrap-sprockets"; @import "bootstrap"; +@import "font-awesome"; diff --git a/app/views/invite/index.html.erb b/app/views/invite/index.html.erb index c51a42be..cf8abcf4 100644 --- a/app/views/invite/index.html.erb +++ b/app/views/invite/index.html.erb @@ -24,7 +24,7 @@ <% unless @message %>

<%= @metadata[:title] %>

- <%= form_tag("submit", method: "post", style: "text-align: left", onsubmit: "didSubmit()") do %> + <%= form_tag("submit", method: "post", style: "text-align: left") do %> <%= label_tag(:first_name, t(:first_name_label)) %> <%= text_field_tag :first_name, '', class: "form-control", placeholder: t(:first_name_placeholder) %>
<%= label_tag(:last_name, t(:last_name_label)) %> @@ -42,7 +42,7 @@ <% end %>
- <%= submit_tag t(:get_beta_access), class: 'btn btn-lg btn-primary btn-block', id: "submit" %> + <%= button_tag t(:get_beta_access), class: 'btn btn-lg btn-primary btn-block', data: { disable_with: " " + t(:please_wait) }, id: "submit" %> <% end %> <% else %>

@@ -55,13 +55,6 @@

- -