]> _ Git - cubist_cms-back.git/commitdiff
wip #6555 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 16:49:09 +0000 (17:49 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 16:49:09 +0000 (17:49 +0100)
src/app/Magic/Models/ExternalServer.php

index c28063b8f8471eb1b123a46dbb4487d9d8ce4a27..d0761b0cb1062eff59261e5f442fd52212061d72 100644 (file)
@@ -27,13 +27,13 @@ class ExternalServer extends CubistMagicAbstractModel implements IServer
 
         $this->addField('name', Text::class, __('Nom'), ['column' => true]);
         $this->addField('protocol', SelectFromArray::class, __('Protocole'), ['options' => $this->getProtocols(), 'default' => 'FTP', 'column' => true, 'allows_null' => false]);
-        $this->addField('ftp_mode', SelectFromArray::class, __('Mode de transfert'), ['options' => ['0' => __('Mode passif'), '1' => __('Mode actif')], 'default' => '1', 'when' => ['protocol' => $this->getPasswordProtocols()], 'allows_null' => false,]);
+        $this->addField('ftp_mode', SelectFromArray::class, __('Mode de transfert'), ['options' => ['0' => __('Mode passif'), '1' => __('Mode actif')], 'default' => '1', 'when' => ['protocol' => $this->getFTPProtocols()], 'allows_null' => false,]);
         $this->addField('host', Text::class, __('Hôte'), ['default' => '', 'column' => true, 'when' => ['protocol' => $this->getHostProtocols()]]);
         $this->addField('port', Integer::class, __('Port'), ['hint' => __('Laisser vide pour utiliser le port par défaut'), 'default' => '', 'min' => 1, 'max' => 65536, 'when' => ['protocol' => $this->getPortProtocols()]]);
         $this->addField('username', Text::class, __('Nom d\'utilisateur'), ['when' => ['protocol' => $this->getUsernameProtocols()]]);
         $this->addField('password', Password::class, __('Mot de passe'), ['when' => ['protocol' => $this->getPasswordProtocols()]]);
         $this->addField('base_path', Text::class, __('Chemin de base'), ['default' => '/']);
-        $this->addField('base_url', URL::class, __('URL de base'), ['default' => 'https://', 'column' => true]);
+        $this->addField('base_url', Text::class, __('URL de base'), ['default' => 'https://', 'column' => true]);
     }
 
     public static function getAllServers()