Fix no closed div element on account settings.

This commit is contained in:
Paulo Gustavo Veiga 2014-02-11 23:27:46 -03:00
parent ec9d0470d8
commit d5f658677e

View File

@ -8,41 +8,50 @@
<li><a href="#changePasswordPanel" data-toggle="pill"><spring:message code="SECURITY"/></a></li> <li><a href="#changePasswordPanel" data-toggle="pill"><spring:message code="SECURITY"/></a></li>
</c:if> </c:if>
<li><a href="#languagePanel" data-toggle="pill"><spring:message code="LANGUAGE"/></a></li> <li><a href="#languagePanel" data-toggle="pill"><spring:message code="LANGUAGE"/></a></li>
<c:if test="${principal.databaseSchema}">
<li><a href="#deleteAccountPanel" data-toggle="pill"><spring:message code="DELETE__ACCOUNT"/></a></li> <li><a href="#deleteAccountPanel" data-toggle="pill"><spring:message code="DELETE__ACCOUNT"/></a></li>
</c:if>
</ul> </ul>
<div class="tab-content" style="padding-top:15px;"> <div class="tab-content" style="padding-top:15px;">
<div class="tab-pane fade ${principal.databaseSchema?'active in':''}" id="changeUserPanel"> <div class="tab-pane fade ${principal.databaseSchema?'active in':''}" id="changeUserPanel">
<div id="changeInfoMsg" class="alert"> <div id="changeInfoMsg" class="alert"></div>
</div>
<form action="#" method="POST" id="changeUserForm" class="form-horizontal"> <form action="#" method="POST" id="changeUserForm" class="form-horizontal">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
<label for="email" class="col-md-3 control-label"><strong><spring:message code="EMAIL"/>:</strong></label> <label for="email" class="col-md-3 control-label"><strong><spring:message
code="EMAIL"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" name="password" id="email" required="required" class="form-control" readonly="readonly" value="${user.email}"/> <input type="text" name="password" id="email" required="required" class="form-control"
readonly="readonly" value="${user.email}"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="firstname" class="col-md-3 control-label"><strong><spring:message code="FIRSTNAME"/>:</strong></label> <label for="firstname" class="col-md-3 control-label"><strong><spring:message code="FIRSTNAME"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" name="firstname" id="firstname" required="required" class="form-control" value="${user.firstname}"/> <input type="text" name="firstname" id="firstname" required="required" class="form-control"
value="${user.firstname}"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="lastname" class="col-md-3 control-label"><strong><spring:message code="LASTNAME"/>:</strong></label> <label for="lastname" class="col-md-3 control-label"><strong><spring:message
code="LASTNAME"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" name="lastname" id="lastname" required="required" class="form-control" value="${user.lastname}"/> <input type="text" name="lastname" id="lastname" required="required" class="form-control"
value="${user.lastname}"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-8 col-md-2"> <div class="col-md-offset-8 col-md-2">
<input type="submit" id="changeUserInfoBtn" class="btn btn-primary" class="form-control" value="<spring:message code="SAVE_CHANGES"/>"/> <input type="submit" id="changeUserInfoBtn" class="btn btn-primary" class="form-control"
<div> value="<spring:message code="SAVE_CHANGES"/>"/>
</div>
</div> </div>
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div class="tab-pane fade" id="changePasswordPanel"> <div class="tab-pane fade" id="changePasswordPanel">
<div id="changePasswordMsg" class="alert"> <div id="changePasswordMsg" class="alert">
@ -50,20 +59,27 @@
<form action="#" method="POST" id="changePasswordForm" class="form-horizontal"> <form action="#" method="POST" id="changePasswordForm" class="form-horizontal">
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
<label for="password" class="col-md-3 control-label"><strong><spring:message code="NEW_PASSWORD"/>:</strong></label> <label for="password" class="col-md-3 control-label"><strong><spring:message
code="NEW_PASSWORD"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="password" name="password" id="password" required="required" class="form-control"/> <input type="password" name="password" id="password" required="required"
class="form-control"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="repassword" class="col-md-3 control-label"><strong><spring:message code="CONFIRM_NEW_PASSWORD"/>:</strong></label> <label for="repassword" class="col-md-3 control-label"><strong><spring:message
code="CONFIRM_NEW_PASSWORD"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="password" name="password" id="repassword" required="required" class="form-control"/> <input type="password" name="password" id="repassword" required="required"
class="form-control"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-8 col-md-2"> <div class="col-md-offset-8 col-md-2">
<input type="submit" id="changePasswordBtn" class="btn btn-primary" value="<spring:message code="CHANGE_PASSWORD"/>"/> <input type="submit" id="changePasswordBtn" class="btn btn-primary"
value="<spring:message code="CHANGE_PASSWORD"/>"/>
</div> </div>
</div> </div>
</fieldset> </fieldset>
@ -74,7 +90,8 @@
</div> </div>
<form action="#" method="POST" id="languageForm" class="form-horizontal"> <form action="#" method="POST" id="languageForm" class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label for="language" class="col-md-3 control-label"><strong><spring:message code="LANGUAGE"/>:</strong></label> <label for="language" class="col-md-3 control-label"><strong><spring:message
code="LANGUAGE"/>:</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<select name="language" id="language" class="form-control"> <select name="language" id="language" class="form-control">
<option value="en">English</option> <option value="en">English</option>
@ -94,10 +111,12 @@
Portuguese Portuguese
(Brazil) - português (Brasil) (Brazil) - português (Brasil)
</option> </option>
<option value="zh_CN" <c:if test="${user.locale=='zh_CN'}">selected="selected" </c:if>>Chinese <option value="zh_CN" <c:if test="${user.locale=='zh_CN'}">selected="selected" </c:if>>
Chinese
(Simplified Han) - 中文(简体中文) (Simplified Han) - 中文(简体中文)
</option> </option>
<option value="zh_TW" <c:if test="${user.locale=='zh_TW'}">selected="selected" </c:if>>Chinese <option value="zh_TW" <c:if test="${user.locale=='zh_TW'}">selected="selected" </c:if>>
Chinese
(Traditional Han) - 中文 (繁體中文) (Traditional Han) - 中文 (繁體中文)
</option> </option>
<option value="ca" <c:if test="${user.locale=='ca'}">selected="selected" </c:if>>Catalan - <option value="ca" <c:if test="${user.locale=='ca'}">selected="selected" </c:if>>Catalan -
@ -107,16 +126,20 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-8 col-md-2"> <div class="col-md-offset-8 col-md-2">
<input type="submit" id="changeLanguageBtn" class="btn btn-primary" value="<spring:message code="CHANGE_LANGUAGE"/>"/> <input type="submit" id="changeLanguageBtn" class="btn btn-primary"
value="<spring:message code="CHANGE_LANGUAGE"/>"/>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="tab-pane fade" id="deleteAccountPanel"> <div class="tab-pane fade" id="deleteAccountPanel">
<div id="deleteAccountMsg" class="alert alert-danger" style="display: block;"><spring:message code="WARNING_DELETE_USER"/></div> <div id="deleteAccountMsg" class="alert alert-danger" style="display: block;"><spring:message
code="WARNING_DELETE_USER"/></div>
<form action="#" method="POST" id="deleteAccountForm"> <form action="#" method="POST" id="deleteAccountForm">
<div class="form-group" style="text-align:right"> <div class="form-group" style="text-align:right">
<input type="checkbox" name="confirmAccountDelete" id="accountMarkedForDelete" required="required"/> <input type="submit" id="deleteAccountBtn" class="btn btn-primary" value="<spring:message code="DELETE__ACCOUNT"/>"/> <input type="checkbox" name="confirmAccountDelete" id="accountMarkedForDelete" required="required"/>
<input type="submit" id="deleteAccountBtn" class="btn btn-primary"
value="<spring:message code="DELETE__ACCOUNT"/>"/>
</div> </div>
</form> </form>
</div> </div>
@ -157,11 +180,11 @@
postChange( postChange(
"c/restful/account/password", "c/restful/account/password",
inputVal, inputVal,
function() { function () {
changePasswordMsg.removeClass('alert-danger').addClass('alert-info').show(); changePasswordMsg.removeClass('alert-danger').addClass('alert-info').show();
changePasswordMsg.text('<spring:message code="CHANGE_PASSWORD_SUCCESS"/>'); changePasswordMsg.text('<spring:message code="CHANGE_PASSWORD_SUCCESS"/>');
}, },
function(textStatus) { function (textStatus) {
changePasswordMsg.removeClass('alert-info').addClass('alert-danger').show(); changePasswordMsg.removeClass('alert-info').addClass('alert-danger').show();
changePasswordMsg.text(textStatus); changePasswordMsg.text(textStatus);
} }
@ -177,12 +200,12 @@
postChange( postChange(
"c/restful/account/firstname", "c/restful/account/firstname",
firstname, firstname,
function() { function () {
var changeInfoMsg = $('#changeInfoMsg'); var changeInfoMsg = $('#changeInfoMsg');
changeInfoMsg.removeClass('alert-error').addClass('alert-info').show(); changeInfoMsg.removeClass('alert-error').addClass('alert-info').show();
changeInfoMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>'); changeInfoMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>');
}, },
function(textStatus) { function (textStatus) {
changeInfoMsg.removeClass('alert-info').addClass('alert-danger').show(); changeInfoMsg.removeClass('alert-info').addClass('alert-danger').show();
changeInfoMsg.text(textStatus); changeInfoMsg.text(textStatus);
} }
@ -190,11 +213,11 @@
postChange( postChange(
"c/restful/account/lastname", "c/restful/account/lastname",
lastname, lastname,
function() { function () {
changeInfoMsg.removeClass('alert-danger').addClass('alert-info').show(); changeInfoMsg.removeClass('alert-danger').addClass('alert-info').show();
changeInfoMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>'); changeInfoMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>');
}, },
function(textStatus) { function (textStatus) {
changeInfoMsg.removeClass('alert-info').addClass('alert-danger').show(); changeInfoMsg.removeClass('alert-info').addClass('alert-danger').show();
changeInfoMsg.text(textStatus); changeInfoMsg.text(textStatus);
} }
@ -209,11 +232,11 @@
postChange( postChange(
"c/restful/account/locale", "c/restful/account/locale",
locale, locale,
function() { function () {
languageMsg.removeClass('alert-danger').addClass('alert-info').show(); languageMsg.removeClass('alert-danger').addClass('alert-info').show();
languageMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>'); languageMsg.text('<spring:message code="INFO_UPDATE_SUCCESS"/>');
}, },
function(textStatus) { function (textStatus) {
languageMsg.removeClass('alert-info').addClass('alert-danger').show(); languageMsg.removeClass('alert-info').addClass('alert-danger').show();
languageMsg.text(textStatus); languageMsg.text(textStatus);
} }
@ -226,10 +249,10 @@
postChange( postChange(
"c/restful/account", "c/restful/account",
locale, locale,
function() { function () {
window.location.href = "/c/logout" window.location.href = "/c/logout"
}, },
function(textStatus) { function (textStatus) {
var deleteAccountMsg = $('#deleteAccountMsg'); var deleteAccountMsg = $('#deleteAccountMsg');
deleteAccountMsg.removeClass('alert-info').addClass('alert-danger').show(); deleteAccountMsg.removeClass('alert-info').addClass('alert-danger').show();
deleteAccountMsg.text(textStatus); deleteAccountMsg.text(textStatus);