Skip to content
Snippets Groups Projects
Commit d9e75c2b authored by Björn Schießle's avatar Björn Schießle
Browse files

remove admin settings for versions

parent f26c4774
No related branches found
No related tags found
No related merge requests found
<?php
OCP\JSON::checkAppEnabled('files_versions');
OCP\JSON::checkAdminUser();
OCP\JSON::callCheck();
if (OCP\Config::getSystemValue('versions', 'true')=='true') {
OCP\Config::setSystemValue('versions', 'false');
} else {
OCP\Config::setSystemValue('versions', 'true');
}
$(document).ready(function() {
$('#versions').bind('change', function() {
var checked = 1;
if (!this.checked) {
checked = 0;
}
$.post(OC.filePath('files_versions','ajax','togglesettings.php'), 'versions='+checked);
});
});
$(document).ready(function(){
if (typeof FileActions !== 'undefined') {
// Add history button to 'files/index.php'
......
<?php
OCP\User::checkAdminUser();
OCP\Util::addscript( 'files_versions', 'versions' );
$tmpl = new OCP\Template( 'files_versions', 'settings');
return $tmpl->fetchPage();
<form id="versionssettings">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Files Versioning');?></strong></legend>
<input type="checkbox" name="versions" id="versions" value="1"
<?php if (OCP\Config::getSystemValue('versions', 'true')=='true')
echo ' checked="checked"';
?> /> <label for="versions"><?php echo $l->t('Enable'); ?></label> <br/>
</fieldset>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment