Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
57046eb0
Commit
57046eb0
authored
Oct 19, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure custom provider tab labels don't break layout.
(Also fix some issues for session views on small screens.)
parent
60eca5f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
app/assets/stylesheets/pages/login.scss
app/assets/stylesheets/pages/login.scss
+33
-1
app/views/devise/sessions/two_factor.html.haml
app/views/devise/sessions/two_factor.html.haml
+1
-1
app/views/devise/shared/_tabs_ldap.html.haml
app/views/devise/shared/_tabs_ldap.html.haml
+1
-1
No files found.
app/assets/stylesheets/pages/login.scss
View file @
57046eb0
...
@@ -143,6 +143,7 @@
...
@@ -143,6 +143,7 @@
&
:not
(
.active
)
{
&
:not
(
.active
)
{
background-color
:
$gray-light
;
background-color
:
$gray-light
;
border-left
:
1px
solid
$border-color
;
}
}
a
{
a
{
...
@@ -170,6 +171,31 @@
...
@@ -170,6 +171,31 @@
}
}
}
}
// Ldap configurations may need more tabs & the tab labels are user generated (arbitrarily long).
// These styles prevent this from breaking the layout, and only applied when providers are configured.
.new-session-tabs.custom-provider-tabs
{
flex-wrap
:
wrap
;
li
{
min-width
:
85px
;
flex-basis
:
auto
;
// This styles tab elements that have wrapped to a second line. We cannot easily predict when this will happen.
// We are making somewhat of an assumption about the configuration here: that users do not have more than
// 3 LDAP servers configured (in addition to standard login) and they are not using especially long names for any
// of them. If either condition is false, this will work as expected. If both are true, there may be a missing border
// above one of the bottom row elements. If you know a better way, please implement it!
&
:nth-child
(
n
+
5
)
{
border-top
:
1px
solid
$border-color
;
}
}
a
{
font-size
:
16px
;
}
}
.form-control
{
.form-control
{
&
:active
,
&
:focus
{
&
:active
,
&
:focus
{
...
@@ -203,6 +229,7 @@
...
@@ -203,6 +229,7 @@
.login-page
{
.login-page
{
.col-sm-5.pull-right
{
.col-sm-5.pull-right
{
float
:
none
!
important
;
float
:
none
!
important
;
margin-bottom
:
45px
;
}
}
}
}
}
}
...
@@ -244,7 +271,11 @@
...
@@ -244,7 +271,11 @@
}
}
.navless-container
{
.navless-container
{
padding
:
65px
;
// height of footer + bottom padding of email confirmation link
padding
:
65px
15px
;
// height of footer + bottom padding of email confirmation link
@media
(
max-width
:
$screen-xs-max
)
{
padding
:
0
15px
65px
;
}
}
}
}
}
...
@@ -263,3 +294,4 @@
...
@@ -263,3 +294,4 @@
bottom
:
0
;
bottom
:
0
;
}
}
}
}
app/views/devise/sessions/two_factor.html.haml
View file @
57046eb0
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
=
form_for
(
resource
,
as:
resource_name
,
url:
session_path
(
resource_name
),
method: :post
,
html:
{
class:
'edit_user show-gl-field-errors'
})
do
|
f
|
=
form_for
(
resource
,
as:
resource_name
,
url:
session_path
(
resource_name
),
method: :post
,
html:
{
class:
'edit_user show-gl-field-errors'
})
do
|
f
|
-
resource_params
=
params
[
resource_name
].
presence
||
params
-
resource_params
=
params
[
resource_name
].
presence
||
params
=
f
.
hidden_field
:remember_me
,
value:
resource_params
.
fetch
(
:remember_me
,
0
)
=
f
.
hidden_field
:remember_me
,
value:
resource_params
.
fetch
(
:remember_me
,
0
)
.form-group
%div
=
f
.
label
'Two-Factor Authentication code'
,
name: :otp_attempt
=
f
.
label
'Two-Factor Authentication code'
,
name: :otp_attempt
=
f
.
text_field
:otp_attempt
,
class:
'form-control'
,
required:
true
,
autofocus:
true
,
autocomplete:
'off'
,
title:
'This field is required.'
=
f
.
text_field
:otp_attempt
,
class:
'form-control'
,
required:
true
,
autofocus:
true
,
autocomplete:
'off'
,
title:
'This field is required.'
%p
.help-block.hint
Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.
%p
.help-block.hint
Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.
...
...
app/views/devise/shared/_tabs_ldap.html.haml
View file @
57046eb0
%ul
.new-session-tabs.nav-links.nav-tabs
%ul
.new-session-tabs.nav-links.nav-tabs
{
class:
(
'custom-provider-tabs'
if
form_based_providers
.
any?
)
}
-
if
crowd_enabled?
-
if
crowd_enabled?
%li
.active
%li
.active
=
link_to
"Crowd"
,
"#crowd"
,
'data-toggle'
=>
'tab'
=
link_to
"Crowd"
,
"#crowd"
,
'data-toggle'
=>
'tab'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment