diff options
author | nikrou <nikrou@piwigo.org> | 2010-02-27 20:00:00 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2010-02-27 20:00:00 +0000 |
commit | d4287e2ad82770d8903dc1eb6cb906bb690de63a (patch) | |
tree | 614d7d8e12c9cbf94ba09682e09206aef370dd82 /admin/template/goto/include | |
parent | 4986d620e35d0ddecfb88c444cc220d379a48cda (diff) |
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
git-svn-id: http://piwigo.org/svn/trunk@4985 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/template/goto/include')
-rw-r--r-- | admin/template/goto/include/install.inc.tpl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/admin/template/goto/include/install.inc.tpl b/admin/template/goto/include/install.inc.tpl new file mode 100644 index 000000000..b153f0f30 --- /dev/null +++ b/admin/template/goto/include/install.inc.tpl @@ -0,0 +1,19 @@ +<script type="text/javascript" src="template-common/lib/jquery.packed.js"></script> +{literal} +<script type="text/javascript"> +$(function() { + $option_selected = $('#dblayer option:selected').attr('value'); + if ($option_selected=='sqlite' || $option_selected=='pdo-sqlite') { + $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide(); + } + $('#dblayer').change(function() { + $db = this; + if ($db.value=='sqlite' || $db.value=='pdo-sqlite') { + $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().hide(); + } else { + $('input[name=dbhost],input[name=dbuser],input[name=dbpasswd]').parent().parent().show(); + } + }); + }); +</script> +{/literal} |