card.subscribe.password.php 966 B

12345678910111213141516171819202122232425
  1. <div class="subscribe-password-card font-">
  2. <div class="card-top">
  3. <h5>Règles de définition du mot de passe :</h5>
  4. </div>
  5. <div class="card-content">
  6. <small class="text-muted">
  7. <ul class="list-unstyled pl-2 pr-1 mb-2">
  8. <?php foreach($selectedFormats as $pattern):
  9. if(!isset($formats[$pattern])) continue;
  10. $label = str_replace(array("Le mot de passe doit", "(norme ANSSI)"), array("Doit", ""), $formats[$pattern]['label']); ?>
  11. <li class="d-flex">
  12. <i class="fas fa-angle-right mr-1 my-auto text-muted"></i>
  13. <?php if(preg_match($pattern, $passwordInput)): ?>
  14. <span class="text-success"><?php echo $label ?></span>
  15. <i class="far fa-check-circle text-success my-auto ml-auto mr-0"></i>
  16. <?php else: ?>
  17. <span class="text-danger"><?php echo $label ?></span>
  18. <i class="far fa-times-circle text-danger my-auto ml-auto mr-0"></i>
  19. <?php endif; ?>
  20. </li>
  21. <?php endforeach; ?>
  22. </ul>
  23. </small>
  24. </div>
  25. </div>