+</form>
+
+<script type="text/javascript">
+ <!--
+
+var used_dbsources = {[% FOREACH client = SELF.all_clients %]
+ "[% JavaScript.escape(client.dbhost || 'localhost') %]:[% JavaScript.escape(client.dbport || '5432') %]:[% JavaScript.escape(client.dbname || 'localhost') %]": "[% JavaScript.escape(client.name) %]"[% UNLESS loop.last %],[% END %][% END %]
+};
+
+$(function() {
+ $('#submit').click(function() {
+ var client = used_dbsources[$('#dbhost').val() + ':' + $('#dbport').val() + ':' + $('#db').val()];
+ var question = !client ? kivi.t8('Are you sure?') : kivi.t8('The selected database is still configured for client "#1". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?', [ client ]);
+
+ return confirm(question);
+ });
+});
+
+ -->
+</script>
+
+[% END %]