[spalenque] - #7812 *WIP
This commit is contained in:
parent
df7c1a5f90
commit
8228a5d2ea
@ -357,6 +357,9 @@
|
|||||||
|
|
||||||
function renderAffiliationList(data){
|
function renderAffiliationList(data){
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
//remove error message
|
||||||
|
$("label.error[for='HoneyPotForm_RegistrationForm_Affiliations']").remove();
|
||||||
|
|
||||||
var template = $('<ul><li><div class="affiliation-header">' +
|
var template = $('<ul><li><div class="affiliation-header">' +
|
||||||
'<span class="title"></span>' +
|
'<span class="title"></span>' +
|
||||||
'<span class="affiliation-actions"> ' +
|
'<span class="affiliation-actions"> ' +
|
||||||
|
@ -52,6 +52,17 @@ jQuery(document).ready(function($) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
edit_profile_form.validate({
|
edit_profile_form.validate({
|
||||||
|
onfocusout: false,
|
||||||
|
invalidHandler: function(form, validator) {
|
||||||
|
var errors = validator.numberOfInvalids();
|
||||||
|
if (errors) {
|
||||||
|
var element = validator.errorList[0].element;
|
||||||
|
var offset = (element.name == 'Affiliations') ? $(element).prev().offset().top : $(element).offset().top;
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: offset-100
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
},
|
||||||
ignore: [],
|
ignore: [],
|
||||||
rules: {
|
rules: {
|
||||||
FirstName:{required: true,regex:'[\"()=<>]+' },
|
FirstName:{required: true,regex:'[\"()=<>]+' },
|
||||||
@ -194,6 +205,17 @@ jQuery(document).ready(function($) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
edit_speaker_profile_form.validate({
|
edit_speaker_profile_form.validate({
|
||||||
|
onfocusout: false,
|
||||||
|
invalidHandler: function(form, validator) {
|
||||||
|
var errors = validator.numberOfInvalids();
|
||||||
|
if (errors) {
|
||||||
|
var element = validator.errorList[0].element;
|
||||||
|
var offset = (element.name == 'Affiliations') ? $(element).prev().offset().top : $(element).offset().top;
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: offset-100
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
},
|
||||||
ignore: [],
|
ignore: [],
|
||||||
rules: {
|
rules: {
|
||||||
FirstName:{required: true, ValidPlainText:true },
|
FirstName:{required: true, ValidPlainText:true },
|
||||||
|
@ -66,7 +66,11 @@ jQuery(document).ready(function($) {
|
|||||||
invalidHandler: function(form, validator) {
|
invalidHandler: function(form, validator) {
|
||||||
var errors = validator.numberOfInvalids();
|
var errors = validator.numberOfInvalids();
|
||||||
if (errors) {
|
if (errors) {
|
||||||
validator.errorList[0].element.focus();
|
var element = validator.errorList[0].element;
|
||||||
|
var offset = (element.name == 'Affiliations') ? $(element).prev().offset().top : $(element).offset().top;
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: offset-100
|
||||||
|
}, 2000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ignore: [],
|
ignore: [],
|
||||||
|
@ -50,9 +50,10 @@
|
|||||||
<% include Navigation %>
|
<% include Navigation %>
|
||||||
|
|
||||||
<!-- Page Content -->
|
<!-- Page Content -->
|
||||||
$Message
|
<div class="container">
|
||||||
$Layout
|
$Message
|
||||||
|
$Layout
|
||||||
|
</div>
|
||||||
|
|
||||||
<% include Footer %>
|
<% include Footer %>
|
||||||
<% include Quantcast %>
|
<% include Quantcast %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user