diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-07 19:10:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-07 19:10:50 -0400 |
commit | 378c64776856ee1313c030375a921e8acb4ff1ef (patch) | |
tree | 46ac4d04807b83ddaa6d1026e616ef4626261237 /underlays | |
parent | 76f6ff5f6b437534f8778abf225e2c4398262489 (diff) | |
download | ikiwiki-378c64776856ee1313c030375a921e8acb4ff1ef.tar ikiwiki-378c64776856ee1313c030375a921e8acb4ff1ef.tar.gz |
patch hidden field setting code
Fixes http://code.google.com/p/openid-selector/issues/detail?id=11#c3
Diffstat (limited to 'underlays')
-rw-r--r-- | underlays/javascript/ikiwiki/openid-selector/openid-jquery.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/underlays/javascript/ikiwiki/openid-selector/openid-jquery.js b/underlays/javascript/ikiwiki/openid-selector/openid-jquery.js index 3b60827b6..f39fff842 100644 --- a/underlays/javascript/ikiwiki/openid-selector/openid-jquery.js +++ b/underlays/javascript/ikiwiki/openid-selector/openid-jquery.js @@ -170,11 +170,11 @@ var openid = { }, setOpenIdUrl: function (url) { - var hidden = document.getElementById(this.input_id); - if (hidden != null) { - hidden.value = url; + var hidden = $('#'+this.input_id); + if (hidden.length > 0) { + hidden.value = url; } else { - $('#openid_form').append('<input type="hidden" id="' + this.input_id + '" name="' + this.input_id + '" value="'+url+'"/>'); + $('#openid_form').append('<input style="display:none" id="' + this.input_id + '" name="' + this.input_id + '" value="'+url+'"/>'); } }, highlight: function (box_id) { |