Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow string or array argument in issue_no_modal, and hide the form j…

…ust in case.
  • Loading branch information...
commit 193bffe0ba622d1e9aa639aa3ac0a295d6af77cc 1 parent fee2843
Mike Larsson stenington authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  static/js/issuer-parts/issuer-core.js
3  static/js/issuer-parts/issuer-core.js
View
@@ -133,9 +133,10 @@ var OpenBadges = (function() {
// This function is not yet documented publicly.
// It provides a modaless alternative to the classic issuer frame at the cost of the callback.
issue_no_modal: function OpenBadges_issue_no_modal(assertions) {
+ assertions = typeof assertions === 'string' ? [assertions] : assertions;
var root = this.ROOT = findRoot();
var url = root + "issuer/frameless?" + Date.now();
- var form = $('<form method="POST"></form>').attr('action', url).appendTo($('body'));
+ var form = $('<form method="POST"></form>').attr('action', url).appendTo($('body')).hide();
assertions.forEach(function(val, i, arr){
$('<input type="text" name="assertions">').val(val).appendTo(form);
});
Please sign in to comment.
Something went wrong with that request. Please try again.