source: trunk/admin/themes/default/template/include/install.inc.tpl @ 9559

Last change on this file since 9559 was 4985, checked in by nikrou, 14 years ago

Feature 1460 : Customize form installation depending on database engine

  • sqlite is proposed by default if severals

database engine are available (cf conf)

  • sqlite is proposed before pdo-sqlite
  • remove host, user and password for sqlite
File size: 770 bytes
Line 
1<script type="text/javascript" src="template-common/lib/jquery.packed.js"></script>
2{literal}
3<script type="text/javascript">
4$(function() {
5    $option_selected = $('#dblayer option:selected').attr('value');
6    if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') {
7       $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
8    }
9    $('#dblayer').change(function() {
10        $db = this;
11        if ($db.value=='sqlite' || $db.value=='pdo-sqlite') {
12           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide();
13        } else {
14           $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show();
15        }
16      });
17  });
18</script>
19{/literal}
Note: See TracBrowser for help on using the repository browser.