Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
85b8443b
Commit
85b8443b
authored
Oct 04, 2018
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Oct 04, 2018
Browse files
Merge "Bug 1795097: placing 'locked' above 'locked blocks'"
parents
5c860d15
0dc60d48
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/view/editlayout.php
View file @
85b8443b
...
...
@@ -340,12 +340,24 @@ function get_advanced_elements() {
'rules'
=>
array
(
'maxlength'
=>
100
,
'regex'
=>
get_config
(
'cleanurlvalidate'
)),
'ignore'
=>
!
$urlallowed
,
),
'lockblocks'
=>
array
(
'type'
=>
'switchbox'
,
'title'
=>
get_string
(
'lockblocks'
,
'view'
),
'description'
=>
get_string
(
'lockblocksdescription'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'lockblocks'
),
),
);
if
(
$group
)
{
$grouproles
=
$USER
->
get
(
'grouproles'
);
if
(
$grouproles
[
$group
]
==
'admin'
)
{
$elements
[
'locked'
]
=
array
(
'type'
=>
'switchbox'
,
'title'
=>
get_string
(
'Locked'
,
'view'
),
'description'
=>
get_string
(
'lockedgroupviewdesc'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'locked'
),
'disabled'
=>
$view
->
get
(
'type'
)
==
'grouphomepage'
,
// This page unreachable for grouphomepage anyway
);
}
}
$elements
[
'lockblocks'
]
=
array
(
'type'
=>
'switchbox'
,
'title'
=>
get_string
(
'lockblocks'
,
'view'
),
'description'
=>
get_string
(
'lockblocksdescription'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'lockblocks'
),
);
if
(
!
(
$group
||
$institution
))
{
$default
=
$view
->
get
(
'ownerformat'
);
...
...
@@ -361,18 +373,6 @@ function get_advanced_elements() {
'rules'
=>
array
(
'required'
=>
true
),
);
}
if
(
$group
)
{
$grouproles
=
$USER
->
get
(
'grouproles'
);
if
(
$grouproles
[
$group
]
==
'admin'
)
{
$elements
[
'locked'
]
=
array
(
'type'
=>
'switchbox'
,
'title'
=>
get_string
(
'Locked'
,
'view'
),
'description'
=>
get_string
(
'lockedgroupviewdesc'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'locked'
),
'disabled'
=>
$view
->
get
(
'type'
)
==
'grouphomepage'
,
// This page unreachable for grouphomepage anyway
);
}
}
if
(
get_config
(
'allowanonymouspages'
))
{
$elements
[
'anonymise'
]
=
array
(
'type'
=>
'switchbox'
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment