Bug 41798: Fix FTP passive mode not saving and add display indicator
The FTP passive mode setting was not being saved due to a typo in the
parameter name ('passiv' instead of 'passive'). This fixes the typo
and adds display of passive mode status in the transports table.
Test plan:
1. Go to Administration > File transports
2. Click "New file transport"
3. Fill in the name (e.g., "Test FTP")
4. Change Transport to "FTP"
5. Set Passive mode to "Enabled (Recommended)"
6. Fill in required fields (host, username, etc.) and save
7. Edit the transport you just created
8. Verify Passive mode is still set to "Enabled" (not reverted to Disabled)
9. Return to the file transports list
10. Verify the Transport column shows "FTP (passive)" for this transport
11. Edit the transport and change Passive mode to "Disabled"
12. Save and return to the list
13. Verify the Transport column now shows just "FTP" (without the passive indicator)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a92e6ef8ea)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This commit is contained in:
parent
c54fd99db6
commit
3a4a9418f2
|
|
@ -49,7 +49,7 @@ if ( $op eq 'cud-add' ) {
|
|||
my $host = $input->param('host') || 'localhost';
|
||||
my $port = $input->param('port') || 22;
|
||||
my $transport = $input->param('transport') || 'sftp';
|
||||
my $passive = ( scalar $input->param('passiv') ) ? 1 : 0;
|
||||
my $passive = ( scalar $input->param('passive') ) ? 1 : 0;
|
||||
my $auth_mode = $input->param('auth_mode') || 'password';
|
||||
my $user_name = $input->param('user_name') || undef;
|
||||
my $password = $input->param('password') || undef;
|
||||
|
|
@ -139,7 +139,7 @@ if ( $op eq 'cud-add' ) {
|
|||
my $host = $input->param('host') || 'localhost';
|
||||
my $port = $input->param('port') || 22;
|
||||
my $transport = $input->param('transport') || 'sftp';
|
||||
my $passive = ( scalar $input->param('passiv') ) ? 1 : 0;
|
||||
my $passive = ( scalar $input->param('passive') ) ? 1 : 0;
|
||||
my $auth_mode = $input->param('auth_mode') || 'password';
|
||||
my $user_name = $input->param('user_name') || undef;
|
||||
my $password = $input->param('password') || undef;
|
||||
|
|
|
|||
|
|
@ -502,7 +502,11 @@
|
|||
{
|
||||
"data": "transport",
|
||||
"render": function(data, type, row, meta) {
|
||||
return data.toUpperCase();
|
||||
var transport = data.toUpperCase();
|
||||
if (data == "ftp" && row.passive == 1) {
|
||||
transport += " [% tp('FTP connection mode', '(passive)') %]";
|
||||
}
|
||||
return transport;
|
||||
},
|
||||
"searchable": true,
|
||||
"orderable": false
|
||||
|
|
|
|||
Loading…
Reference in New Issue