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
62d11942
Commit
62d11942
authored
Oct 03, 2018
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Oct 03, 2018
Browse files
Merge "Bug 1795097: Move some "basic" view settings to "advanced" section"
parents
63d2c8ed
20d715bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/view/editlayout.php
View file @
62d11942
...
...
@@ -276,12 +276,6 @@ function get_basic_elements() {
'defaultvalue'
=>
$view
->
get
(
'description'
),
'rules'
=>
array
(
'maxlength'
=>
65536
),
),
'lockblocks'
=>
array
(
'type'
=>
'switchbox'
,
'title'
=>
get_string
(
'lockblocks'
,
'view'
),
'description'
=>
get_string
(
'lockblocksdescription'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'lockblocks'
),
),
'tags'
=>
array
(
'type'
=>
'tags'
,
'title'
=>
get_string
(
'tags'
),
...
...
@@ -305,26 +299,6 @@ function get_basic_elements() {
'help'
=>
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'
,
'title'
=>
get_string
(
'anonymise'
,
'view'
),
'description'
=>
get_string
(
'anonymisedescription'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'anonymise'
),
);
}
return
$elements
;
}
...
...
@@ -366,6 +340,12 @@ 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
||
$institution
))
{
$default
=
$view
->
get
(
'ownerformat'
);
...
...
@@ -381,6 +361,26 @@ 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'
,
'title'
=>
get_string
(
'anonymise'
,
'view'
),
'description'
=>
get_string
(
'anonymisedescription'
,
'view'
),
'defaultvalue'
=>
$view
->
get
(
'anonymise'
),
);
}
return
$elements
;
}
...
...
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