mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 05:56:15 -04:00
Account portal, download page, non-standard module docs
This ends v1 on the website. Docs archive still available through a sidebar nav link in the docs.
This commit is contained in:
parent
49ed10d267
commit
4f6d355a97
37 changed files with 1678 additions and 56 deletions
27
src/resources/js/account/register-package.js
Normal file
27
src/resources/js/account/register-package.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
$(function() {
|
||||
$('form input').first().focus();
|
||||
|
||||
$('form').submit(function(event) {
|
||||
$('#submit').prop('disabled', true);
|
||||
|
||||
$.post($(this).prop("action"), $(this).serialize()).done(function() {
|
||||
swal({
|
||||
icon: "success",
|
||||
title: "It's yours",
|
||||
text: "Package claimed. Its documentation is now available on our website and you are responsible for maintaining it. Thank you!"
|
||||
}).then(function() {
|
||||
// TODO: ...
|
||||
// window.location = "/account/login";
|
||||
});
|
||||
}).fail(function(jqxhr, status, error) {
|
||||
swal({
|
||||
icon: "error",
|
||||
title: error,
|
||||
content: errorContent(jqxhr)
|
||||
});
|
||||
$('#submit').prop('disabled', false);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue