diff --git a/data/web/edit.php b/data/web/edit.php
index 04e09505..92b0aed2 100644
--- a/data/web/edit.php
+++ b/data/web/edit.php
@@ -125,15 +125,15 @@ if (isset($_SESSION['mailcow_cc_role'])) {
@@ -204,15 +204,15 @@ if (isset($_SESSION['mailcow_cc_role'])) {
@@ -680,15 +680,15 @@ if (isset($_SESSION['mailcow_cc_role'])) {
@@ -1330,15 +1330,15 @@ if (isset($_SESSION['mailcow_cc_role'])) {
@@ -1387,5 +1387,6 @@ echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
add('/web/js/site/edit.js');
+$js_minifier->add('/web/js/site/pwgen.js');
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
?>
diff --git a/data/web/js/build/014-mailcow.js b/data/web/js/build/014-mailcow.js
index cbf51f3c..b8992f59 100644
--- a/data/web/js/build/014-mailcow.js
+++ b/data/web/js/build/014-mailcow.js
@@ -12,6 +12,14 @@ $(document).ready(function() {
$.notify({message: msg},{z_index: 20000, delay: auto_hide, type: type,placement: {from: "bottom",align: "right"},animate: {enter: 'animated fadeInUp',exit: 'animated fadeOutDown'}});
}
+ $(".generate_password").click(function( event ) {
+ event.preventDefault();
+ $('[data-hibp]').trigger('input');
+ var random_passwd = GPW.pronounceable(8)
+ $(this).closest("form").find('[data-pwgen-field]').attr('type', 'text');
+ $(this).closest("form").find('[data-pwgen-field]').val(random_passwd);
+ });
+
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
function shake(div,interval,distance,times) {
if(typeof interval === 'undefined') {
diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js
index 925b2b39..ddaf08a7 100644
--- a/data/web/js/site/mailbox.js
+++ b/data/web/js/site/mailbox.js
@@ -70,15 +70,6 @@ $(document).ready(function() {
auto_fill_quota($('#addSelectDomain').val());
});
auto_fill_quota($('#addSelectDomain').val());
- $(".generate_password").click(function( event ) {
- event.preventDefault();
- $('[data-hibp]').trigger('input');
- var random_passwd = GPW.pronounceable(8)
- $(this).closest("form").find("input[name='password']").prop('type', 'text');
- $(this).closest("form").find("input[name='password2']").prop('type', 'text');
- $(this).closest("form").find("input[name='password']").val(random_passwd);
- $(this).closest("form").find("input[name='password2']").val(random_passwd);
- });
$(".goto_checkbox").click(function( event ) {
$("form[data-id='add_alias'] .goto_checkbox").not(this).prop('checked', false);
if ($("form[data-id='add_alias'] .goto_checkbox:checked").length > 0) {
diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json
index bd79a73f..1b42a262 100644
--- a/data/web/lang/lang.de.json
+++ b/data/web/lang/lang.de.json
@@ -216,6 +216,7 @@
"session_ua": "Formular-Token ungültig: User-Agent-Validierungsfehler"
},
"user": {
+ "generate": "generieren",
"create_app_passwd": "Erstelle App Passwort",
"app_passwds": "App Passwörter",
"app_name": "App Name",
@@ -666,6 +667,7 @@
"sieve_preset_2": "E-Mail eines bestimmten Absenders immer als gelesen markieren"
},
"edit": {
+ "generate": "generieren",
"app_name": "App Name",
"app_passwd": "App Passwörter",
"sogo_visible": "Alias in SOGo sichtbar",
diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json
index 0aeed4ce..d8dcb428 100644
--- a/data/web/lang/lang.en.json
+++ b/data/web/lang/lang.en.json
@@ -216,6 +216,7 @@
"ip_invalid": "Skipped invalid IP: %s"
},
"user": {
+ "generate": "generate",
"create_app_passwd": "Create app password",
"app_passwds": "App passwords",
"app_name": "App name",
@@ -665,6 +666,7 @@
"sieve_preset_2": "Always mark the e-mail of a specific sender as seen"
},
"edit": {
+ "generate": "generate",
"app_name": "App name",
"app_passwd": "App password",
"sogo_visible": "Alias is visible in SOGo",
diff --git a/data/web/modals/mailbox.php b/data/web/modals/mailbox.php
index 7cebaa5c..d0182227 100644
--- a/data/web/modals/mailbox.php
+++ b/data/web/modals/mailbox.php
@@ -50,13 +50,13 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
diff --git a/data/web/modals/user.php b/data/web/modals/user.php
index 12574864..d32a2560 100644
--- a/data/web/modals/user.php
+++ b/data/web/modals/user.php
@@ -179,15 +179,15 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
@@ -226,15 +226,15 @@ if (!isset($_SESSION['mailcow_cc_role'])) {