react-simple-captcha
Advanced tools
Comparing version 6.1.7 to 7.0.0
{ | ||
"name": "react-simple-captcha", | ||
"version": "6.1.7", | ||
"version": "7.0.0", | ||
"description": "A very simple and powerful captcha for ReactJS", | ||
@@ -5,0 +5,0 @@ "main": "react-simple-captcha.js", |
@@ -81,2 +81,26 @@ import { Component } from 'react'; | ||
render() { | ||
let reload_text = ""; | ||
let reload_color = ""; | ||
LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: blue\">Reload Captcha</a></div></div>"; | ||
if (this.props.reloadText) { | ||
reload_text = this.props.reloadText; | ||
} | ||
if (this.props.reloadColor) { | ||
reload_color = this.props.reloadColor; | ||
} | ||
if (reload_text == "") { | ||
reload_text = "Reload Captach"; | ||
} | ||
if (reload_color == "") { | ||
reload_color = "blue"; | ||
} | ||
LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: " + reload_color + "\">" + reload_text + "</a></div></div>"; | ||
return (ReactHtmlParser(LoadCanvasTemplate_HTML)); | ||
@@ -83,0 +107,0 @@ } |
@@ -78,3 +78,3 @@ # React Simple Captcha | ||
**OR** | ||
If you don't watch captcha to be reloaded if user enter the wrong value then set second parameter to *false* **validateCaptcha(user_captcha_value, false)** | ||
If you don't want captcha to be reloaded if user enter the wrong value then set second parameter to *false* **validateCaptcha(user_captcha_value, false)** | ||
@@ -109,2 +109,8 @@ | ||
| **validateCaptcha(*User_Submitted_Value*, *false*)** | Will return *true* if user submitted value matches with captcha otherwise *false*. Will not reload captcha if user submitted value is *false* | | ||
| **Version ^7.0.0 Updates** | **All of these changes are optional** | | ||
| ------ | ------ | | ||
| **< LoadCanvasTemplate reloadText="Reload My Captcha" />** | **Optional** In case you want to change the "Reload Captcha" with your own text | | ||
| **< LoadCanvasTemplate reloadColor="red" />** | **Optional** In case you want to change the blue color of "Reload Captcha" | | ||
| **< LoadCanvasTemplate reloadText="Reload My Captcha" reloadColor="red" />** | **Optional** In case you want to change the "Reload Captcha" text and it's blue color | | ||
@@ -111,0 +117,0 @@ ### Example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10541
82
194