Merge branch '47865-access-token-for-projects-fe' into 'master'

Style updates for personal access token form

See merge request gitlab-org/gitlab-ce!20052
This commit is contained in:
Clement Ho 2018-06-29 14:34:26 +00:00
commit af848e4c42
4 changed files with 26 additions and 23 deletions

View File

@ -243,3 +243,15 @@ label {
} }
} }
} }
.input-icon-wrapper {
position: relative;
.input-icon-right {
position: absolute;
right: 0.8em;
top: 50%;
transform: translateY(-50%);
color: $theme-gray-600;
}
}

View File

@ -255,25 +255,12 @@
} }
} }
.modal-doorkeepr-auth,
.doorkeeper-app-form {
.scope-description {
color: $theme-gray-700;
}
}
.modal-doorkeepr-auth { .modal-doorkeepr-auth {
.modal-body { .modal-body {
padding: $gl-padding; padding: $gl-padding;
} }
} }
.doorkeeper-app-form {
.scope-description {
margin: 0 0 5px 17px;
}
}
.deprecated-service { .deprecated-service {
cursor: default; cursor: default;
} }

View File

@ -9,13 +9,17 @@
= form_errors(token) = form_errors(token)
.form-group .row
= f.label :name, class: 'label-light' .form-group.col-md-6
= f.text_field :name, class: "form-control", required: true = f.label :name, class: 'label-light'
= f.text_field :name, class: "form-control", required: true
.form-group .row
= f.label :expires_at, class: 'label-light' .form-group.col-md-6
= f.text_field :expires_at, class: "datepicker form-control" = f.label :expires_at, class: 'label-light'
.input-icon-wrapper
= f.text_field :expires_at, class: "datepicker form-control", placeholder: 'YYYY-MM-DD'
= icon('calendar', { class: 'input-icon-right' })
.form-group .form-group
= f.label :scopes, class: 'label-light' = f.label :scopes, class: 'label-light'

View File

@ -3,7 +3,7 @@
- token = local_assigns.fetch(:token) - token = local_assigns.fetch(:token)
- scopes.each do |scope| - scopes.each do |scope|
%fieldset %fieldset.form-group.form-check
= check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}" = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", class: 'form-check-input'
= label_tag ("#{prefix}_scopes_#{scope}"), scope, class: "label-light" = label_tag ("#{prefix}_scopes_#{scope}"), scope, class: 'label-light form-check-label'
.scope-description= t scope, scope: [:doorkeeper, :scope_desc] .text-secondary= t scope, scope: [:doorkeeper, :scope_desc]