mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 12:33:45 +01:00
make the password a password field and add username when uploading the file
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
<div class="form-group" style="margin-top: 4%;">
|
||||
<label for="passwordinput">Password</label>
|
||||
<input name="password" class="form-control" id="passwordinput" placeholder="Enter password">
|
||||
<input type="password" name="password" class="form-control" id="passwordinput" placeholder="Enter password">
|
||||
</div>
|
||||
<button id="submit" type="submit" class="btn btn-primary mx-auto d-block" style="width: 100%; margin-top: 4%;">Submit</button>
|
||||
</form>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<div class="form-group" style="margin-top: 4%;">
|
||||
<label for="passwordinput">Password</label>
|
||||
<input name="password" class="form-control" id="passwordinput" placeholder="Enter password">
|
||||
<input type="password" name="password" class="form-control" id="passwordinput" placeholder="Enter password">
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin-top: 4%;">
|
||||
@@ -51,9 +51,10 @@ function upload_error(error_message) {
|
||||
}
|
||||
|
||||
function upload_file(file_type, file_content) {
|
||||
username_input = document.getElementById("usernameinput").value
|
||||
fetch('{{ url_for("upload") }}', {
|
||||
method: "POST",
|
||||
body: JSON.stringify({image_data: file_content, image_type: file_type}),
|
||||
body: JSON.stringify({image_data: file_content, image_type: file_type, username: username_input}),
|
||||
headers: {
|
||||
"Content-type": "application/json"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user