mirror of https://github.com/perkeep/perkeep.git
clear sensitive password inputs in the plugin
This commit is contained in:
parent
c323cb2ce5
commit
19ba4a3bdc
|
@ -195,6 +195,10 @@
|
||||||
function addCamlistoreServer() {
|
function addCamlistoreServer() {
|
||||||
var camliServerDiv = $('#camliserver-config');
|
var camliServerDiv = $('#camliserver-config');
|
||||||
|
|
||||||
|
function clearInputs() {
|
||||||
|
camliServerDiv.find('input').val('');
|
||||||
|
}
|
||||||
|
|
||||||
camliServerDiv.dialog({
|
camliServerDiv.dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
|
@ -204,6 +208,8 @@
|
||||||
'Add': function() {
|
'Add': function() {
|
||||||
var urlInput = $('#camliserver-url');
|
var urlInput = $('#camliserver-url');
|
||||||
var nameInput = $('#camliserver-name');
|
var nameInput = $('#camliserver-name');
|
||||||
|
var usernameInput = $('#camliserver-username');
|
||||||
|
var passwordInput = $('#camliserver-password');
|
||||||
|
|
||||||
if (!BG.ALBUM_CONFIG[BG.CAMLISTORE]) {
|
if (!BG.ALBUM_CONFIG[BG.CAMLISTORE]) {
|
||||||
BG.ALBUM_CONFIG[BG.CAMLISTORE] = {};
|
BG.ALBUM_CONFIG[BG.CAMLISTORE] = {};
|
||||||
|
@ -214,16 +220,18 @@
|
||||||
var albumId = urlInput.val();
|
var albumId = urlInput.val();
|
||||||
BG.ALBUM_CONFIG[BG.CAMLISTORE][albumId] = nameInput.val();
|
BG.ALBUM_CONFIG[BG.CAMLISTORE][albumId] = nameInput.val();
|
||||||
BG.ALBUM_OPTIONS[BG.CAMLISTORE][albumId] = {
|
BG.ALBUM_OPTIONS[BG.CAMLISTORE][albumId] = {
|
||||||
'username': $('#camliserver-username').val(),
|
'username': usernameInput.val(),
|
||||||
'password': $('#camliserver-password').val()
|
'password': passwordInput.val()
|
||||||
};
|
};
|
||||||
|
|
||||||
BG.saveAlbumConfig();
|
BG.saveAlbumConfig();
|
||||||
populateAlbumList();
|
populateAlbumList();
|
||||||
BG.setupMenus();
|
BG.setupMenus();
|
||||||
|
clearInputs();
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
},
|
},
|
||||||
'Cancel': function() {
|
'Cancel': function() {
|
||||||
|
clearInputs();
|
||||||
$(this).dialog('close');
|
$(this).dialog('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue