diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 3362501a67..4014448735 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,6 +13,7 @@ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // +//= require typeahead.js/dist/typeahead.jquery.js //= require jquery //= require jquery_ujs //= require bootstrap/dist/js/bootstrap.min.js diff --git a/app/assets/javascripts/post.js b/app/assets/javascripts/post.js index 4daf9d8c81..2605d2f593 100644 --- a/app/assets/javascripts/post.js +++ b/app/assets/javascripts/post.js @@ -1,3 +1,4 @@ +//=require typeahead.js/dist/typeahead.jquery.js jQuery(document).ready(function() { $('.datepicker').datepicker() diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index fb95d871a0..4fd69455ab 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -4,6 +4,7 @@ + diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index e4d41353b9..323f5efd43 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -1,178 +1,170 @@ <%= form_for @user, :url => {:controller => 'users', :action => @action}, :html => {:class => "row"} do |f| %> - - <% if f.error_messages != "" %>
<%= f.error_messages %>
<% end %> + <% if f.error_messages != "" %> +
<%= f.error_messages %>
+ <% end %>
<% if params[:controller] == "users" && @action == "create" %> -
-

Sign up with

-
- <% if Rails.env == "production" %>
- <%= render :partial => "layouts/social_icons" %> - <% end %> +

Sign up with

- -
-

OR

- -
-
-
- - <%= f.text_field :username, { tabindex: 1, class: 'form-control', id: 'username' } %> + <% if Rails.env == "production" %> +
+ <%= render :partial => "layouts/social_icons" %> +
+ <% end %> - +
+

OR

- <% end %> +
-
- <% if Rails.env == "production" %> - <% if params[:controller] == "users" && params[:action] == "edit" %> -
- -
-
- <%= render :partial => "layouts/social_icons" %> -
- <% end %> +
+ + <%= f.text_field :username, {tabindex: 1, class: 'form-control', id: 'username'} %> + +
<% end %> -
- +
+ <% if Rails.env == "production" %> + <% if params[:controller] == "users" && params[:action] == "edit" %> +
+ +
+
+ <%= render :partial => "layouts/social_icons" %> +
+ <% end %> + <% end %> - - <%= f.text_field :email, { tabindex: 3, placeholder: "you@email.com", class: 'form-control', id: 'email' } %> +
+ + <%= f.text_field :email, {tabindex: 3, placeholder: "you@email.com", class: 'form-control', id: 'email'} %>
- -
<% if @user.crypted_password.nil? %> <% else %> <% end %> - <%= f.password_field :password, { placeholder: I18n.t('users._form.password'), - tabindex: 4, - class: 'form-control', - id: 'password' } + <%= f.password_field :password, {placeholder: I18n.t('users._form.password'), + tabindex: 4, + class: 'form-control', + id: 'password'} %>
-
- <%= f.password_field :password_confirmation, { placeholder: I18n.t('users._form.confirm_password'), - tabindex: 5, - class: 'form-control', - id: 'password-confirmation' } + <%= f.password_field :password_confirmation, {placeholder: I18n.t('users._form.confirm_password'), + tabindex: 5, + class: 'form-control', + id: 'password-confirmation'} %>
- -
- <%= f.text_area :bio, { placeholder: I18n.t('users._form.add_bio'), - rows: 8, - class: 'form-control', - tabindex: 6 } + <%= f.text_area :bio, {placeholder: I18n.t('users._form.add_bio'), + rows: 8, + class: 'form-control', + tabindex: 6} %>
- - <% if params[:controller] == "users" && (params[:action] == "new" || params[:action] == "create") %> - <% if Rails.env == "production" && !params[:spamaway] %> - <%= recaptcha_tags %> - <% else %> - <%= fields_for @spamaway do |spam| %> -
-

<%= t('users._form.spam_filtering') %>

- <% vars = [:statement1, :statement2, :statement3, :statement4] %> <% turingtest = Spamaway.get_pairs vars.length %> <% turingtest.each_index do |i| %> - -
- <% [0,1].each_with_index do |s, j| %><% statement = turingtest[i][s] %> -
- -
- <% end %> -
-
- +
+ <% [0, 1].each_with_index do |s, j| %> + <% statement = turingtest[i][s] %> +
+ +
+ <% end %> +
+
<% end %> -
-
- - <%= spam.text_area :follow_instructions, { class: "form-control col-md-6", - rows: 8, - tabindex: 7, - placeholder: I18n.t('users._form.dont_write_here') } + <%= spam.text_area :follow_instructions, {class: "form-control col-md-6", + rows: 8, + tabindex: 7, + placeholder: I18n.t('users._form.dont_write_here')} %> -
- <% end %> - <% end %> - - <% end %> -
- <% if params[:controller] == "users" && (params[:action] == "new" || params[:action] == "create") %> - - + <%= t('users._form.log_in') %> - <% elsif params[:controller] == "users" && params[:action] == "edit" %> - - <% end %> -
-
-
<%= render :partial => 'users/photo' %>
- <% end %> + +