]> source.dussan.org Git - nextcloud-server.git/commitdiff
show tablespace only for oracle, hide dbhost for sqlite, remove unnecessary js &...
authorJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 24 Jul 2013 16:02:36 +0000 (18:02 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 24 Jul 2013 17:56:57 +0000 (19:56 +0200)
core/js/setup.js
core/templates/installation.php

index 76812b2997969e28dc8bc3725b56ab2aaf7a9138..c0df1ed96b09b2d0b45b4188e13c8feb76aaa81b 100644 (file)
@@ -11,42 +11,36 @@ $(document).ready(function() {
        $('#selectDbType').buttonset();
        $('#datadirContent').hide(250);
        $('#databaseField').hide(250);
-       if($('#hasSQLite').val()=='true'){
+       if($('#hasSQLite').val()){
                $('#use_other_db').hide();
-               $('#dbhost').hide();
-               $('#dbhostlabel').hide();
+               $('#use_oracle_db').hide();
        }
        $('#adminlogin').change(function(){
                $('#adminlogin').val($.trim($('#adminlogin').val()));
        });
        $('#sqlite').click(function() {
                $('#use_other_db').slideUp(250);
-               $('#dbhost').hide(250);
-               $('#dbhostlabel').hide(250);
+               $('#use_oracle_db').slideUp(250);
        });
 
        $('#mysql').click(function() {
                $('#use_other_db').slideDown(250);
-               $('#dbhost').show(250);
-               $('#dbhostlabel').show(250);
+               $('#use_oracle_db').slideUp(250);
        });
-       
+
        $('#pgsql').click(function() {
                $('#use_other_db').slideDown(250);
-               $('#dbhost').show(250);
-               $('#dbhostlabel').show(250);
+               $('#use_oracle_db').slideUp(250);
        });
-       
+
        $('#oci').click(function() {
                $('#use_other_db').slideDown(250);
-               $('#dbhost').show(250);
-               $('#dbhostlabel').show(250);
+               $('#use_oracle_db').show(250);
        });
-    
+
        $('#mssql').click(function() {
                $('#use_other_db').slideDown(250);
-               $('#dbhost').show(250);
-               $('#dbhostlabel').show(250);
+               $('#use_oracle_db').slideUp(250);
        });
 
        $('input[checked]').trigger('click');
index 6de67a83d427d02a6bb37e7fe9dce8e7fd62cd31..77c455304d3258118cef825cf3d23ed6670d44a4 100644 (file)
                        <?php OC_Helper::init_radio('dbtype', 'oci', 'sqlite'); ?>/>
                <?php endif; ?>
                <?php endif; ?>
-        
+
                <?php if($_['hasMSSQL']): ?>
                <input type='hidden' id='hasMSSQL' value='true'/>
                <?php if(!$_['hasSQLite'] and !$_['hasMySQL'] and !$_['hasPostgreSQL'] and !$_['hasOracle']): ?>
                <label class="mssql" for="mssql">MS SQL</label>
                <input type="radio" name="dbtype" value='mssql' id="mssql" <?php OC_Helper::init_radio('dbtype', 'mssql', 'sqlite'); ?>/>
                <?php endif; ?>
-               <?php endif; ?>        
+               <?php endif; ?>
                </div>
 
                <?php if($hasOtherDB): ?>
                                        value="<?php p(OC_Helper::init_var('dbname')); ?>"
                                        autocomplete="off" pattern="[0-9a-zA-Z$_-]+" />
                        </p>
-               </div>
-               <?php endif; ?>
-               <?php if($_['hasOracle']): ?>
-               <div id="use_oracle_db">
-                       <p class="infield groupmiddle">
-                               <label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label>
-                               <input type="text" name="dbtablespace" id="dbtablespace" placeholder=""
-                                       value="<?php p(OC_Helper::init_var('dbtablespace')); ?>" autocomplete="off" />
+                       <?php if($_['hasOracle']): ?>
+                       <div id="use_oracle_db">
+                               <p class="infield groupmiddle">
+                                       <label for="dbtablespace" class="infield"><?php p($l->t( 'Database tablespace' )); ?></label>
+                                       <input type="text" name="dbtablespace" id="dbtablespace" placeholder=""
+                                               value="<?php p(OC_Helper::init_var('dbtablespace')); ?>" autocomplete="off" />
+                               </p>
+                       </div>
+                       <?php endif; ?>
+                       <p class="infield groupbottom">
+                               <label for="dbhost" class="infield"><?php p($l->t( 'Database host' )); ?></label>
+                               <input type="text" name="dbhost" id="dbhost" placeholder=""
+                                       value="<?php p(OC_Helper::init_var('dbhost')); ?>" />
                        </p>
                </div>
                <?php endif; ?>
-               <p class="infield groupbottom">
-                       <label for="dbhost" class="infield" id="dbhostlabel"><?php p($l->t( 'Database host' )); ?></label>
-                       <input type="text" name="dbhost" id="dbhost" placeholder=""
-                               value="<?php p(OC_Helper::init_var('dbhost')); ?>" />
-               </p>
        </fieldset>
 
        <div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" /></div>