Add provisional cloudron flow
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { Button, FormGroup, TextInput, PasswordInput, EmailInput } from 'pankow';
|
||||
import { Button, Checkbox, FormGroup, TextInput, PasswordInput, EmailInput } from 'pankow';
|
||||
import ProvisionModel from '../models/ProvisionModel.js';
|
||||
import { redirectIfNeeded } from '../utils.js';
|
||||
|
||||
@@ -21,12 +21,14 @@ const username = ref('');
|
||||
const password = ref('');
|
||||
const firstTimeLoginUrl = ref('');
|
||||
const setupToken = ref('');
|
||||
const acceptLicense = ref(false);
|
||||
|
||||
const isValid = computed(() => {
|
||||
if (!displayName.value) return false;
|
||||
if (!email.value) return false;
|
||||
if (!username.value) return false;
|
||||
if (!password.value) return false;
|
||||
if (!acceptLicense.value) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
@@ -120,6 +122,8 @@ onMounted(async () => {
|
||||
<small class="text-danger">{{ formError.password }}</small>
|
||||
</FormGroup>
|
||||
|
||||
<Checkbox v-model="acceptLicense" label="Accept Cloudron License" required/>
|
||||
|
||||
<Button :disabled="busy || !isValid" :loading="busy" @click="onOwnerSubmit()">Create Admin</Button>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user