Commit 1dd8c1c8 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "File -> edit: change Allow comment checkbox to switchbox"

parents afbb3b87 bdfdbd7f
...@@ -1490,6 +1490,11 @@ function pieform_element_filebrowser_get_headdata($element) { ...@@ -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[] = '<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>'; $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'); $strings = PluginArtefactFile::jsstrings('filebrowser');
$jsstrings = ''; $jsstrings = '';
foreach ($strings as $section => $sectionstrings) { foreach ($strings as $section => $sectionstrings) {
......
...@@ -62,8 +62,15 @@ ...@@ -62,8 +62,15 @@
{/if} {/if}
{license_form_files($prefix, 'edit')} {license_form_files($prefix, 'edit')}
<tr> <tr>
<th><label for="{$prefix}_edit_allowcomments">{str tag=allowcomments section=artefact.comment}</label></th> <th><label for="{$prefix}_edit_allowcomments">{str tag=Comments section=artefact.comment}</label></th>
<td><input type="checkbox" name="{$prefix}_edit_allowcomments" id="{$prefix}_edit_allowcomments" {if $fileinfo->allowcomments}checked {/if}/></td> <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>
<tr> <tr>
<td></td> <td></td>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
color: #FFFFFF; color: #FFFFFF;
} }
.form-switch .switch-inner:after { .form-switch .switch-inner:after {
content: "NYET"; content: "OFF";
padding-right: 10px; padding-right: 10px;
background-color: #BFBFBF; background-color: #BFBFBF;
color: #000000; color: #000000;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment