Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
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
e3ddbeb7
Commit
e3ddbeb7
authored
Jun 20, 2016
by
Vincent Petry
Committed by
GitHub
Jun 20, 2016
Browse files
Merge pull request #25120 from owncloud/settings_fix_checkbox_newline
files_external: Keep checkbox and its label on one line
parents
e2b0a0f1
111bd8e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/files_external/js/settings.js
View file @
e3ddbeb7
...
...
@@ -854,7 +854,7 @@ MountConfigListView.prototype = _.extend({
this
.
configureAuthMechanism
(
$tr
,
storageConfig
.
authMechanism
,
onCompletion
);
if
(
storageConfig
.
backendOptions
)
{
$td
.
children
(
).
each
(
function
()
{
$td
.
find
(
'
input, select
'
).
each
(
function
()
{
var
input
=
$
(
this
);
var
val
=
storageConfig
.
backendOptions
[
input
.
data
(
'
parameter
'
)];
if
(
val
!==
undefined
)
{
...
...
@@ -1001,7 +1001,7 @@ MountConfigListView.prototype = _.extend({
newElement
=
$
(
'
<input type="password" class="
'
+
classes
.
join
(
'
'
)
+
'
" data-parameter="
'
+
parameter
+
'
" placeholder="
'
+
trimmedPlaceholder
+
'
" />
'
);
}
else
if
(
placeholder
.
type
===
MountConfigListView
.
ParameterTypes
.
BOOLEAN
)
{
var
checkboxId
=
_
.
uniqueId
(
'
checkbox_
'
);
newElement
=
$
(
'
<input type="checkbox" id="
'
+
checkboxId
+
'
" class="
'
+
classes
.
join
(
'
'
)
+
'
" data-parameter="
'
+
parameter
+
'
" />
<label for="
'
+
checkboxId
+
'
">
'
+
trimmedPlaceholder
+
'
</label>
'
);
newElement
=
$
(
'
<
div><label><
input type="checkbox" id="
'
+
checkboxId
+
'
" class="
'
+
classes
.
join
(
'
'
)
+
'
" data-parameter="
'
+
parameter
+
'
" />
'
+
trimmedPlaceholder
+
'
</label>
</div>
'
);
}
else
if
(
placeholder
.
type
===
MountConfigListView
.
ParameterTypes
.
HIDDEN
)
{
newElement
=
$
(
'
<input type="hidden" class="
'
+
classes
.
join
(
'
'
)
+
'
" data-parameter="
'
+
parameter
+
'
" />
'
);
}
else
{
...
...
apps/files_external/templates/settings.php
View file @
e3ddbeb7
...
...
@@ -51,13 +51,17 @@
break
;
case
DefinitionParameter
::
VALUE_BOOLEAN
:
?>
<?php
$checkboxId
=
uniqid
(
"checkbox_"
);
?>
<div>
<label>
<input
type=
"checkbox"
id=
"
<?php
p
(
$checkboxId
);
?>
"
<?php
if
(
!
empty
(
$classes
))
:
?>
class=
"checkbox
<?php
p
(
implode
(
' '
,
$classes
));
?>
"
<?php
endif
;
?>
data-parameter=
"
<?php
p
(
$parameter
->
getName
());
?>
"
<?php
if
(
$value
===
true
)
:
?>
checked=
"checked"
<?php
endif
;
?>
/>
<label
for=
"
<?php
p
(
$checkboxId
);
?>
"
>
<?php
p
(
$placeholder
);
?>
</label>
<?php
p
(
$placeholder
);
?>
</label>
</div>
<?php
break
;
case
DefinitionParameter
::
VALUE_HIDDEN
:
?>
...
...
Write
Preview
Supports
Markdown
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