Przeglądaj źródła

edit sonarr to use new input method for token and url - test

CauseFX 4 lat temu
rodzic
commit
a8cdc282a5
1 zmienionych plików z 14 dodań i 6 usunięć
  1. 14 6
      api/homepage/sonarr.php

+ 14 - 6
api/homepage/sonarr.php

@@ -50,18 +50,26 @@ trait SonarrHomepageItem
 				),
 				'Connection' => array(
 					array(
-						'type' => 'input',
+						'type' => 'select2',
+						'class' => 'select2-multiple',
+						'id' => 'sonarrURL-select',
 						'name' => 'sonarrURL',
-						'label' => 'URL',
+						'label' => 'Sonarr URL',
 						'value' => $this->config['sonarrURL'],
 						'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
-						'placeholder' => 'http(s)://hostname:port'
+						'placeholder' => 'http(s)://hostname:port',
+						'options' => $this->makeOptionsFromValues($this->config['sonarrURL']),
+						'settings' => '{tags: true}',
 					),
 					array(
-						'type' => 'password-alt',
+						'type' => 'select2',
+						'class' => 'select2-multiple',
+						'id' => 'sonarrToken-select',
 						'name' => 'sonarrToken',
-						'label' => 'Token',
-						'value' => $this->config['sonarrToken']
+						'label' => 'Sonarr Token',
+						'value' => $this->config['sonarrToken'],
+						'options' => $this->makeOptionsFromValues($this->config['sonarrToken']),
+						'settings' => '{tags: true, theme: "default password-alt"}',
 					)
 				),
 				'API SOCKS' => array(