makes the captcha keys optional

This commit is contained in:
Timothy Prepscius 2013-09-29 15:12:15 -04:00
parent ea3a64ba38
commit d304533cca
7 changed files with 24 additions and 11 deletions

View File

@ -8,6 +8,7 @@ HOST_PRIMARY=`cat ../config/hosts/$M`
HOST_AUTH=`cat ../config/hosts/auth_$M` HOST_AUTH=`cat ../config/hosts/auth_$M`
HOST_TOMCAT=`cat ../config/hosts/tomcat_$M` HOST_TOMCAT=`cat ../config/hosts/tomcat_$M`
HOST_WEB=`cat ../config/hosts/web_$M` HOST_WEB=`cat ../config/hosts/web_$M`
RECAPTCHA_PUBLIC_KEY=`cat ../keys/recaptcha/public.key`
function replaceStrings() { function replaceStrings() {
sed -i '' -f replace_js_$M.sed $1 sed -i '' -f replace_js_$M.sed $1
@ -18,6 +19,7 @@ function replaceStrings() {
sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1 sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1
sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1 sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1
sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1 sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1
sed -i '' -e s/{##RECAPTCHA_PUBLIC_KEY##}/$RECAPTCHA_PUBLIC_KEY/g $1
} }
echo Replacing Strings echo Replacing Strings

View File

@ -1 +1 @@
../../../passwords/captcha_private_key ../../../keys/recaptcha/private.key

View File

@ -0,0 +1 @@
NONE

View File

@ -5,7 +5,10 @@ EmbeddedResources = {
"{##TRUSTSTORE_AUTH##}", "{##TRUSTSTORE_AUTH##}",
"mail.client.Mailer.send-truststore.jks.b64" : "mail.client.Mailer.send-truststore.jks.b64" :
"{##TRUSTSTORE_SEND##}" "{##TRUSTSTORE_SEND##}",
"mail.signup.SignUp.recaptcha-public-key" :
"{##RECAPTCHA_PUBLIC_KEY##}"
}; };
/** resources **/ /** resources **/

View File

@ -145,7 +145,7 @@
<script> <script>
Recaptcha Recaptcha
.create( .create(
"6LcNeNISAAAAAOll_n6Mj_YC0lVvjIgiEHNFAjV1", EmbeddedResources["mail.signup.SignUp.recaptcha-public-key"],
"recaptcha_container", "recaptcha_container",
{ {
theme : "red", theme : "red",
@ -173,8 +173,8 @@
<div class="inner-td"> <div class="inner-td">
I want to use the storage provider:<br/> I want to use the storage provider:<br/>
<br/> <br/>
<label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="mailiverse" checked>{##TITLE##}</label><br/> <label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="mailiverse" checked>Mailiverse</label><br/>
<label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="s3">{##TITLE##} (S3 Backed)</label><br> <label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="s3">Mailiverse (S3 Backed)</label><br>
<label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="dropbox">Dropbox</label><br/> <label class="checkbox inline"><input name="storage" type="radio" onchange="mSignUp.onStorageChange();" value="dropbox">Dropbox</label><br/>
</div> </div>
</td> </td>
@ -183,13 +183,13 @@
<tr id="storage_s3" class="storage-option" style="display:none"> <tr id="storage_s3" class="storage-option" style="display:none">
<td class="left-side"> <td class="left-side">
<div class="inner-td"> <div class="inner-td">
<h4>{##TITLE##} S3 backed storage</h4> <h4>Mailiverse S3 backed storage</h4>
We provide infinite mail storage. We provide infinite mail storage.
</div> </div>
</td> </td>
<td class="right-side"> <td class="right-side">
<div class="inner-td"> <div class="inner-td">
{##TITLE##} S3 backed storage is simple, no hassle. We take care of everything.<br/> Mailiverse S3 backed storage is simple, no hassle. We take care of everything.<br/>
<br/> <br/>
Pick the region you are closest to most of the time.<br/> Pick the region you are closest to most of the time.<br/>
<select id="storage_s3_region"> <select id="storage_s3_region">
@ -209,13 +209,13 @@
<tr id="storage_mailiverse" class="storage-option"> <tr id="storage_mailiverse" class="storage-option">
<td class="left-side"> <td class="left-side">
<div class="inner-td"> <div class="inner-td">
<h4>{##TITLE##} storage</h4> <h4>Mailiverse storage</h4>
We provide infinite mail storage. This storage is backed by our local db. We provide infinite mail storage. This storage is backed by our local db.
</div> </div>
</td> </td>
<td class="right-side"> <td class="right-side">
<div class="inner-td"> <div class="inner-td">
{##TITLE##} storage is simple, no hassle. We take care of everything.<br/> Mailiverse storage is simple, no hassle. We take care of everything.<br/>
</div> </div>
</td> </td>
</tr> </tr>
@ -226,7 +226,7 @@
<h4>Dropbox storage</h4> <h4>Dropbox storage</h4>
Store your mail on your own dropbox account. Store your mail on your own dropbox account.
It's easy, just click on the button to open a new tab to link {##TITLE##} to Dropbox.<br/> It's easy, just click on the button to open a new tab to link Mailiverse to Dropbox.<br/>
<br/> <br/>
Enter the authorization verification code recieved. Enter the authorization verification code recieved.
<br/> <br/>

View File

@ -3,6 +3,7 @@
mSignUp = { mSignUp = {
executeText: "", executeText: "",
useCaptcha: EmbeddedResources["mail.signup.SignUp.recaptcha-public-key"] != "NONE",
service: null, service: null,
validate: { name: false, password: false, password_check:false, storageAuthorized:true, captcha:false, tos:false }, validate: { name: false, password: false, password_check:false, storageAuthorized:true, captcha:false, tos:false },
@ -16,6 +17,12 @@ mSignUp = {
initialize: function() initialize: function()
{ {
mSignUp.validate.captcha = mSignUp.useCaptcha;
if (!mSignUp.useCaptcha)
{
$('#_mSignUp_captcha_submit').text("Captcha key not present");
$('#_mSignUp_captcha_submit').attr("disabled", "disabled");
}
}, },
onStorageChange: function() onStorageChange: function()