1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-22 01:36:55 +01:00

Merge pull request #257 from bigchaindb/fix/forms

Fix form feedback messages
This commit is contained in:
Matthias Kretschmann 2018-08-28 17:45:42 +02:00 committed by GitHub
commit 7369f0747d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 29 deletions

View File

@ -49,7 +49,7 @@ var FormCla = (function(w, d, $) {
}, },
success: function(data) { success: function(data) {
thisForm.find('.form-group').addClass('hide'); thisForm.find('.form-group').addClass('hide');
thisForm.find('.alert-success').removeClass('hide'); thisForm.find('.alert--success').removeClass('hide');
thisButton.removeClass('disabled'); thisButton.removeClass('disabled');
// send GA event // send GA event
@ -58,7 +58,7 @@ var FormCla = (function(w, d, $) {
} }
}, },
error: function(err) { error: function(err) {
thisForm.find('.alert-danger').removeClass('hide'); thisForm.find('.alert--danger').removeClass('hide');
thisButton thisButton
.removeClass('disabled') .removeClass('disabled')
.attr('value', 'Send'); .attr('value', 'Send');

View File

@ -30,7 +30,7 @@ var FormContact = (function(w, d, $) {
}, },
success: function(data) { success: function(data) {
_config.form.find('.form-group').addClass('hide'); _config.form.find('.form-group').addClass('hide');
_config.form.find('.alert-success').removeClass('hide'); _config.form.find('.alert--success').removeClass('hide');
_config.formBtn.removeClass('disabled'); _config.formBtn.removeClass('disabled');
// send GA event // send GA event
@ -39,7 +39,7 @@ var FormContact = (function(w, d, $) {
} }
}, },
error: function(err) { error: function(err) {
_config.form.find('.alert-danger').removeClass('hide'); _config.form.find('.alert--danger').removeClass('hide');
_config.formBtn _config.formBtn
.removeClass('disabled') .removeClass('disabled')
.attr('value', 'Send'); .attr('value', 'Send');

View File

@ -30,7 +30,7 @@ var FormServices = (function(w, d, $) {
}, },
success: function(data) { success: function(data) {
_config.form.find('.form-group').addClass('hide'); _config.form.find('.form-group').addClass('hide');
_config.form.find('.alert-success').removeClass('hide'); _config.form.find('.alert--success').removeClass('hide');
_config.formBtn.removeClass('disabled'); _config.formBtn.removeClass('disabled');
// send GA event // send GA event
@ -39,7 +39,7 @@ var FormServices = (function(w, d, $) {
} }
}, },
error: function(err) { error: function(err) {
_config.form.find('.alert-danger').removeClass('hide'); _config.form.find('.alert--danger').removeClass('hide');
_config.formBtn _config.formBtn
.removeClass('disabled') .removeClass('disabled')
.attr('value', 'Send'); .attr('value', 'Send');

View File

@ -1,4 +1,3 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" href="#individual" data-toggle="tab" role="tab">For Individuals</a> <a class="nav-link active" href="#individual" data-toggle="tab" role="tab">For Individuals</a>
@ -36,19 +35,20 @@
Fields marked with an <span class="required">*</span> are required. Fields marked with an <span class="required">*</span> are required.
</p> </p>
<p class="form-group text-dimmed"> <p class="form-group text-dimmed">
Agreed and accepted: By clicking and accepting this Agreement, I represent and warrant that I have authority to bind the entity named above (if applicable) to the terms and conditions of this Agreement. Agreed and accepted: By clicking and accepting this Agreement, I represent and warrant that I have authority to bind the
entity named above (if applicable) to the terms and conditions of this Agreement.
</p> </p>
<div class="form-group checkbox"> <div class="form-group checkbox">
<label> <label>
<input class="agree" type="checkbox" value="agreement" name="agreement" required> <input class="agree" type="checkbox" value="agreement" name="agreement" required> I have read and agree
I have read and agree to the <a href="/cla/individual/">terms of this Agreement</a> to the <a href="/cla/individual/">terms of this Agreement</a>
</label> </label>
</div> </div>
<p class="form-group"> <p class="form-group">
<input class="btn btn-primary" type="submit" value="Send"> <input class="btn btn-primary" type="submit" value="Send">
</p> </p>
<div class="alert alert-success animation-slide-in-from-bottom hide"> <div class="alert alert--success animation-slide-in-from-bottom hide">
<svg class="alert__icon icon icon-success"> <svg class="alert__icon icon icon-success">
<use xlink:href="/assets/img/sprite.svg#icon-success"></use> <use xlink:href="/assets/img/sprite.svg#icon-success"></use>
</svg> </svg>
@ -57,7 +57,7 @@
Thanks for submitting the agreement. Thanks for submitting the agreement.
</p> </p>
</div> </div>
<div class="alert alert-danger hide"> <div class="alert alert--danger hide">
<svg class="alert__icon icon icon-fail"> <svg class="alert__icon icon icon-fail">
<use xlink:href="/assets/img/sprite.svg#icon-fail"></use> <use xlink:href="/assets/img/sprite.svg#icon-fail"></use>
</svg> </svg>
@ -83,7 +83,8 @@
</div> </div>
<div class="tab-pane" id="entity" role="tabpanel"> <div class="tab-pane" id="entity" role="tabpanel">
<form id="form-cla-entities" class="form form--cla js-parsley" action="//formspree.io/{{ site.email.cla }}" method="POST" accept-charset="UTF-8"> <form id="form-cla-entities" class="form form--cla js-parsley" action="//formspree.io/{{ site.email.cla }}" method="POST"
accept-charset="UTF-8">
<p class="form-group"> <p class="form-group">
<input class="form-control" type="text" id="org-entity" name="org" required> <input class="form-control" type="text" id="org-entity" name="org" required>
<label class="form-label" for="org-entity">Name of organization, foundation, company or other entity</label> <label class="form-label" for="org-entity">Name of organization, foundation, company or other entity</label>
@ -104,12 +105,13 @@
Fields marked with an <span class="required">*</span> are required. Fields marked with an <span class="required">*</span> are required.
</p> </p>
<p class="form-group text-dimmed"> <p class="form-group text-dimmed">
Agreed and accepted: By clicking and accepting this Agreement, I represent and warrant that I have authority to bind the entity named above (if applicable) to the terms and conditions of this Agreement. Agreed and accepted: By clicking and accepting this Agreement, I represent and warrant that I have authority to bind the
entity named above (if applicable) to the terms and conditions of this Agreement.
</p> </p>
<div class="form-group checkbox"> <div class="form-group checkbox">
<label> <label>
<input class="agree" type="checkbox" value="agreement" name="agreement" required> <input class="agree" type="checkbox" value="agreement" name="agreement" required> I have read and agree
I have read and agree to the <a href="/cla/entity/">terms of this Agreement</a> to the <a href="/cla/entity/">terms of this Agreement</a>
</label> </label>
</div> </div>
<p class="form-group"> <p class="form-group">

View File

@ -24,8 +24,8 @@
"ie >= 11" "ie >= 11"
], ],
"dependencies": { "dependencies": {
"bigchaindb-driver": "^4.0.1", "bigchaindb-driver": "^4.1.0",
"bootstrap": "^4.1.1", "bootstrap": "^4.1.3",
"clipboard": "^2.0.1", "clipboard": "^2.0.1",
"cookies-eu-banner": "^1.2.14", "cookies-eu-banner": "^1.2.14",
"gumshoejs": "github:cferdinandi/gumshoe", "gumshoejs": "github:cferdinandi/gumshoe",
@ -34,25 +34,25 @@
"normalize-opentype.css": "^0.2.4", "normalize-opentype.css": "^0.2.4",
"normalize-scss": "^7.0.1", "normalize-scss": "^7.0.1",
"parsleyjs": "^2.8.1", "parsleyjs": "^2.8.1",
"popper.js": "^1.14.3", "popper.js": "^1.14.4",
"select2": "^4.0.5", "select2": "^4.0.5",
"smooth-scroll": "^14.2.0", "smooth-scroll": "^14.2.1",
"svg4everybody": "^2.1.9", "svg4everybody": "^2.1.9",
"textarea-autogrow": "^1.0.0", "textarea-autogrow": "^1.0.0",
"vivus": "^0.4.4" "vivus": "^0.4.4"
}, },
"devDependencies": { "devDependencies": {
"acorn": "^5.6.2", "acorn": "^5.7.2",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"browser-sync": "^2.24.4", "browser-sync": "^2.24.7",
"concurrent-transform": "^1.0.0", "concurrent-transform": "^1.0.0",
"critical": "^1.3.3", "critical": "^1.3.4",
"cross-spawn": "^6.0.5", "cross-spawn": "^6.0.5",
"del": "^3.0.0", "del": "^3.0.0",
"gulp": "^4.0.0", "gulp": "^4.0.0",
"gulp-autoprefixer": "^6.0.0", "gulp-autoprefixer": "^6.0.0",
"gulp-clean-css": "^3.9.4", "gulp-clean-css": "^3.10.0",
"gulp-cli": "^2.0.1", "gulp-cli": "^2.0.1",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-header": "^2.0.5", "gulp-header": "^2.0.5",
@ -61,19 +61,19 @@
"gulp-imagemin": "^4.1.0", "gulp-imagemin": "^4.1.0",
"gulp-include": "^2.3.1", "gulp-include": "^2.3.1",
"gulp-load-plugins": "^1.5.0", "gulp-load-plugins": "^1.5.0",
"gulp-rename": "^1.3.0", "gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-rev": "^8.1.1", "gulp-rev": "^8.1.1",
"gulp-rev-replace": "^0.4.4", "gulp-rev-replace": "^0.4.4",
"gulp-sass": "^4.0.1", "gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4", "gulp-sourcemaps": "^2.6.4",
"gulp-svg-sprite": "^1.4.0", "gulp-svg-sprite": "^1.4.0",
"gulp-uglify": "^3.0.0", "gulp-uglify": "^3.0.1",
"gulp-util": "^3.0.8", "gulp-util": "^3.0.8",
"gulp-zip": "^4.1.0", "gulp-zip": "^4.2.0",
"js-yaml": "^3.12.0", "js-yaml": "^3.12.0",
"request": "^2.87.0", "request": "^2.88.0",
"stylelint": "^9.2.1", "stylelint": "^9.5.0",
"stylelint-config-bigchaindb": "^1.2.1", "stylelint-config-bigchaindb": "^1.2.1",
"stylelint-config-standard": "^18.2.0", "stylelint-config-standard": "^18.2.0",
"uglify-es": "^3.3.9" "uglify-es": "^3.3.9"