Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp-module-privacyidea
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Perun
Perun ProxyIdP
simplesamlphp-module-privacyidea
Commits
ed15b615
Verified
Commit
ed15b615
authored
3 years ago
by
Pavel Břoušek
Browse files
Options
Downloads
Patches
Plain Diff
fix: non-empty labels
add content to labels, use labels for form fields only
parent
66856386
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/loginform.php
+33
-30
33 additions, 30 deletions
templates/loginform.php
www/css/loginform.css
+14
-0
14 additions, 0 deletions
www/css/loginform.css
with
47 additions
and
30 deletions
templates/loginform.php
+
33
−
30
View file @
ed15b615
...
...
@@ -103,7 +103,9 @@ if ($this->data['errorCode'] !== NULL)
}
else
{
?>
<label
for=
"username"
></label>
<label
for=
"username"
class=
"sr-only"
>
<?php
echo
$this
->
t
(
'{login:username}'
);
?>
</label>
<input
type=
"text"
id=
"username"
tabindex=
"1"
name=
"username"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'username'
],
ENT_QUOTES
)
?>
"
placeholder=
"
<?php
echo
htmlspecialchars
(
$this
->
t
(
'{login:username}'
),
ENT_QUOTES
)
?>
"
...
...
@@ -146,13 +148,17 @@ if ($this->data['errorCode'] !== NULL)
}
?>
<!-- Pass and OTP fields -->
<label
for=
"password"
></label>
<label
for=
"password"
class=
"sr-only"
>
<?php
echo
$this
->
t
(
'{privacyidea:privacyidea:password}'
);
?>
</label>
<input
id=
"password"
name=
"password"
tabindex=
"1"
type=
"password"
value=
""
class=
"text"
placeholder=
"
<?php
echo
htmlspecialchars
(
$passHint
,
ENT_QUOTES
)
?>
"
/>
<strong
id=
"message"
>
<?php
echo
$this
->
data
[
'message'
]
?>
</strong>
<label
for=
"otp"
></label>
<label
for=
"otp"
class=
"sr-only"
>
<?php
echo
$this
->
t
(
'{privacyidea:privacyidea:otp}'
);
?>
</label>
<input
id=
"otp"
name=
"otp"
tabindex=
"1"
type=
"password"
value=
""
class=
"text"
placeholder=
"
<?php
echo
htmlspecialchars
(
$otpHint
,
ENT_QUOTES
)
?>
"
/>
<br>
...
...
@@ -203,38 +209,35 @@ if ($this->data['errorCode'] !== NULL)
{
?>
<div
class=
"identifier-shown"
>
<?php
echo
htmlspecialchars
(
$this
->
t
(
'{login:organization}'
));
?>
<label>
<select
name=
"organization"
tabindex=
"3"
>
<label
for=
"organization"
>
<?php
echo
htmlspecialchars
(
$this
->
t
(
'{login:organization}'
));
?>
</label>
<select
id=
"organization"
name=
"organization"
tabindex=
"3"
>
<?php
if
(
array_key_exists
(
'selectedOrg'
,
$this
->
data
))
{
$selectedOrg
=
$this
->
data
[
'selectedOrg'
];
}
else
{
$selectedOrg
=
NULL
;
}
foreach
(
$this
->
data
[
'organizations'
]
as
$orgId
=>
$orgDesc
)
{
if
(
is_array
(
$orgDesc
))
{
$orgDesc
=
$this
->
t
(
$orgDesc
);
}
<?php
if
(
array_key_exists
(
'selectedOrg'
,
$this
->
data
))
if
(
$orgId
===
$selectedOrg
)
{
$selected
Org
=
$this
->
data
[
'
selected
Org'
]
;
$selected
=
'selected="
selected
" '
;
}
else
{
$selected
Org
=
NULL
;
$selected
=
''
;
}
foreach
(
$this
->
data
[
'organizations'
]
as
$orgId
=>
$orgDesc
)
{
if
(
is_array
(
$orgDesc
))
{
$orgDesc
=
$this
->
t
(
$orgDesc
);
}
if
(
$orgId
===
$selectedOrg
)
{
$selected
=
'selected="selected" '
;
}
else
{
$selected
=
''
;
}
echo
'<option '
.
$selected
.
'value="'
.
htmlspecialchars
(
$orgId
,
ENT_QUOTES
)
.
'">'
.
htmlspecialchars
(
$orgDesc
)
.
'</option>'
;
}
?>
</select>
</label>
echo
'<option '
.
$selected
.
'value="'
.
htmlspecialchars
(
$orgId
,
ENT_QUOTES
)
.
'">'
.
htmlspecialchars
(
$orgDesc
)
.
'</option>'
;
}
?>
</select>
</div>
<?php
}
?>
</div>
<!-- focused -->
...
...
@@ -242,7 +245,7 @@ if ($this->data['errorCode'] !== NULL)
</div>
<!-- form-panel -->
<div
id=
"AlternateLoginOptions"
class=
"groupMargin"
>
<h3><
label>
<
?php
echo
$this
->
t
(
'{privacyidea:privacyidea:alternate_login_options}'
);
?>
</
label></
h3>
<h3>
<?php
echo
$this
->
t
(
'{privacyidea:privacyidea:alternate_login_options}'
);
?>
</h3>
<!-- Alternate Login Options-->
<input
id=
"useWebAuthnButton"
name=
"useWebAuthnButton"
type=
"button"
value=
"WebAuthn"
/>
<input
id=
"usePushButton"
name=
"usePushButton"
type=
"button"
value=
"Push"
/>
...
...
This diff is collapsed.
Click to expand it.
www/css/loginform.css
+
14
−
0
View file @
ed15b615
...
...
@@ -59,3 +59,17 @@ label[for=otp] {
.hidden
{
display
:
none
;
}
.sr-only
{
border
:
0
!important
;
clip
:
rect
(
1px
,
1px
,
1px
,
1px
)
!important
;
-webkit-clip-path
:
inset
(
50%
)
!important
;
clip-path
:
inset
(
50%
)
!important
;
height
:
1px
!important
;
margin
:
-1px
!important
;
overflow
:
hidden
!important
;
padding
:
0
!important
;
position
:
absolute
!important
;
width
:
1px
!important
;
white-space
:
nowrap
!important
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment