Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
[release]
Browse files Browse the repository at this point in the history
  • Loading branch information
iambrosi committed Apr 24, 2017
1 parent 3ac496d commit 0e205bc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-recaptcha",
"version": "4.0.4",
"version": "4.1.0",
"keywords": ["angular", "captcha", "recaptcha", "vividcortex", "human", "form", "validation", "signup", "security", "login"],
"main": "release/angular-recaptcha.js",
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-recaptcha",
"version": "4.0.4",
"version": "4.1.0",
"description": "An AngularJS module to ease usage of reCaptcha inside a form",
"author": "VividCortex",
"license": "MIT",
Expand Down
23 changes: 22 additions & 1 deletion release/angular-recaptcha.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license angular-recaptcha build:2017-03-14
* @license angular-recaptcha build:2017-04-24
* https://github.com/vividcortex/angular-recaptcha
* Copyright (c) 2017 VividCortex
**/
Expand Down Expand Up @@ -99,6 +99,15 @@
config.lang = lang;
};

/**
* Sets the reCaptcha badge position which will be used by default if not specified in a specific directive instance.
*
* @param badge The reCaptcha badge position.
*/
provider.setBadge = function(badge){
config.badge = badge;
};

/**
* Sets the reCaptcha configuration values which will be used by default is not specified in a specific directive instance.
*
Expand Down Expand Up @@ -173,6 +182,7 @@
conf.size = conf.size || config.size;
conf.type = conf.type || config.type;
conf.hl = conf.lang || config.lang;
conf.badge = conf.badge || config.badge;

if (!conf.sitekey || conf.sitekey.length !== 40) {
throwNoKeyException();
Expand All @@ -196,6 +206,15 @@
$rootScope.$broadcast('reCaptchaReset', widgetId);
},

/**
* Executes the reCaptcha
*/
execute: function (widgetId) {
validateRecaptchaInstance();

recaptcha.execute(widgetId);
},

/**
* Get/Set reCaptcha language
*/
Expand Down Expand Up @@ -281,6 +300,7 @@
size: '=?',
type: '=?',
lang: '=?',
badge: '=?',
tabindex: '=?',
required: '=?',
onCreate: '&',
Expand Down Expand Up @@ -316,6 +336,7 @@
lang: scope.lang || attrs.lang || null,
tabindex: scope.tabindex || attrs.tabindex || null,
size: scope.size || attrs.size || null,
badge: scope.badge || attrs.badge || null,
'expired-callback': expired

}).then(function (widgetId) {
Expand Down
5 changes: 3 additions & 2 deletions release/angular-recaptcha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e205bc

Please sign in to comment.