diff --git a/app/assets/images/invalid_fat@2x.png b/app/assets/images/invalid_fat@2x.png
new file mode 100644
index 000000000..cd69f1f9e
Binary files /dev/null and b/app/assets/images/invalid_fat@2x.png differ
diff --git a/app/assets/stylesheets/new_styles/_registration.scss b/app/assets/stylesheets/new_styles/_registration.scss
index 61727bd25..f42c24862 100644
--- a/app/assets/stylesheets/new_styles/_registration.scss
+++ b/app/assets/stylesheets/new_styles/_registration.scss
@@ -3,8 +3,8 @@
top : 0;
left : 0;
background-color : #afc652;
- height : 100%;
- width : 100%;
+ min-height : 100%;
+ min-width : 100%;
color : #fff;
@@ -16,6 +16,7 @@
font-family : Roboto-Light;
font-size : 100px;
line-height : 100px;
+ white-space : nowrap;
}
#diaspora-hearts {
@@ -23,6 +24,7 @@
font-size : 24px;
margin-top : 0.2em;
margin-bottom : 1em;
+ white-space : nowrap;
}
#sign-up-text {
@@ -32,11 +34,10 @@
}
#collage {
- float : left;
width : 344px;
- height : 639px;
- margin-right : 20px;
- margin-left : 110px;
+ height : auto;
+
+ max-width : 95%;
}
form#user_new {
@@ -46,6 +47,10 @@
color : #555;
}
+ input:invalid {
+ color : #555;
+ }
+
fieldset {
@include border-radius(5px);
@@ -78,13 +83,24 @@
.control-label,
input[type=text],
- input[type=password] {
+ input[type=password],
+ .field_with_errors label {
padding : 10px;
margin : 0;
}
- .controls { margin-left : 100px; }
+ .controls { margin-left : 100px; position : relative; }
.control-label { width : 80px; }
+
+ .controls .field_with_errors input {
+ color : #f15534;
+ background : {
+ image : image-url('invalid_fat@2x.png');
+ repeat : no-repeat;
+ position : 197px;
+ size: 20px 20px;
+ }
+ }
}
}
diff --git a/app/assets/stylesheets/new_styles/_variables.scss b/app/assets/stylesheets/new_styles/_variables.scss
index 5d61d947b..3948566d6 100644
--- a/app/assets/stylesheets/new_styles/_variables.scss
+++ b/app/assets/stylesheets/new_styles/_variables.scss
@@ -19,4 +19,4 @@ $lime-green : rgb(143, 199,10);
$orange : rgb(237, 165, 13);
$red : rgb(246, 68, 60);
$turquoise : rgb(8, 224, 173);
-$sand : rgb(245, 239, 237);
+$sand : rgb(245, 239, 237);
\ No newline at end of file
diff --git a/app/views/registrations/new.html.erb b/app/views/registrations/new.html.erb
index 0c59e6d8b..9b0b1c469 100644
--- a/app/views/registrations/new.html.erb
+++ b/app/views/registrations/new.html.erb
@@ -1,59 +1,65 @@
- <%= image_tag('signupimages@2x_mini.jpg', :id => "collage") %>
+
+
+ <%= image_tag('signupimages@2x_mini.jpg', :id => "collage") %>
+
-
- HEY,
-
- MAKE
-
- SOMETHING.
-
+
+
+ HEY,
+
+ MAKE
+
+ SOMETHING.
+
-
- <3 Diaspora*
-
+
+ <3 Diaspora*
+
-
- SIGN UP
-
+
+ SIGN UP
+
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => "form-horizontal", :autocomplete => "off"}) do |f| %>
-
-
-
- EMAIL
-
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => "form-horizontal", :autocomplete => "off"}, :validate => true) do |f| %>
+
+
+
+ EMAIL
+
-
- <%= f.email_field :email, :placeholder => "luke@hoth.net", :title => t('registrations.new.enter_email'), :required => true %>
-
-
+
+ <%= f.email_field :email, :validate => {:presence => true}, :placeholder => "luke@hoth.net", :title => t('registrations.new.enter_email'), :required => true %>
+
+
-
-
- USERNAME
-
+
+
+ USERNAME
+
-
- <%= f.text_field :username, :placeholder => "jedi_guy", :title => t('registrations.new.enter_username'), :required => true, :pattern => "[A-Za-z0-9_]+" %>
-
-
+
+ <%= f.text_field :username, :validate => {:presence => true}, :placeholder => "jedi_guy", :title => t('registrations.new.enter_username'), :required => true, :pattern => "[A-Za-z0-9_]+" %>
+
+
-
-
- PASSWORD
-
+
+
+ PASSWORD
+
- <%= f.password_field :password, :placeholder => "••••••••", :title => t('registrations.new.enter_password'), :required => true, :pattern => "......+" %>
- <%= invite_hidden_tag(invite) %>
-
-
-
-
- <%= f.submit "Continue", :class => "new-btn" %>
- <% end %>
+
+ <%= f.password_field :password, :validate => {:presence => true}, :placeholder => "••••••••", :title => t('registrations.new.enter_password'), :required => true, :pattern => "......+" %>
+
+
+ <%= invite_hidden_tag(invite) %>
+
+ <%= f.submit "Continue", :class => "new-btn" %>
+ <% end %>
+
+
\ No newline at end of file
diff --git a/config/initializers/client_side_validations.rb b/config/initializers/client_side_validations.rb
index b598bd991..430154d25 100644
--- a/config/initializers/client_side_validations.rb
+++ b/config/initializers/client_side_validations.rb
@@ -1,14 +1,14 @@
# ClientSideValidations Initializer
-#require 'client_side_validations/simple_form' if defined?(::SimpleForm)
-#require 'client_side_validations/formtastic' if defined?(::Formtastic)
+require 'client_side_validations/simple_form' if defined?(::SimpleForm)
+require 'client_side_validations/formtastic' if defined?(::Formtastic)
# Uncomment the following block if you want each input field to have the validation messages attached.
-ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
- unless html_tag =~ /^#{html_tag}#{instance.error_message.first} }.html_safe
- else
- %{#{html_tag}
}.html_safe
- end
-end
+# ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
+# unless html_tag =~ /^#{html_tag}#{instance.error_message.first} }.html_safe
+# else
+# %{#{html_tag}
}.html_safe
+# end
+# end