Commit baddcfc5 authored by Thomas Citharel's avatar Thomas Citharel 🌲

add loader on attaching domain

Signed-off-by: Thomas Citharel's avatarThomas Citharel <tcit@tcit.fr>
parent c64d4c8b
Pipeline #26257 passed with stage
in 4 minutes and 52 seconds
......@@ -13,20 +13,24 @@ $(document).ready(() => {
* Checking domain name
*/
const domainInput = $('#attach_domain_domainName');
const checkDNS = $('#check_dns_config');
const siteToAttach = $('#site_to_attach');
const success = $('.success');
const failure = $('.failure');
const checkDomainToAttach = function(domain) {
checkDNS.html('<span class="glyphicon glyphicon-refresh spinning"></span> Chargement...');
checkDomainAvailability(domain).then(() => {
domainInput.parent().removeClass('has-error');
domainInput.parent().addClass('has-success');
checkDNS.html('Vérifier la configuration');
failure.addClass('hidden');
siteToAttach.removeClass('hidden');
success.removeClass('hidden');
}, () => {
siteToAttach.addClass('hidden');
success.addClass('hidden');
checkDNS.html('Vérifier la configuration');
domainInput.parent().removeClass('has-success');
domainInput.parent().addClass('has-error');
failure.removeClass('hidden');
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment