Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
9e74787c
Commit
9e74787c
authored
11 years ago
by
Morris Jobke
Browse files
Options
Downloads
Patches
Plain Diff
Migrate table layout to p layout for share settings
ref #8906
parent
ce179dcd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
settings/css/settings.css
+8
-3
8 additions, 3 deletions
settings/css/settings.css
settings/js/admin.js
+2
-1
2 additions, 1 deletion
settings/js/admin.js
settings/templates/admin.php
+39
-52
39 additions, 52 deletions
settings/templates/admin.php
with
49 additions
and
56 deletions
settings/css/settings.css
+
8
−
3
View file @
9e74787c
...
@@ -166,9 +166,14 @@ span.securitywarning, span.connectionwarning {
...
@@ -166,9 +166,14 @@ span.securitywarning, span.connectionwarning {
color
:
#C33
;
color
:
#C33
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
table
.shareAPI
td
{
padding-bottom
:
0.8em
;
}
#shareAPI
p
{
padding-bottom
:
0.8em
;
}
table
.shareAPI
input
#shareapiExpireAfterNDays
{
width
:
25px
;}
#shareAPI
input
#shareapiExpireAfterNDays
{
width
:
25px
;}
table
.shareAPI
.indent
{
padding-left
:
2em
;
}
#shareAPI
.indent
{
padding-left
:
28px
;
}
#shareAPI
.double-indent
{
padding-left
:
56px
;
}
#mail_settings
p
label
:first-child
{
#mail_settings
p
label
:first-child
{
display
:
inline-block
;
display
:
inline-block
;
...
...
This diff is collapsed.
Click to expand it.
settings/js/admin.js
+
2
−
1
View file @
9e74787c
...
@@ -60,7 +60,7 @@ $(document).ready(function(){
...
@@ -60,7 +60,7 @@ $(document).ready(function(){
});
});
$
(
'
#shareAPIEnabled
'
).
change
(
function
()
{
$
(
'
#shareAPIEnabled
'
).
change
(
function
()
{
$
(
'
.
shareAPI
td
:not(#enable)
'
).
toggle
(
);
$
(
'
#
shareAPI
p
:not(#enable)
'
).
toggle
Class
(
'
hidden
'
,
!
this
.
checked
);
});
});
$
(
'
#shareAPI input
'
).
change
(
function
()
{
$
(
'
#shareAPI input
'
).
change
(
function
()
{
...
@@ -82,6 +82,7 @@ $(document).ready(function(){
...
@@ -82,6 +82,7 @@ $(document).ready(function(){
$
(
'
#allowLinks
'
).
change
(
function
()
{
$
(
'
#allowLinks
'
).
change
(
function
()
{
$
(
"
#publicLinkSettings
"
).
toggleClass
(
'
hidden
'
,
!
this
.
checked
);
$
(
"
#publicLinkSettings
"
).
toggleClass
(
'
hidden
'
,
!
this
.
checked
);
$
(
'
#setDefaultExpireDate
'
).
toggleClass
(
'
hidden
'
,
!
(
this
.
checked
&&
$
(
'
#shareapiDefaultExpireDate
'
)[
0
].
checked
));
});
});
$
(
'
#security
'
).
change
(
function
(){
$
(
'
#security
'
).
change
(
function
(){
...
...
This diff is collapsed.
Click to expand it.
settings/templates/admin.php
+
39
−
52
View file @
9e74787c
...
@@ -232,20 +232,18 @@ if (!$_['internetconnectionworking']) {
...
@@ -232,20 +232,18 @@ if (!$_['internetconnectionworking']) {
<div
class=
"section"
id=
"shareAPI"
>
<div
class=
"section"
id=
"shareAPI"
>
<h2>
<?php
p
(
$l
->
t
(
'Sharing'
));
?>
</h2>
<h2>
<?php
p
(
$l
->
t
(
'Sharing'
));
?>
</h2>
<table
class=
"shareAPI"
>
<p
id=
"enable"
>
<tr>
<td
id=
"enable"
>
<input
type=
"checkbox"
name=
"shareapi_enabled"
id=
"shareAPIEnabled"
<input
type=
"checkbox"
name=
"shareapi_enabled"
id=
"shareAPIEnabled"
value=
"1"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"shareAPIEnabled"
>
<?php
p
(
$l
->
t
(
'Allow apps to use the Share API'
));
?>
</label><br/>
<label
for=
"shareAPIEnabled"
>
<?php
p
(
$l
->
t
(
'Allow apps to use the Share API'
));
?>
</label><br/>
</td>
</p>
</tr>
<p
class=
"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<tr>
<td
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
print_unescaped
(
'class="hidden"'
);
?>
>
<input
type=
"checkbox"
name=
"shareapi_allow_links"
id=
"allowLinks"
<input
type=
"checkbox"
name=
"shareapi_allow_links"
id=
"allowLinks"
value=
"1"
<?php
if
(
$_
[
'allowLinks'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'allowLinks'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"allowLinks"
>
<?php
p
(
$l
->
t
(
'Allow users to share via link'
));
?>
</label><br/>
<label
for=
"allowLinks"
>
<?php
p
(
$l
->
t
(
'Allow users to share via link'
));
?>
</label><br/>
<div
<?php
(
$_
[
'allowLinks'
]
===
'yes'
)
?
print_unescaped
(
'class="indent"'
)
:
print_unescaped
(
'class="hidden indent"'
);
?>
id=
"publicLinkSettings"
>
</p>
<p
id=
"publicLinkSettings"
class=
"indent
<?php
if
(
$_
[
'allowLinks'
]
!==
'yes'
||
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<input
type=
"checkbox"
name=
"shareapi_enforce_links_password"
id=
"enforceLinkPassword"
<input
type=
"checkbox"
name=
"shareapi_enforce_links_password"
id=
"enforceLinkPassword"
value=
"1"
<?php
if
(
$_
[
'enforceLinkPassword'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'enforceLinkPassword'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"enforceLinkPassword"
>
<?php
p
(
$l
->
t
(
'Enforce password protection'
));
?>
</label><br/>
<label
for=
"enforceLinkPassword"
>
<?php
p
(
$l
->
t
(
'Enforce password protection'
));
?>
</label><br/>
...
@@ -256,46 +254,38 @@ if (!$_['internetconnectionworking']) {
...
@@ -256,46 +254,38 @@ if (!$_['internetconnectionworking']) {
<input
type=
"checkbox"
name=
"shareapi_default_expire_date"
id=
"shareapiDefaultExpireDate"
<input
type=
"checkbox"
name=
"shareapi_default_expire_date"
id=
"shareapiDefaultExpireDate"
value=
"1"
<?php
if
(
$_
[
'shareDefaultExpireDateSet'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'shareDefaultExpireDateSet'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"shareapiDefaultExpireDate"
>
<?php
p
(
$l
->
t
(
'Set default expiration date'
));
?>
</label><br/>
<label
for=
"shareapiDefaultExpireDate"
>
<?php
p
(
$l
->
t
(
'Set default expiration date'
));
?>
</label><br/>
<div
id=
"setDefaultExpireDate"
<?php
(
$_
[
'shareDefaultExpireDateSet'
]
===
'no'
)
?
print_unescaped
(
'class="hidden indent"'
)
:
print_unescaped
(
'class="indent"'
);
?>
>
</p>
<p
id=
"setDefaultExpireDate"
class=
"double-indent
<?php
if
(
$_
[
'allowLinks'
]
!==
'yes'
||
$_
[
'shareDefaultExpireDateSet'
]
===
'no'
||
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<?php
p
(
$l
->
t
(
'Expire after '
));
?>
<?php
p
(
$l
->
t
(
'Expire after '
));
?>
<input
type=
"text"
name=
'shareapi_expire_after_n_days'
id=
"shareapiExpireAfterNDays"
placeholder=
"
<?php
p
(
'7'
)
?>
"
<input
type=
"text"
name=
'shareapi_expire_after_n_days'
id=
"shareapiExpireAfterNDays"
placeholder=
"
<?php
p
(
'7'
)
?>
"
value=
'
<?php
p
(
$_
[
'shareExpireAfterNDays'
])
?>
'
/>
value=
'
<?php
p
(
$_
[
'shareExpireAfterNDays'
])
?>
'
/>
<?php
p
(
$l
->
t
(
'days'
));
?>
<?php
p
(
$l
->
t
(
'days'
));
?>
<input
type=
"checkbox"
name=
"shareapi_enforce_expire_date"
id=
"shareapiEnforceExpireDate"
<input
type=
"checkbox"
name=
"shareapi_enforce_expire_date"
id=
"shareapiEnforceExpireDate"
value=
"1"
<?php
if
(
$_
[
'shareEnforceExpireDate'
]
==
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'shareEnforceExpireDate'
]
==
=
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"shareapiEnforceExpireDate"
>
<?php
p
(
$l
->
t
(
'Enforce expiration date'
));
?>
</label><br/>
<label
for=
"shareapiEnforceExpireDate"
>
<?php
p
(
$l
->
t
(
'Enforce expiration date'
));
?>
</label><br/>
</div>
</p>
<p
class=
"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
</div>
</td>
</tr>
<tr>
<td
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
print_unescaped
(
'class="hidden"'
);
?>
>
<input
type=
"checkbox"
name=
"shareapi_allow_resharing"
id=
"allowResharing"
<input
type=
"checkbox"
name=
"shareapi_allow_resharing"
id=
"allowResharing"
value=
"1"
<?php
if
(
$_
[
'allowResharing'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'allowResharing'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"allowResharing"
>
<?php
p
(
$l
->
t
(
'Allow resharing'
));
?>
</label><br/>
<label
for=
"allowResharing"
>
<?php
p
(
$l
->
t
(
'Allow resharing'
));
?>
</label><br/>
</td>
</p>
</tr>
<p
class=
"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<tr>
<td
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
print_unescaped
(
'class="hidden"'
);
?>
>
<input
type=
"checkbox"
name=
"shareapi_only_share_with_group_members"
id=
"onlyShareWithGroupMembers"
<input
type=
"checkbox"
name=
"shareapi_only_share_with_group_members"
id=
"onlyShareWithGroupMembers"
value=
"1"
<?php
if
(
$_
[
'onlyShareWithGroupMembers'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'onlyShareWithGroupMembers'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"onlyShareWithGroupMembers"
>
<?php
p
(
$l
->
t
(
'Restrict users to only share with users in their groups'
));
?>
</label><br/>
<label
for=
"onlyShareWithGroupMembers"
>
<?php
p
(
$l
->
t
(
'Restrict users to only share with users in their groups'
));
?>
</label><br/>
</td>
</p>
</tr>
<p
class=
"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<tr>
<td
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
print_unescaped
(
'class="hidden"'
);
?>
>
<input
type=
"checkbox"
name=
"shareapi_allow_mail_notification"
id=
"allowMailNotification"
<input
type=
"checkbox"
name=
"shareapi_allow_mail_notification"
id=
"allowMailNotification"
value=
"1"
<?php
if
(
$_
[
'allowMailNotification'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'allowMailNotification'
]
===
'yes'
)
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"allowMailNotification"
>
<?php
p
(
$l
->
t
(
'Allow users to send mail notification for shared files'
));
?>
</label><br/>
<label
for=
"allowMailNotification"
>
<?php
p
(
$l
->
t
(
'Allow users to send mail notification for shared files'
));
?>
</label><br/>
</td>
</p>
</tr>
<p
class=
"
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<tr>
<td
<?php
if
(
$_
[
'shareAPIEnabled'
]
===
'no'
)
print_unescaped
(
'class="hidden"'
);
?>
>
<input
type=
"checkbox"
name=
"shareapi_exclude_groups"
id=
"shareapiExcludeGroups"
<input
type=
"checkbox"
name=
"shareapi_exclude_groups"
id=
"shareapiExcludeGroups"
value=
"1"
<?php
if
(
$_
[
'shareExcludeGroups'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
value=
"1"
<?php
if
(
$_
[
'shareExcludeGroups'
])
print_unescaped
(
'checked="checked"'
);
?>
/>
<label
for=
"shareapiExcludeGroups"
>
<?php
p
(
$l
->
t
(
'Exclude groups from sharing'
));
?>
</label><br/>
<label
for=
"shareapiExcludeGroups"
>
<?php
p
(
$l
->
t
(
'Exclude groups from sharing'
));
?>
</label><br/>
<div
id=
"selectExcludedGroups"
class=
"
<?php
(
$_
[
'shareExcludeGroups'
])
?
p
(
'indent'
)
:
p
(
'hidden indent'
);
?>
"
>
</p>
<p
id=
"selectExcludedGroups"
class=
"indent
<?php
if
(
!
$_
[
'shareExcludeGroups'
]
||
$_
[
'shareAPIEnabled'
]
===
'no'
)
p
(
'hidden'
);
?>
"
>
<select
<select
class=
"groupsselect"
class=
"groupsselect"
id=
"excludedGroups"
data-placeholder=
"groups"
id=
"excludedGroups"
data-placeholder=
"groups"
...
@@ -306,10 +296,7 @@ if (!$_['internetconnectionworking']) {
...
@@ -306,10 +296,7 @@ if (!$_['internetconnectionworking']) {
</select>
</select>
<br
/>
<br
/>
<em>
<?php
p
(
$l
->
t
(
'These groups will still be able to receive shares, but not to initiate them.'
));
?>
</em>
<em>
<?php
p
(
$l
->
t
(
'These groups will still be able to receive shares, but not to initiate them.'
));
?>
</em>
</div>
</p>
</td>
</tr>
</table>
</div>
</div>
<div
class=
"section"
id=
"security"
>
<div
class=
"section"
id=
"security"
>
...
...
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