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
mahara
mahara
Commits
1dd8c1c8
Commit
1dd8c1c8
authored
Mar 18, 2015
by
Son Nguyen
Committed by
Gerrit Code Review
Mar 18, 2015
Browse files
Merge "File -> edit: change Allow comment checkbox to switchbox"
parents
afbb3b87
bdfdbd7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/form/elements/filebrowser.php
View file @
1dd8c1c8
...
...
@@ -1490,6 +1490,11 @@ function pieform_element_filebrowser_get_headdata($element) {
$headdata
[]
=
'<link href="'
.
get_config
(
'wwwroot'
)
.
'js/dropzone/css/dropzone.css" type="text/css" rel="stylesheet">'
;
$headdata
[]
=
'<script type="application/javascript" src="'
.
get_config
(
'wwwroot'
)
.
'artefact/file/js/filedropzone.js"></script>'
;
}
if
(
$element
[
'config'
][
'edit'
])
{
// Add switchbox css if filebrowser is allowed to edit
require_once
(
get_config
(
'docroot'
)
.
'lib/form/elements/switchbox.php'
);
$headdata
[]
=
join
(
' '
,
pieform_element_switchbox_get_headdata
(
$element
));
}
$strings
=
PluginArtefactFile
::
jsstrings
(
'filebrowser'
);
$jsstrings
=
''
;
foreach
(
$strings
as
$section
=>
$sectionstrings
)
{
...
...
htdocs/theme/raw/artefact/file/templates/form/editfile.tpl
View file @
1dd8c1c8
...
...
@@ -62,8 +62,15 @@
{/
if
}
{
license_form_files
(
$prefix
,
'edit'
)
}
<tr>
<th><label
for=
"
{
$prefix
}
_edit_allowcomments"
>
{
str
tag
=
allowcomments
section
=
artefact
.
comment
}
</label></th>
<td><input
type=
"checkbox"
name=
"
{
$prefix
}
_edit_allowcomments"
id=
"
{
$prefix
}
_edit_allowcomments"
{
if
$fileinfo
->
allowcomments
}
checked
{/
if
}
/></td>
<th><label
for=
"
{
$prefix
}
_edit_allowcomments"
>
{
str
tag
=
Comments
section
=
artefact
.
comment
}
</label></th>
<td><div
class=
"form-switch "
>
<div
class=
"switch onoff"
><input
class=
"switchbox"
type=
"checkbox"
name=
"
{
$prefix
}
_edit_allowcomments"
id=
"
{
$prefix
}
_edit_allowcomments"
{
if
$fileinfo
->
allowcomments
}
checked
{/
if
}
/>
<label
for=
"
{
$prefix
}
_edit_allowcomments"
class=
"switch-label"
>
<span
class=
"switch-inner"
></span>
<span
class=
"switch-switch"
></span>
</label>
</div>
</div></td>
</tr>
<tr>
<td></td>
...
...
htdocs/theme/raw/static/style/switchbox.css
View file @
1dd8c1c8
...
...
@@ -57,7 +57,7 @@
color
:
#FFFFFF
;
}
.form-switch
.switch-inner
:after
{
content
:
"
NYET
"
;
content
:
"
OFF
"
;
padding-right
:
10px
;
background-color
:
#BFBFBF
;
color
:
#000000
;
...
...
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