More update

main
Anthony 2023-10-25 23:18:31 +08:00
parent 68e20eee93
commit c54ce232c6
1 changed files with 22 additions and 32 deletions

View File

@ -12,6 +12,26 @@ globals:
sftpHost: ${env.domain}
sftpPort: 22
buttons:
- settings: sftpForm
action: add_sftp_user
caption: Add SFTP User
confirmText: "Are you sure you want to add this SFTP user?"
settings:
sftpForm:
fields:
- type: string
inputType: text
name: root_directory
caption: Root Directory
default: "/var/www/webroot/ROOT"
required: true
- type: checkbox
name: enable_ssh
caption: Also enable SSH access
default: false
actions:
add_sftp_user:
script: /scripts/add-sftp-user.cs?_r=${fn.random}&enable_ssh=${settings.enable_ssh}
@ -39,36 +59,6 @@ success:
Username: ${globals.username}
Password: ${globals.password}
settings:
sftpForm:
fields:
- type: string
inputType: text
name: username
caption: Username
placeholder: "user${fn.random(10000,99999)}"
disabled: true
required: false
- type: string
inputType: password
name: password
caption: Password
placeholder: "${fn.password(min)}"
disabled: true
required: false
- type: string
inputType: text
name: root_directory
caption: Root Directory
default: "/var/www/webroot/ROOT"
required: true
- type: checkbox
name: enable_ssh
caption: Also enable SSH access
default: false
buttons:
- settings: sftpForm
action: add_sftp_user
caption: Add SFTP User
confirmText: "Are you sure you want to add this SFTP user?"