summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorHans Bakker <hansmbakker@gmail.com>2011-07-03 01:52:17 +0200
committerHans Bakker <hansmbakker@gmail.com>2011-07-03 01:52:17 +0200
commit1daeb13dd9ac4367eadb1265e07e17fced74413d (patch)
treecb3ee1db7e3543008b81802b7eb8501de649ec56 /files
parentf2845bbea877e6ddaba897879b0625c0535b5fe1 (diff)
downloadnextcloud-server-1daeb13dd9ac4367eadb1265e07e17fced74413d.tar.gz
nextcloud-server-1daeb13dd9ac4367eadb1265e07e17fced74413d.zip
Usability improvements:
-Added javascript to enable/disable radiobuttons -Added labels
Diffstat (limited to 'files')
-rw-r--r--files/templates/admin.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/files/templates/admin.php b/files/templates/admin.php
index 74b99b771c0..4dde9c510c4 100644
--- a/files/templates/admin.php
+++ b/files/templates/admin.php
@@ -1,16 +1,26 @@
-<form action='#' method='post'>
+<script type="text/javascript">
+function switchPublicFolder()
+{
+ var publicEnable = document.forms['filesForm'].elements['publicEnable'].checked;
+ var sharingaimGroup = document.forms['filesForm'].elements['sharingaim'];
+ for(i=0;i<sharingaimGroup.length;i++) {
+ sharingaimGroup[i].disabled = !publicEnable;
+ }
+}
+</script>
+<form name="filesForm" action='#' method='post'>
<?php if($_['htaccessWorking']):?>
- <?php echo $l->t( 'Maximum upload size' ); ?> <input name='maxUploadSize' value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
+ <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
<?php endif;?>
- <input type="checkbox" /> <?php echo $l->t( 'Allow public folders' ); ?><br>
+ <input type="checkbox" name="publicEnable" id="publicEnable" onClick="switchPublicFolder()" /><label for="publicEnable"> <?php echo $l->t( 'Allow public folders' ); ?></label><br>
- <?php echo $l->t( '(if public is enabled)' ); ?><br>
- <input type="radio" name="sharingaim" checked="checked" /> <?php echo $l->t( 'separated from webdav storage' ); ?><br>
- <input type="radio" name="sharingaim" /> <?php echo $l->t( 'let the user decide' ); ?><br>
- <input type="radio" name="sharingaim" /> <?php echo $l->t( 'folder "/public" in webdav storage' ); ?><br>
- <?php echo $l->t( '(endif)' ); ?><br>
+ <div style="padding-left: 20px">
+ <input type="radio" name="sharingaim" id="separated" checked="checked" /><label for="separated"> <?php echo $l->t( 'separated from webdav storage' ); ?></label><br>
+ <input type="radio" name="sharingaim" id="userdecide" /><label for="userdecide"> <?php echo $l->t( 'let the user decide' ); ?></label><br>
+ <input type="radio" name="sharingaim" id="inwebdav" /><label for="inwebdav"> <?php echo $l->t( 'folder "/public" in webdav storage' ); ?></label>
+ </div>
- <input type="checkbox" /> <?php echo $l->t( 'Allow downloading shared files' ); ?><br>
- <input type="checkbox" /> <?php echo $l->t( 'Allow uploading in shared directory' ); ?><br>
+ <input type="checkbox" id="downloadShared" /><label for="downloadShared"> <?php echo $l->t( 'Allow downloading shared files' ); ?></label><br>
+ <input type="checkbox" id="uploadShared" /><label for="uploadShared"> <?php echo $l->t( 'Allow uploading in shared directory' ); ?></label><br>
<input type='submit' value='Save'/>
</form>