mirror of https://github.com/itflow-org/itflow
Fixed add user and edit as well as update user, which were not working. Added autocomplete=new-password to add/edit user and update password
This commit is contained in:
parent
95b54d5bcf
commit
1b337fe72e
|
|
@ -10,7 +10,7 @@
|
|||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab" role="tablist">
|
||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-user-tab" data-toggle="pill" href="#pills-user">User</a>
|
||||
</li>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a Password" required>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a Password" autocomplete="new-password" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a password" value="<?php echo $password; ?>" required>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a password" value="<?php echo $password; ?>" autocomplete="new-password" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
6
post.php
6
post.php
|
|
@ -20,10 +20,14 @@ if(isset($_POST['add_user'])){
|
|||
$password = md5($_POST['password']);
|
||||
$client_id = intval($_POST['client']);
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW(), client_id = $client_id");
|
||||
mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', created_at = NOW()");
|
||||
|
||||
$user_id = mysqli_insert_id($mysqli);
|
||||
|
||||
if(!file_exists("uploads/users/$user_id/")) {
|
||||
mkdir("uploads/users/$user_id");
|
||||
}
|
||||
|
||||
if($_FILES['file']['tmp_name']!='') {
|
||||
$path = "uploads/users/$user_id/";
|
||||
$path = $path . time() . basename( $_FILES['file']['name']);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ $password = $row['password'];
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a password" value="<?php echo $password; ?>">
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter a password" value="<?php echo $password; ?>" autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
Loading…
Reference in New Issue