Skip to content

Commit

Permalink
Frontend fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauli1010 authored and Paulina Kamińska committed Aug 11, 2023
1 parent 7a2ea62 commit 011e603
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 41 deletions.
11 changes: 11 additions & 0 deletions app/assets/stylesheets/floating-labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
border: 1px solid transparent;
border-radius: .25rem;
transition: all .1s ease-in-out;

&.checkbox-label {
position: relative;
display: inline-block;
width: auto;
height: 20px;
padding: 0 10px !important;
font-size: 13px !important;
color: #495057 !important;
vertical-align: top;
}
}

.form-label-group input::-webkit-input-placeholder {
Expand Down
10 changes: 5 additions & 5 deletions app/views/password_resets/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
= render 'application/flash'

= simple_form_for @form, url: password_reset_path(@token), method: :patch, scope: :user, class: 'simple_form form-horizontal', data: { turbo: "false" } do |f|
%legend.text-center.mb-4= t('.legend')
%fieldset
%legend.text-center.mb-4= t('.legend')

= render 'password_fields', f: f

.actions.text-center
= f.submit t(".reset"), class: 'btn-sm btn-primary btn-max-width'
= render 'password_fields', f: f

.actions.text-center
= f.submit t(".reset"), class: 'btn-sm btn-primary btn-max-width'

%ul.text-center.mb-4.font-weight-normal
%li
Expand Down
15 changes: 8 additions & 7 deletions app/views/password_resets/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
= render 'application/flash'

= simple_form_for @form, url: password_resets_path, method: :post, scope: :user, class: 'simple_form form-horizontal', data: { turbo: "false" } do |f|
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.input :email, class: 'form-control', label: false
%fieldset
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.input :email, class: 'form-control', label: false

.actions.text-center
= f.submit t(".reset"), class: 'btn-sm btn-primary btn-max-width'
.actions.text-center
= f.submit t(".reset"), class: 'btn-sm btn-primary btn-max-width'


%ul.text-center.mb-4.font-weight-normal
Expand Down
31 changes: 16 additions & 15 deletions app/views/registrations/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
= simple_form_for @form, url: registrations_path, method: :post, scope: :user, class: 'simple_form form-horizontal', data: { turbo: "false" } do |f|
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.input :email, class: 'form-control', label: false
%fieldset
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.input :email, class: 'form-control', label: false

.form-label-group
= f.label :password, t('password', scope: 'activemodel.attributes.user')
%br
= f.input :password, class: 'form-control', label: false
.form-label-group
= f.label :password, t('password', scope: 'activemodel.attributes.user')
%br
= f.input :password, class: 'form-control', label: false

.form-label-group
= f.label :password_confirmation, t('password_confirmation', scope: 'activemodel.attributes.user')
%br
= f.input :password_confirmation, class: 'form-control', label: false
.form-label-group
= f.label :password_confirmation, t('password_confirmation', scope: 'activemodel.attributes.user')
%br
= f.input :password_confirmation, class: 'form-control', label: false

.actions.text-center
= f.submit t(".register"), class: 'btn-sm btn-primary btn-max-width'
.actions.text-center
= f.submit t(".register"), class: 'btn-sm btn-primary btn-max-width'
29 changes: 15 additions & 14 deletions app/views/sessions/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
= form_with url: login_path, method: :post, class: 'simple_form form-horizontal', id: "login-form" do |f|
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.text_field :email, class: 'form-control'
.form-label-group
= f.label :password, t('password', scope: 'activemodel.attributes.user')
%br
= f.password_field :password, class: 'form-control'
.form-label-group
= f.check_box :remember_me, class: 'form-control'
= f.label :remember_me, t('remember_me', scope: 'activemodel.attributes.user')
.actions.text-center
= f.submit t(".login"), class: 'btn-sm btn-primary btn-max-width'
%fieldset
%legend.text-center.mb-4= t('.legend')
.form-label-group
= f.label :email, t('email', scope: 'activemodel.attributes.user')
%br
= f.text_field :email, class: 'form-control'
.form-label-group
= f.label :password, t('password', scope: 'activemodel.attributes.user')
%br
= f.password_field :password, class: 'form-control'
.checkbox
= f.check_box :remember_me
= f.label :remember_me, t('remember_me', scope: 'activemodel.attributes.user'), class: 'checkbox-label'
.actions.text-center
= f.submit t(".login"), class: 'btn-sm btn-primary btn-max-width'

0 comments on commit 011e603

Please sign in to comment.