Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 399debb2 authored by 65160024's avatar 65160024
Browse files

Update regis,login

parent cc220bf0
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<body class="flex items-center justify-center h-screen bg-gray-100"> <body class="flex items-center justify-center h-screen bg-gray-100">
<div class="bg-white p-6 rounded-lg shadow-md w-80"> <div class="bg-white p-6 rounded-lg shadow-md w-80">
<h2 class="text-2xl font-bold text-center mb-4">เข้าสู่ระบบ</h2> <h2 class="text-2xl font-bold text-center mb-2">ยินดีต้อนรับสู่ระบบ</h2>
<p class="text-center text-gray-600 mb-4">ระบบยืม-คืนอุปกรณ์สำนักงาน</p>
<form action="/login" method="POST"> <form action="/login" method="POST">
<input type="text" name="username" placeholder="Username" required class="border p-2 rounded w-full mb-2"> <input type="text" name="username" placeholder="Username" required class="border p-2 rounded w-full mb-2">
<input type="password" name="password" placeholder="Password" required <input type="password" name="password" placeholder="Password" required
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="th">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>สมัครสมาชิก</title> <title>สมัครสมาชิก</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<script>
function validateForm() {
const password = document.getElementById('password').value;
const confirmPassword = document.getElementById('confirm-password').value;
if (password !== confirmPassword) {
alert("รหัสผ่านและการยืนยันรหัสผ่านไม่ตรงกัน");
return false;
}
return true;
}
</script>
</head> </head>
<body class="flex items-center justify-center min-h-screen bg-gray-100"> <body class="flex items-center justify-center min-h-screen bg-gray-100">
<div class="bg-white p-8 rounded-lg shadow-md w-96"> <div class="bg-white p-8 rounded-lg shadow-md w-96">
<h2 class="text-2xl font-bold mb-4 text-center">สมัครสมาชิก</h2> <h2 class="text-2xl font-bold mb-2 text-center">สมัครสมาชิก</h2>
<form action="/register" method="POST"> <p class="text-center text-gray-600 mb-4">สร้างบัญชีเพื่อใช้งานระบบยืม-คืนอุปกรณ์สำนักงาน</p>
<form action="/register" method="POST" onsubmit="return validateForm()">
<div class="mb-4"> <div class="mb-4">
<label class="block font-semibold">ชื่อผู้ใช้</label> <label class="block font-semibold">ชื่อผู้ใช้</label>
<input type="text" name="username" required class="border p-2 w-full rounded"> <input type="text" name="username" required class="border p-2 w-full rounded"
placeholder="กรอกชื่อผู้ใช้">
</div> </div>
<div class="mb-4"> <div class="mb-4">
<label class="block font-semibold">รหัสผ่าน</label> <label class="block font-semibold">รหัสผ่าน</label>
<input type="password" name="password" required class="border p-2 w-full rounded"> <input type="password" name="password" id="password" required class="border p-2 w-full rounded"
placeholder="รหัสผ่านอย่างน้อย 6 ตัว">
</div>
<div class="mb-4">
<label class="block font-semibold">ยืนยันรหัสผ่าน</label>
<input type="password" id="confirm-password" required class="border p-2 w-full rounded"
placeholder="ยืนยันรหัสผ่าน">
</div> </div>
<button type="submit" class="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600"> <button type="submit" class="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600">
สมัครสมาชิก สมัครสมาชิก
</button> </button>
</form> </form>
<p class="text-center text-sm text-gray-600 mt-4"> <p class="text-center text-sm text-gray-600 mt-4">
มีบัญชีอยู่แล้ว? <a href="/login" class="text-blue-500">เข้าสู่ระบบ</a> มีบัญชีอยู่แล้ว? <a href="/login" class="text-blue-500">เข้าสู่ระบบ</a>
</p> </p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment