feat: signups can now be enabled/disabled from portal settings

This commit is contained in:
Jannat Patel
2025-04-07 18:15:30 +05:30
parent c70da08078
commit 5bc44e6fe5
6 changed files with 35 additions and 15 deletions

View File

@@ -146,7 +146,6 @@ function resetEditor(value: string, resetHistory = false) {
value = getModelValue()
aceEditor?.setValue(value)
aceEditor?.clearSelection()
console.log(isDark.value)
aceEditor?.setTheme(isDark.value ? 'ace/theme/twilight' : 'ace/theme/chrome')
props.autofocus && aceEditor?.focus()
if (resetHistory) {

View File

@@ -328,19 +328,26 @@ const tabsStructure = computed(() => {
icon: 'LogIn',
fields: [
{
label: 'Custom Content',
label: 'Identify User Persona',
name: 'user_category',
type: 'checkbox',
description:
'Enable this option to identify the user persona during signup.',
},
{
label: 'Disable signup',
name: 'disable_signup',
type: 'checkbox',
description:
'New users will have to be manually registered by Admins.',
},
{
label: 'Signup Consent HTML',
name: 'custom_signup_content',
type: 'Code',
mode: 'htmlmixed',
rows: 10,
},
{
label: 'Ask for Occupation',
name: 'user_category',
type: 'checkbox',
description:
'Enable this option to ask users to select their occupation during the signup process.',
},
],
},
],

View File

@@ -99,7 +99,7 @@
</template>
<script setup>
import { FormControl, FileUploader, Button, Switch } from 'frappe-ui'
import { computed } from 'vue'
import { computed, onMounted } from 'vue'
import { getFileSize, validateFile } from '@/utils'
import { X } from 'lucide-vue-next'
import Link from '@/components/Controls/Link.vue'