text: /*!
   * Twig Template -  v1.1.1 ((https://github.com/SecondSite-web/twig-template)
   * Copyright 2020 SecondSite
   * Licensed under MIT (https://github.com/SecondSite-web/twig-template/blob/master/LICENSE)
   */
  
  $(function(){$(document).ready(function(){$("#login-form").validate({rules:{password:{required:!0,minlength:8},email:{required:!0,email:!0}},messages:{password:{required:"Please provide a password"},email:"Please enter a valid email address"},errorElement:"p",errorPlacement:function(e,i){e.addClass("invalid-feedback"),"checkbox"===i.prop("type")?e.insertAfter(i.next("label")):e.insertAfter(i)},highlight:function(e,i,a){$(e).addClass("is-invalid").removeClass("is-valid")},unhighlight:function(e,i,a){$(e).addClass("is-valid").removeClass("is-invalid")}})}),$("#login-form").on("submit",function(e){if(!e.isDefaultPrevented()){return $.ajax({type:"POST",url:"twig/php/login.php",data:$(this).serialize(),success:function(e){if("danger"===e.type){var i="alert-"+e.type,a=e.message,s='<div class="alert '+i+' alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'+a+"</div>";i&&a&&($("#login-form").find(".messages").html(s),$("#login-form")[0].reset())}else window.location.replace("/twig/")}}),!1}})});