Fix switching to unstable mode
This commit is contained in:
parent
f4f11678d8
commit
6afe897884
@ -40,9 +40,12 @@ namespace OCA\Documents;
|
||||
|
||||
$tmpl = new \OCP\Template('documents', 'documents', 'user');
|
||||
|
||||
$unstable = \OCP\Config::getAppValue('documents', 'unstable', 'false');
|
||||
$maxUploadFilesize = \OCP\Util::maxUploadFilesize("/");
|
||||
$savePath = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/');
|
||||
|
||||
|
||||
$tmpl->assign('useUnstable', $unstable);
|
||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
||||
$tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize));
|
||||
$tmpl->assign('savePath', $savePath);
|
||||
|
@ -88,6 +88,7 @@ var documentsMain = {
|
||||
|
||||
onStartup: function() {
|
||||
"use strict";
|
||||
documentsMain.useUnstable = $('#webodf-unstable').val()==='true';
|
||||
documentsMain.UI.init();
|
||||
|
||||
if (!OC.currentUser){
|
||||
|
@ -14,14 +14,14 @@
|
||||
target="file_upload_target_1">
|
||||
<?php if($_['uploadMaxFilesize'] >= 0):?>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
|
||||
value="<?php p($_['uploadMaxFilesize']) ?>">
|
||||
value="<?php p($_['uploadMaxFilesize']) ?>" />
|
||||
<?php endif;?>
|
||||
<!-- Send the requesttoken, this is needed for older IE versions
|
||||
because they don't send the CSRF token via HTTP header in this case -->
|
||||
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
|
||||
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken" />
|
||||
<input type="hidden" class="max_human_file_size"
|
||||
value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)">
|
||||
<input type="hidden" name="dir" value="<?php p($_['savePath']) ?>" id="dir">
|
||||
value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)" />
|
||||
<input type="hidden" name="dir" value="<?php p($_['savePath']) ?>" id="dir" />
|
||||
<input type="file" id="file_upload_start" name='files[]' />
|
||||
<a href="#" class="upload svg">
|
||||
<label><?php p('Upload') ?></label></a>
|
||||
@ -33,3 +33,4 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="hidden" id="webodf-unstable" value="<?php p($_['useUnstable']) ?>" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user