Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
72a3301b
Commit
72a3301b
authored
Jun 27, 2016
by
Vincent Petry
Committed by
GitHub
Jun 27, 2016
Browse files
Merge pull request #25261 from owncloud/app-password-login-name
show which login name to use for the new app password
parents
5e2a9dac
213d7119
Changes
4
Hide whitespace changes
Inline
Side-by-side
settings/Controller/AuthSettingsController.php
View file @
72a3301b
...
...
@@ -118,6 +118,7 @@ class AuthSettingsController extends Controller {
return
[
'token'
=>
$token
,
'loginName'
=>
$loginName
,
'deviceToken'
=>
$deviceToken
];
}
...
...
settings/css/settings.css
View file @
72a3301b
...
...
@@ -131,11 +131,19 @@ table.nostyle td { padding: 0.2em 0; }
opacity
:
0.6
;
}
#new-app-login-name
,
#new-app-password
{
width
:
186px
;
font-family
:
monospace
;
background-color
:
lightyellow
;
}
.app-password-row
{
display
:
table-row
;
}
.app-password-label
{
display
:
table-cell
;
padding-right
:
1em
;
}
/* USERS */
#newgroup-init
a
span
{
margin-left
:
20px
;
}
...
...
settings/js/authtoken_view.js
View file @
72a3301b
...
...
@@ -107,6 +107,8 @@
_result
:
undefined
,
_newAppLoginName
:
undefined
,
_newAppPassword
:
undefined
,
_hideAppPasswordBtn
:
undefined
,
...
...
@@ -136,6 +138,8 @@
this
.
_addAppPasswordBtn
.
click
(
_
.
bind
(
this
.
_addAppPassword
,
this
));
this
.
_result
=
$
(
'
#app-password-result
'
);
this
.
_newAppLoginName
=
$
(
'
#new-app-login-name
'
);
this
.
_newAppLoginName
.
on
(
'
focus
'
,
_
.
bind
(
this
.
_onNewTokenLoginNameFocus
,
this
));
this
.
_newAppPassword
=
$
(
'
#new-app-password
'
);
this
.
_newAppPassword
.
on
(
'
focus
'
,
_
.
bind
(
this
.
_onNewTokenFocus
,
this
));
this
.
_hideAppPasswordBtn
=
$
(
'
#app-password-hide
'
);
...
...
@@ -181,6 +185,7 @@
$
.
when
(
creatingToken
).
done
(
function
(
resp
)
{
_this
.
collection
.
add
(
resp
.
deviceToken
);
_this
.
render
();
_this
.
_newAppLoginName
.
val
(
resp
.
loginName
);
_this
.
_newAppPassword
.
val
(
resp
.
token
);
_this
.
_toggleFormResult
(
false
);
_this
.
_newAppPassword
.
select
();
...
...
@@ -194,6 +199,10 @@
});
},
_onNewTokenLoginNameFocus
:
function
()
{
this
.
_newAppLoginName
.
select
();
},
_onNewTokenFocus
:
function
()
{
this
.
_newAppPassword
.
select
();
},
...
...
settings/templates/personal.php
View file @
72a3301b
...
...
@@ -203,8 +203,16 @@ if($_['passwordChangeSupported']) {
<button
id=
"add-app-password"
class=
"button"
>
<?php
p
(
$l
->
t
(
'Create new app password'
));
?>
</button>
</div>
<div
id=
"app-password-result"
class=
"hidden"
>
<input
id=
"new-app-password"
type=
"text"
readonly=
"readonly"
/>
<button
id=
"app-password-hide"
class=
"button"
>
<?php
p
(
$l
->
t
(
'Done'
));
?>
</button>
<span>
<?php
p
(
$l
->
t
(
'Use the credentials below to configure your app or device.'
));
?>
</span>
<div
class=
"app-password-row"
>
<span
class=
"app-password-label"
>
<?php
p
(
$l
->
t
(
'Username'
));
?>
</span>
<input
id=
"new-app-login-name"
type=
"text"
readonly=
"readonly"
/>
</div>
<div
class=
"app-password-row"
>
<span
class=
"app-password-label"
>
<?php
p
(
$l
->
t
(
'Password'
));
?>
</span>
<input
id=
"new-app-password"
type=
"text"
readonly=
"readonly"
/>
<button
id=
"app-password-hide"
class=
"button"
>
<?php
p
(
$l
->
t
(
'Done'
));
?>
</button>
</div>
</div>
</div>
...
...
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