change_password.html

 1   <div class="row">
 2       <div class="well col-sm-6 col-sm-offset-3">
 3   
 4   	<h2>#i18n{module.mylutece.database.xpage.change_password.pageTitle}</h2>
 5   	
 6   	<#if action_successful?has_content>
 7               <h3>#i18n{module.mylutece.database.message.change_password.success}</h3>
 8               <form role="form" id="changePassword" name="changePassword" action="${action_successful}" method="post">
 9                   <table align="center">
 10                       <tr>
 11                           <td>
 12                               <input class="site-buttons" id="button-return" type="submit" name="btnBack" value="#i18n{module.mylutece.database.xpage.account.btnBack}" />
 13                           </td>
 14                       </tr>
 15                   </table>
 16               </form>
 17   	<#else>
 18               <#if error_code?has_content >
 19                   <#assign typeClass = "class=\"error\"" />
 20   
 21                   <#if error_code = "error_mandatory_fields">
 22                           <div class="alert alert-error">#i18n{module.mylutece.database.message.account.errorMandatoryFields}</div>
 23                           <#assign classOldPassword = typeClass />
 24                           <#assign classNewPassword = typeClass />
 25                           <#assign classConfirmation = typeClass />
 26                   </#if>
 27                   <#if error_code = "error_old_password">
 28                           <div class="alert alert-error">#i18n{module.mylutece.database.message.change_password.badOldPassword}</div>
 29                           <#assign classOldPassword = typeClass />
 30                   </#if>
 31                   <#if error_code = "error_confirmation_password">
 32                           <div class="alert alert-error">#i18n{module.mylutece.database.message.account.errorConfirmation}</div>
 33                           <#assign classNewPassword = typeClass />
 34                           <#assign classConfirmation = typeClass />
 35                   </#if>
 36                   <#if error_code = "error_same_password">
 37                           <div class="alert alert-error">#i18n{module.mylutece.database.message.change_password.errorSamePassword}</div>
 38                           <#assign classOldPassword = typeClass />
 39                           <#assign classNewPassword = typeClass />
 40                           <#assign classConfirmation = typeClass />
 41                   </#if>
 42                   <#if error_code = "password_minimum_length">
 43                           <div class="alert alert-error">${password_minimum_length!}</div>
 44                           <#assign classNewPassword = typeClass />
 45                           <#assign classConfirmation = typeClass />
 46                   </#if>
 47                   <#if error_code = "password_format">
 48                           <div class="alert alert-error">#i18n{mylutece.message.password.format}</div>
 49                           <#assign classNewPassword = typeClass />
 50                           <#assign classConfirmation = typeClass />
 51                   </#if>
 52                   <#if error_code = "password_already_used">
 53                           <div class="alert alert-error">#i18n{mylutece.message.password.passwordAlreadyUsed}</div>
 54                           <#assign classNewPassword = typeClass />
 55                           <#assign classConfirmation = typeClass />
 56                   </#if>
 57                   <#if error_code = "max_password_change">
 58                           <div class="alert alert-error">#i18n{mylutece.message.password.maxPasswordChange}</div>
 59                           <#assign classNewPassword = typeClass />
 60                           <#assign classConfirmation = typeClass />
 61                   </#if>
 62               </#if>	
 63   		
 64               <form role="form" id="changePassword" name="changePassword" action="jsp/site/plugins/mylutece/modules/database/DoChangePassword.jsp" method="post">
 65                   <input type="hidden" name="plugin_name" value="${plugin_name}" />
 66                   <fieldset>
 67                       <div class="form-group">
 68                           <label for="old_password">#i18n{module.mylutece.database.xpage.change_password.oldPassword} * : </label>
 69                           <input class="form-control" type="password" ${classOldPassword?if_exists} name="old_password" id="old_password" maxlength="100" size="35" tabindex="1" value="" />
 70                       </div>
 71                       <div class="form-group">
 72                           <label for="new_password">#i18n{module.mylutece.database.xpage.change_password.newPassword} * : </label>
 73                           <input class="form-control" type="password" ${classNewPassword?if_exists} name="new_password" id="new_password" maxlength="100" size="35" tabindex="2"  value="" />
 74                       </div>
 75                       <div class="form-group">
 76                           <label for="confirmation_password">#i18n{module.mylutece.database.xpage.change_password.confirmationPassword} * : </label>
 77                           <input class="form-control" type="password" ${classConfirmation?if_exists} id="confirmation_password" name="confirmation_password" maxlength="100" size="35" tabindex="3" value="" />
 78                       </div>
 79                       <button class="btn btn-primary btn-sm" id="button-subscribe" type="submit" name="changePassword"> 
 80                           #i18n{module.mylutece.database.xpage.change_password.btnValidate}
 81                       </button>
 82                       <button class="btn btn-default btn-sm" id="button-return" type="button" name="back" onclick="javascript:history.go(-1)">
 83                           #i18n{module.mylutece.database.xpage.account.btnBack} 
 84                       </button>
 85                   </fieldset>
 86               </form>
 87           </#if>
 88       </div>
 89   </div>