login_form_multi.html

 1   <div class="container">
 2       <div class="row">
 3           <div class="col-sm-12 col-md-4 offset-md-4">
 4           <#if list_authentications??>
 5               <#if error_message?? && error_message != ''>
 6               <div class="alert alert-warning">
 7                   <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 9v4" /><path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z" /><path d="M12 16h.01" /></svg>
 8                   <span class="ms-2">${error_message!}</span>
 9                   <#if error_details?? && error_details !=''><br/>${error_detail!}</#if>
 10               </div>
 11               </#if>
 12               <form method="post" action="${url_dologin}">
 13               <input type="hidden" name="page" value="mylutece" >
 14               <input type="hidden" name="action" value="dologin" >
 15               <input type="hidden" name="token" value="${token}" >
 16               <p class="text-center">
 17                   <img class="mb-4" src="images/lutece-logo-dark.svg" alt="" width="72">
 18               </p>
 19               <h1 class="h3 mb-3 fw-normal">#i18n{mylutece.xpage.login_form.pageTitle}</h1>
 20               <#-- first display delegated authentications [oauth etc...]-->
 21               <#list list_authentications as authentication>
 22                   <#if authentication.delegatedAuthentication>
 23                   <div class="form-group">
 24                       <label for="" class="col-xs-12 col-sm-12 col-md-3 col-lg-3"></label>
 25                       <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
 26                           <a href="${url_dologin}?page=mylutece&action=dologin&auth_provider=${authentication.name}">
 27                               <img src="${authentication.iconUrl}" title="${authentication.authServiceName} " alt="${authentication.authServiceName} " />
 28                           </a>
 29                       </div>
 30                   </div>
 31                   </#if>
 32               </#list>
 33               <#-- display internal authentications [such as database]-->
 34               <#assign bHasInternalAuth = false />
 35               <#assign lostLoginUrl='' />
 36               <#assign lostPasswordUrl='' />
 37               <#if list_authentications?size != 1>
 38                   <#list list_authentications as authentication>
 39                   <#if !authentication.externalAuthentication && !authentication.delegatedAuthentication>
 40                       <#if !bHasInternalAuth><#assign bHasInternalAuth = true /></#if>
 41                       <div class="form-group">
 42                           <label for="" class="col-xs-12 col-sm-12 col-md-3 col-lg-3"></label>
 43                           <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
 44                               <div class="radio">
 45                                   <label>
 46                                       <input type="radio" name="auth_provider" value="${authentication.name}"  <#if auth_provider?has_content && auth_provider = authentication.name>checked="checked"</#if> >${authentication.authServiceName}
 47                                   </label>
 48                               </div>
 49                           </div>
 50                       </div>
 51                   </#if>
 52                   </#list>
 53               <#else>
 54                   <#list list_authentications as authentication>
 55                       <#if !authentication.externalAuthentication && !authentication.delegatedAuthentication>
 56                           <#if !bHasInternalAuth><#assign bHasInternalAuth = true /></#if>
 57                           <input type="hidden" name="auth_provider" value="${authentication.name}" />
 58                           <#assign lostPasswordUrl=authentication.getLostPasswordPageUrl() />
 59                           <#assign lostLoginUrl=authentication.getLostLoginPageUrl() />
 60                       </#if>
 61                   </#list>
 62               </#if>	
 63               <#if bHasInternalAuth>
 64               <div class="form-floating">
 65                   <input type="test" class="form-control" name="username" id="floatingInput" placeholder="name@example.com">
 66                   <label for="floatingInput">#i18n{mylutece.xpage.login_form.labelAccessCode} </label>
 67               </div>
 68               <div class="form-floating">
 69                   <input type="password" name="password" class="form-control" id="floatingPassword" placeholder="#i18n{mylutece.xpage.login_form.labelPassword}">
 70                   <label for="floatingPassword">#i18n{mylutece.xpage.login_form.labelPassword} </label>
 71               </div>
 72               <#if is_active_captcha>
 73               <div class="form-row">${captcha}</div>
 74               </#if>
 75               <button class="btn btn-primary w-100 py-2 mt-2" type="submit">#i18n{mylutece.xpage.login_form.labelButton}</button>
 76               <p class="mt-1 text-body-secondary">
 77                   #i18n{mylutece.xpage.login_form.labelNewAccount}
 78                   <#if url_new_account?has_content>
 79                   <a class="btn btn-light" title="#i18n{mylutece.xpage.login_form.labelButtonCreateAccount}" href="${url_new_account}">
 80                       #i18n{mylutece.xpage.login_form.labelButtonCreateAccount} <span class="ti ti-user-plus"></span> 
 81                   </a>
 82                   </#if>
 83               </p>
 84               <p>
 85               <#if lostPasswordUrl??><a class="btn btn-light" title="#i18n{mylutece.xpage.login_form.labelButtonLostPassword}" href="${lostPasswordUrl!}">#i18n{mylutece.xpage.login_form.labelButtonLostPassword}</a></#if>
 86               <#if lostLoginUrl??><a class="btn btn-light" title="#i18n{mylutece.xpage.login_form.labelButtonLostLogin}" href="${lostLoginUrl!}">#i18n{mylutece.xpage.login_form.labelButtonLostLogin}</a></#if>
 87               </p>
 88               </#if>
 89               </form>
 90           </div>
 91       </div>
 92   </div>
 93   </#if>