From f2ddb6c1e08c372d6be4c6ad9e866dcb5c973ddb Mon Sep 17 00:00:00 2001 From: Sandro Lutz <sandro.lutz@temparus.ch> Date: Sun, 31 Dec 2017 12:03:13 +0100 Subject: [PATCH] Disable RFID form if value has not changed --- src/views/profile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/profile.js b/src/views/profile.js index 477bb1d4..8a40e17b 100644 --- a/src/views/profile.js +++ b/src/views/profile.js @@ -112,8 +112,7 @@ class rfidForm { value: this.rfid, oninput: (e) => { this.rfid = e.target.value; - this.valid = /^\d{6}$/g.test(this.rfid); - log(`rfid valid: ${this.valid}`); + this.valid = /^\d{6}$/g.test(this.rfid) && this.rfid !== user.get().rfid; }, }), m('button', buttonArgs, 'save'), -- GitLab