Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/registration.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-04-21 17:50:28 +0300
committerGitHub <noreply@github.com>2021-04-21 17:50:28 +0300
commit7d15b9092bc22d9929e6351a1239c6816d2e8e31 (patch)
tree90269620d7a0c4e9780b1e0395b63aabe93deef3
parentd4194badba87fb492ee1dd2bd8d03ac56281adad (diff)
parentb07da75c68b4a2acdbdf140edd71fe33b8ef6cdf (diff)
Merge pull request #299 from nextcloud/bugfix/noid/prevent-hash-appearing-on-action-url-when-showing-password
Prevent the hash appearing when showing the password
-rw-r--r--js/registration-form.js4
-rw-r--r--js/registration-form.js.map2
-rw-r--r--src/form.js3
3 files changed, 5 insertions, 4 deletions
diff --git a/js/registration-form.js b/js/registration-form.js
index 074b206..5e87ac8 100644
--- a/js/registration-form.js
+++ b/js/registration-form.js
@@ -1,2 +1,2 @@
-!function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){var i=this;$("#showadminpass").click((function(){var t=$("#password");"password"===t.attr("type")?t.attr("type","text"):t.attr("type","password")})),$("form").submit((function(){$(i).find(":submit").attr("disabled","disabled"),$(i).find(":submit")[0].value=t("registration","Loading …")}))}))}();
-//# sourceMappingURL=registration-form.js.map?v=9934ad4775c110e9376d \ No newline at end of file
+!function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){var a=this;$("#showadminpass").click((function(t){t.preventDefault();var a=$("#password");"password"===a.attr("type")?a.attr("type","text"):a.attr("type","password")})),$("form").submit((function(){$(a).find(":submit").attr("disabled","disabled"),$(a).find(":submit")[0].value=t("registration","Loading …")}))}))}();
+//# sourceMappingURL=registration-form.js.map?v=2f99bd8b8e2f96df0fe1 \ No newline at end of file
diff --git a/js/registration-form.js.map b/js/registration-form.js.map
index 5d69ca5..4cb3496 100644
--- a/js/registration-form.js.map
+++ b/js/registration-form.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://registration/./src/form.js"],"names":["document","addEventListener","$","click","passwordTextField","attr","submit","find","value","t"],"mappings":"yBAAAA,SAASC,iBAAiB,oBAAoB,WAAW,WAExDC,EAAE,kBAAkBC,OAAM,WACzB,IAAMC,EAAoBF,EAAE,aACW,aAAnCE,EAAkBC,KAAK,QAC1BD,EAAkBC,KAAK,OAAQ,QAE/BD,EAAkBC,KAAK,OAAQ,eAKjCH,EAAE,QAAQI,QAAO,WAEhBJ,EAAE,GAAMK,KAAK,WAAWF,KAAK,WAAY,YACzCH,EAAE,GAAMK,KAAK,WAAW,GAAGC,MAAQC,EAAE,eAAgB,mB","file":"registration-form.js?v=9934ad4775c110e9376d","sourcesContent":["document.addEventListener('DOMContentLoaded', function() {\n\t// Password toggle\n\t$('#showadminpass').click(() => {\n\t\tconst passwordTextField = $('#password')\n\t\tif (passwordTextField.attr('type') === 'password') {\n\t\t\tpasswordTextField.attr('type', 'text')\n\t\t} else {\n\t\t\tpasswordTextField.attr('type', 'password')\n\t\t}\n\t})\n\n\t// Disable submit after first click\n\t$('form').submit(() => {\n\t\t// prevent duplicate form submissions\n\t\t$(this).find(':submit').attr('disabled', 'disabled')\n\t\t$(this).find(':submit')[0].value = t('registration', 'Loading …')\n\t})\n})\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack://registration/./src/form.js"],"names":["document","addEventListener","$","click","e","preventDefault","passwordTextField","attr","submit","find","value","t"],"mappings":"yBAAAA,SAASC,iBAAiB,oBAAoB,WAAW,WAExDC,EAAE,kBAAkBC,OAAM,SAACC,GAC1BA,EAAEC,iBACF,IAAMC,EAAoBJ,EAAE,aACW,aAAnCI,EAAkBC,KAAK,QAC1BD,EAAkBC,KAAK,OAAQ,QAE/BD,EAAkBC,KAAK,OAAQ,eAKjCL,EAAE,QAAQM,QAAO,WAEhBN,EAAE,GAAMO,KAAK,WAAWF,KAAK,WAAY,YACzCL,EAAE,GAAMO,KAAK,WAAW,GAAGC,MAAQC,EAAE,eAAgB,mB","file":"registration-form.js?v=2f99bd8b8e2f96df0fe1","sourcesContent":["document.addEventListener('DOMContentLoaded', function() {\n\t// Password toggle\n\t$('#showadminpass').click((e) => {\n\t\te.preventDefault()\n\t\tconst passwordTextField = $('#password')\n\t\tif (passwordTextField.attr('type') === 'password') {\n\t\t\tpasswordTextField.attr('type', 'text')\n\t\t} else {\n\t\t\tpasswordTextField.attr('type', 'password')\n\t\t}\n\t})\n\n\t// Disable submit after first click\n\t$('form').submit(() => {\n\t\t// prevent duplicate form submissions\n\t\t$(this).find(':submit').attr('disabled', 'disabled')\n\t\t$(this).find(':submit')[0].value = t('registration', 'Loading …')\n\t})\n})\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/src/form.js b/src/form.js
index df9c884..e46db8d 100644
--- a/src/form.js
+++ b/src/form.js
@@ -1,6 +1,7 @@
document.addEventListener('DOMContentLoaded', function() {
// Password toggle
- $('#showadminpass').click(() => {
+ $('#showadminpass').click((e) => {
+ e.preventDefault()
const passwordTextField = $('#password')
if (passwordTextField.attr('type') === 'password') {
passwordTextField.attr('type', 'text')