fix: remove required attr from SFTP showon fields — blocks save when not SFTP
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 22s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 22s
Joomla validates required fields server-side regardless of showon visibility. SFTP fields with required="true" block saving when remote_storage is set to None or S3/GDrive because the hidden fields submit empty values. Validation should be done in ProfileTable::check() conditionally instead.
This commit is contained in:
@@ -182,7 +182,6 @@
|
||||
label="COM_MOKOJOOMBACKUP_FIELD_SFTP_HOST"
|
||||
description="COM_MOKOJOOMBACKUP_FIELD_SFTP_HOST_DESC"
|
||||
maxlength="255"
|
||||
required="true"
|
||||
showon="remote_storage:sftp"
|
||||
/>
|
||||
<field
|
||||
@@ -201,7 +200,6 @@
|
||||
label="COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME"
|
||||
description="COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME_DESC"
|
||||
maxlength="255"
|
||||
required="true"
|
||||
showon="remote_storage:sftp"
|
||||
/>
|
||||
<field
|
||||
@@ -222,7 +220,6 @@
|
||||
label="COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD"
|
||||
description="COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD_DESC"
|
||||
maxlength="255"
|
||||
required="true"
|
||||
showon="remote_storage:sftp[AND]sftp_auth_type:password"
|
||||
/>
|
||||
<field
|
||||
@@ -240,7 +237,6 @@
|
||||
label="COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSPHRASE"
|
||||
description="COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSPHRASE_DESC"
|
||||
maxlength="255"
|
||||
required="true"
|
||||
showon="remote_storage:sftp[AND]sftp_auth_type:key_passphrase"
|
||||
/>
|
||||
<field
|
||||
@@ -250,7 +246,6 @@
|
||||
description="COM_MOKOJOOMBACKUP_FIELD_SFTP_PATH_DESC"
|
||||
default="/backups"
|
||||
maxlength="512"
|
||||
required="true"
|
||||
showon="remote_storage:sftp"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user