Fix captcha and box-shadow

This commit is contained in:
Steffen van Bergerem 2015-02-13 17:52:31 +01:00 committed by flaburgan
parent 1c231f3171
commit b3558d0db1
4 changed files with 25 additions and 54 deletions

View file

@ -7,7 +7,7 @@ $background-blue: #E7F2F7;
$grey: #2B2B2B; $grey: #2B2B2B;
$light-grey: #DDDDDD; $light-grey: #DDDDDD;
$border-grey: #CCCCCC; $border-grey: #DDDDDD;
$border-dark-grey: #999999; $border-dark-grey: #999999;
$link-grey: #777777; $link-grey: #777777;

View file

@ -1,19 +1,19 @@
input, input,
input[type=email],
input[type=text],
input[type=password],
textarea { /* Bootstrap reset */ textarea { /* Bootstrap reset */
&, &,
&:active, &:active,
&:invalid, &:invalid,
&:invalid:required, { &:invalid:required,
border-color: $border-grey;
box-shadow: none;
}
&:focus, &:focus,
&:active:focus, &:active:focus,
&:invalid:focus, &:invalid:focus,
&:invalid:required:focus { &:invalid:required:focus {
border-color: $border-dark-grey; border-color: $border-grey;
box-shadow: none; box-shadow: none;
color : $text-dark-grey;
} }
} }
@ -78,19 +78,6 @@ form.block-form {
} }
} }
.form-control:focus {
&,
&:invalid,
&:invalid:required {
border-color: $border-dark-grey;
border-bottom-width: 1px;
}
/* remove the border of the element under the one with the focus */
& + label + .entypo + .form-control {
border-top-width: 0px;
}
}
.entypo { .entypo {
position: absolute; position: absolute;
top: 10px; top: 10px;
@ -113,7 +100,7 @@ form.block-form {
top: 130px; top: 130px;
} }
input:-moz-placeholder { text-transform: uppercase; } input::-moz-placeholder { text-transform: uppercase; }
input::-webkit-input-placeholder { text-transform: uppercase; } input::-webkit-input-placeholder { text-transform: uppercase; }
input:-ms-input-placeholder { text-transform: uppercase; } input:-ms-input-placeholder { text-transform: uppercase; }
} }

View file

@ -32,39 +32,25 @@
} }
form { form {
.form-control:last-of-type { max-width: 400px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px; .captcha_img {
position: absolute;
left: 10px;
width: 120px;
top: 169px;
} }
.captcha { #user_captcha {
border: 1px solid $border-grey; font-size: 16px;
border-top: 0px; height: 40px;
padding: 10px 10px 10px 130px;
line-height: 20px;
box-sizing: border-box;
width: 100%;
border-bottom: 1px solid $border-grey;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
.captcha_img {
float: left;
margin-top: 3px;
}
#user_captcha {
float: right;
width: 69%;
border: 0px;
border-radius: 0px;
border-bottom-right-radius: 5px;
border-left: 1px solid $border-grey;
&:focus {
border: solid 1px $border-dark-grey;
/* Sorry about this dirty hack, the only way I found to correctly display the grey border */
position: relative;
top: -1px;
margin-right: -1px;
margin-bottom: -2px;
}
}
} }
#terms > a { #terms > a {

View file

@ -8,7 +8,7 @@
%h3#diaspora-hearts %h3#diaspora-hearts
= t('.diaspora') = t('.diaspora')
.span5 .span5
.pull-right .text-center
%h2#pod-name %h2#pod-name
= AppConfig.settings.pod_name = AppConfig.settings.pod_name
= form_for(resource, url: registration_path(resource_name), html: {class: "form-horizontal block-form", autocomplete: "off"}) do |f| = form_for(resource, url: registration_path(resource_name), html: {class: "form-horizontal block-form", autocomplete: "off"}) do |f|
@ -34,9 +34,7 @@
= f.password_field :password_confirmation, class: "input-block-level form-control", placeholder: t('.password_confirmation'), title: t('registrations.new.enter_password_again'), required: true, pattern: "......+" = f.password_field :password_confirmation, class: "input-block-level form-control", placeholder: t('.password_confirmation'), title: t('registrations.new.enter_password_again'), required: true, pattern: "......+"
- if AppConfig.settings.captcha.enable? - if AppConfig.settings.captcha.enable?
.captcha = show_simple_captcha :object => 'user', :code_type => 'numeric'
= show_simple_captcha(object: 'user', code_type: 'numeric')
%div{style: "clear:both;"}
= invite_hidden_tag(invite) = invite_hidden_tag(invite)