From aa78fde6a92f66b84d626e114d8b54a5fb6ece0c Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 14 Nov 2012 07:19:43 -0500 Subject: [PATCH] - Added function for IPv6 prefixes in multiserver mirror setups to nginx plugin. --- interface/web/sites/templates/database_edit.htm | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/templates/database_edit.htm b/interface/web/sites/templates/database_edit.htm index 4207a78..8ef4ff2 100644 --- a/interface/web/sites/templates/database_edit.htm +++ b/interface/web/sites/templates/database_edit.htm @@ -90,13 +90,33 @@ <input type="hidden" name="id" value="{tmpl_var name='id'}"> <div class="buttonHolder buttons"> - <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/database_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> - <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/database_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> + <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/database_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> + <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/database_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> </div> </div> </div> <script language="JavaScript" type="text/javascript"> + <tmpl_if name="is_admin"> + function reloadDatabaseUsers() { + var parentDomainId = jQuery('#parent_domain_id').val() + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : parentDomainId, 'type': 'getdatabaseusers'}, function(data) { + var options = '<option value=""></option>'; + $.each(data, function(key, val) { + options += '<option value="'+key+'"'+ ($('#database_user_id').val() == key ? ' selected="selected"' : '') +'>'+val+'</option>'; + }); + $('#database_user_id').html(options).change(); + + options = '<option value=""></option>'; + $.each(data, function(key, val) { + options += '<option value="'+key+'"'+ ($('#database_ro_user_id').val() == key ? ' selected="selected"' : '') +'>'+val+'</option>'; + }); + $('#database_ro_user_id').html(options).change(); + }); + } + jQuery('#parent_domain_id').change(function() { reloadDatabaseUsers(); }); + reloadDatabaseUsers(); + </tmpl_if> jQuery('#remote_ips').ispconfigSearch({ dataSrc: '/sites/ajax_get_json.php?type=get_ipv4', resultsLimit: '$ <tmpl_var name="globalsearch_resultslimit_of_txt"> % <tmpl_var name="globalsearch_resultslimit_results_txt">', -- Gitblit v1.9.1