Explorar o código

fixed bug with missing shell

Serghey Rodin %!s(int64=14) %!d(string=hai) anos
pai
achega
d6e854e44f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      web/templates/admin/edit_user.html

+ 3 - 1
web/templates/admin/edit_user.html

@@ -53,9 +53,11 @@ document.v_edit_user.v_password.value = randomstring;
             <?php
                 foreach ($shells as $key => $value) {
                     echo "\t\t\t\t<option value=\"".$value."\"";
-                    if ((!empty($v_shell)) && ( $value == $v_shell)){
+                    $svalue = "'".$value."'";
+                    if (( $value == $v_shell ) || ($svalue == $v_shell )){
                         echo 'selected' ;
                     }
+
                     echo ">".$value."</option>\n";
                 }
             ?>