I changed my mind about the more complex configuration options. We go with good default for now and don´t expose all the technical options to the users.
They can still override in the config file if it´s really really needed and they know what they are doing
+$(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(){
// Add history button to files/index.php
$('#dropdown').show('blind');
$('#share_with').chosen();
-}
\ No newline at end of file
+}
-<form id="external">
- <fieldset class="personalblock">
- <strong>Versions</strong><br />
-
- Configuration goes here...
- </fieldset>
-</form>
\ No newline at end of file
+<form id="versions">
+ <fieldset class="personalblock">
+ <input type="checkbox" name="versions" id="versions" value="1" <?php if (OC_Config::getValue('versions', 'true')=='true') echo ' checked="checked"'; ?> /> <label for="versions"><?php echo $l->t('Enable Files Versioning'); ?></label> <br/>
+ </fieldset>
+</form>