Refresh Join device list when changing API key
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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,
|
||||||
|
Reference in New Issue
Block a user