noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 04/29: cosmetic info password


From: dwm
Subject: [Noalyss-commit] [noalyss] 04/29: cosmetic info password
Date: Sat, 6 Jan 2024 05:59:13 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit 51ea645a3dc593bd13d0b20b5db8feba23139b89
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Dec 15 19:02:33 2023 +0100

    cosmetic info password
---
 html/css/style-classic7.css |  2 +-
 include/user.inc.php        | 17 ++++++++++++-----
 include/user_detail.inc.php |  2 +-
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index 86376d701..9df3f72ee 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -3393,6 +3393,6 @@ li.li-active {
  */
  #info_passid {
      position:absolute;
-     background-color: yellow;
+     background-color: rgba(255,160,122,0.58);
      color:red;
  }
\ No newline at end of file
diff --git a/include/user.inc.php b/include/user.inc.php
index dddccd752..c9d7bfa07 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -48,9 +48,9 @@ if ( isset ($_POST["ADD"]) )
     $new_user->login=$login;
 
     $new_user->email=$http->post('EMAIL',"string",'');
-    if ( trim($login)=="")
+    if ( trim($login)=="" || strlen($login)<5)
     {
-            alert(_("Le login ne peut pas être vide"));
+            alert(_("Le login ne peut pas être vide et avoir au moins 5 
lettres"));
     }elseif (count($a_result['msg']) > 0){
         // password too weak
         $msg='<span class="warning">'._("Mot de passe inchangé").'</span>';
@@ -182,6 +182,7 @@ if ( isset($_REQUEST['det']) && $sbaction=="")
 <?php echo HtmlInput::title_box(_('Ajout Utilisateur'),"create_user","hide");?>
     <form action="admin-noalyss.php?action=user_mgt" method="POST" 
onsubmit="return check_form()">
     <div style="text-align: center">
+        <span style="position:absolute;font-size:75%" id="info_passid"></span>
 <TABLE class="result" >            
        <TR><TD style="text-align: right"> <?php echo 
_('login')?></TD><TD><INPUT id="input_login" class="input_text"  TYPE="TEXT" 
NAME="LOGIN"></TD></tr>
         <TR><TD style="text-align: right"> <?php echo 
_('Prénom')?></TD><TD><INPUT class="input_text" TYPE="TEXT" 
NAME="FNAME"></TD></tr>
@@ -192,9 +193,9 @@ if ( isset($_REQUEST['det']) && $sbaction=="")
 
            </TD>
            <TD> <INPUT id="input_password" class="input_text" TYPE="TEXT" 
NAME="PASS"
-        onkeyup=check_password_strength('input_password','info_passid')
+                
onkeyup="check_password_strength('input_password','info_passid',true)"
                >
-           <span id="info_passid"></span>
+
            </TD></TR>
        <TR><TD style="text-align: right"> <?php echo _('Email')?></TD><TD> 
<INPUT class="input_text" TYPE="TEXT" NAME="EMAIL"></TD></TR>
 </TABLE>
@@ -218,8 +219,14 @@ echo HtmlInput::button_action(_("Fermer"), 
"$('create_user').style.display='none
                 $('input_password').setStyle({border:"red solid 2px"});
                 return false;
             }
+            if ($F('input_login').length < 5) {
+                smoke.alert('<?php echo _('Le login doit avoir au moins 5 
lettres') ?>');
+                $('input_password').setStyle({border:"red solid 2px"});
+                return false;
+            }
             return true;
         }
+
     </script>
 </div>
 
@@ -253,7 +260,7 @@ if ( !empty ($a_user) )
 {
        echo '<span style="display:block">';
        echo _('Cherche').Icon_Action::infobulle(22);
-       echo HtmlInput::filter_table("user", "0,1,2,5","1");
+       echo HtmlInput::filter_table("user", "0,1,2,3,5,6","1");
        echo '</span>';
     echo '<table id="user" class="result">';
     echo '<tr>';
diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php
index c84f5602f..3a3c61c8d 100644
--- a/include/user_detail.inc.php
+++ b/include/user_detail.inc.php
@@ -82,7 +82,7 @@ $it_pass->value="";
             </td>
             <td>
                 <?php echo $it_pass->input();?>
-                <span id="password_info" style="background-color: 
yellow;color:red;position:absolute"></span>
+                <span id="password_info" style="background-color: 
rgba(255,160,122,0.58);color:orangered;position:absolute"></span>
             </td>
         </tr>
         <tr>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]