From c54ce232c648919db466608184ac9604a6ad2e50 Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 25 Oct 2023 23:18:31 +0800 Subject: [PATCH] More update --- add-sftp.jps | 54 +++++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/add-sftp.jps b/add-sftp.jps index 3284873..2155102 100644 --- a/add-sftp.jps +++ b/add-sftp.jps @@ -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?" +