Feature: Make the MYSQL_PASSWORD string definable once in order to be able to copy the fragments without further change

This commit is contained in:
Johannes Feichtner
2016-02-10 14:27:20 +01:00
parent c269a3d363
commit 9c7092292b
4 changed files with 24 additions and 1 deletions

View File

@@ -202,4 +202,19 @@ $(document).ready(function() {
$("#mailTemplate").html(mailOptions);
});
$("#mailLanguage").trigger("change");
// Config files
var configfileTextareas = $("textarea.filecontent, textarea.shell");
var lastPw = "MYSQL_PASSWORD";
$("#configfiles_setmysqlpw").submit(function(event) {
event.preventDefault();
var inputVal = $("#configfiles_mysqlpw").val();
if (!inputVal.trim()) {
inputVal = "MYSQL_PASSWORD";
}
configfileTextareas.each(function() {
this.value = this.value.replace(lastPw, inputVal);
});
lastPw = inputVal;
});
});