OTP Token add failed because of invalid function call. qr_widget doesn't
contain `on_value_changed` method since it inherits from `IPA.widget` and not from `IPA.input_widget`.


Emitting the event was preserved for future possible usage.

https://fedorahosted.org/freeipa/ticket/4306
--
Petr Vobornik
From d047720e6f00a2579546b7f60716b5846df034c6 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Tue, 15 Apr 2014 09:47:21 +0200
Subject: [PATCH] webui: fix OTP Token add regression

OTP Token add failed because of invalid function call. qr_widget doesn't
contain `on_value_changed` method since it inherits from `IPA.widget` and
not from `IPA.input_widget`.

Emitting the event was preserved for future possible usage.

https://fedorahosted.org/freeipa/ticket/4306
---
 install/ui/src/freeipa/otptoken.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js
index 99dedd94bfd2727d29aae76b9ef9166ef6d3503a..cf14869ce431d1a89e84687d1c88ffb500ddaf97 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -398,7 +398,7 @@ otptoken.qr_widget = function(spec) {
         that.qrcode.makeCode(that.text);
         that.uri_control.text(that.text);
         that.div_link_control.prop('href', that.text);
-        that.on_value_changed();
+        that.emit('value-change', { source: that, value: val });
     };
 
     /**
-- 
1.9.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to