RegistrationView.js revision 14d054c1695261ccf1186a6f1ed8c339eb0e86fe
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright © 2011-2012 ForgeRock AS. All rights reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
/*global $, define, Mustache*/
/**
* @author mbilski
*/
["app/comp/common/dialog/DialogsCtrl"],
function(dialogsCtrl) {
var obj = {};
obj.getRegisterButton = function() {
return $("#registration input[name='register']");
};
var user = {
//TODO: Until 'replace' won't add new values
address1 : "",
address2 : "",
city : "",
postalcode : "",
country : "",
state_province : "",
passwordAttempts: "",
accountStatus: "active",
lastPasswordSet: new Date(),
};
}
return user;
};
obj.getSecurityQuestionOrZeroIfNotSet = function(){
if(securityQuestion){
return securityQuestion;
} else {
return "0";
}
};
obj.getSecurityAnswerOrRandomIfNotSet = function(){
if(securityAnswer){
return securityAnswer;
} else {
securityAnswer = "";
return securityAnswer.toLowerCase();
}
};
obj.getFirstNameInput = function() {
return $("#registration input[name='firstName']");
};
obj.getLastNameInput = function() {
return $("#registration input[name='lastName']");
};
obj.getPhoneInput = function() {
return $("#registration input[name='phone']");
};
obj.getEmailInput = function() {
return $("#registration input[name='email']");
};
obj.getPasswordInput = function() {
return $("#registration input[name='password']");
};
obj.getPasswordConfirmInput = function() {
return $("#registration input[name='passwordConfirm']");
};
obj.getTermsOfUseCheckbox = function() {
return $("#registration input[name='terms']");
};
obj.areTermsOfUseAgreed = function() {
};
obj.getSecurityQuestion = function() {
return $("#registration select[name='securityQuestion']");
};
obj.getSecurityAnswer = function() {
return $("#registration input[name='securityAnswer']");
};
obj.getPassphrase = function() {
return $("#registration input[name='passphrase']");
};
obj.getSelectPictureLink = function() {
return $("#selectPictureLink");
};
var view;
if( mode === 'admin' ) {
} else {
}
$.ajax({
type : "GET",
dataType : "html",
$(this).fadeIn(100);
callback();
});
},
});
};
obj.showTermsOfUseDialog = function() {
var self = this;
self.dialogs.setActions("<input type='button' name='dialogClose' id='dialogClose' class='button gray floatRight' value='Close' />");
});
});
};
obj.enableRegisterButton = function() {
};
obj.disableRegisterButton = function() {
};
//pasphrase
};
};
};
};
return $("#passphrasePictures img");
};
obj.getForgottenPasswordDialog = function() {
return $("#frgtPasswrdSelfReg");
};
return obj;
});