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