Implement basic flavor support

This commit is contained in:
Tom Wiesing 2023-11-02 20:06:09 +01:00
parent 9a3e508ce8
commit d6c0c465e4
No known key found for this signature in database
24 changed files with 246 additions and 82 deletions

View file

@ -13,7 +13,14 @@ const contentSecurityPolicy = document.getElementById('contentsecuritypolicy') a
system.addEventListener('submit', (evt) => {
evt.preventDefault()
Provision({ Slug: slug.value, System: { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked, ContentSecurityPolicy: contentSecurityPolicy.value } })
const flavorElement = document.querySelector('input[name="flavor"]:checked');
const flavor = (flavorElement instanceof HTMLInputElement) ? flavorElement.value : "";
Provision({
Slug: slug.value,
Flavor: flavor,
System: { PHP: php.value, OpCacheDevelopment: opcacheDevelopment.checked, ContentSecurityPolicy: contentSecurityPolicy.value }
})
.then(slug => {
location.href = '/admin/instance/' + slug
})