Refresh Join device list when changing API key

This commit is contained in:
JonnyWong16 2016-05-15 17:20:28 -07:00
parent 1e1e3beca6
commit 69cfbea5f3
2 changed files with 3 additions and 1 deletions

View file

@ -217,7 +217,7 @@
} }
} }
$('#pushbullet_apikey, #pushover_apitoken, #scripts_folder').on('change', function () { $('#pushbullet_apikey, #pushover_apitoken, #scripts_folder, #join_apikey').on('change', function () {
// Reload modal to update certain fields // Reload modal to update certain fields
doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal); doAjaxCall('set_notification_config', $(this), 'tabs', true, reloadModal);
return false; return false;

View file

@ -2633,6 +2633,8 @@ class JOIN(object):
def return_config_options(self): def return_config_options(self):
devices = '<br>'.join(['%s: %s' % (v, k) for k, v in self.get_devices().iteritems() if k]) devices = '<br>'.join(['%s: %s' % (v, k) for k, v in self.get_devices().iteritems() if k])
if not devices:
devices = 'Enter your Join API key to load your device list.'
config_option = [{'label': 'Join API Key', config_option = [{'label': 'Join API Key',
'value': self.apikey, 'value': self.apikey,