Spaces:
Running
Running
Update reg.html
Browse files
reg.html
CHANGED
|
@@ -3,341 +3,276 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title
|
|
|
|
| 7 |
<style>
|
| 8 |
-
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
|
| 9 |
-
|
| 10 |
* {
|
| 11 |
margin: 0;
|
| 12 |
padding: 0;
|
| 13 |
box-sizing: border-box;
|
| 14 |
-
font-family: 'Tajawal', sans-serif;
|
| 15 |
}
|
| 16 |
|
| 17 |
body {
|
| 18 |
min-height: 100vh;
|
| 19 |
display: flex;
|
| 20 |
-
justify-content: center;
|
| 21 |
align-items: center;
|
| 22 |
-
|
| 23 |
position: relative;
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
-
.
|
| 28 |
-
position: fixed;
|
| 29 |
-
top: 0;
|
| 30 |
-
left: 0;
|
| 31 |
-
width: 100%;
|
| 32 |
-
height: 100%;
|
| 33 |
-
z-index: 0;
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
.circle {
|
| 37 |
position: absolute;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
border-radius: 50%;
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
height: 300px;
|
| 47 |
-
top: -150px;
|
| 48 |
-
left: -150px;
|
| 49 |
-
animation-delay: 0s;
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
.circle:nth-child(2) {
|
| 53 |
-
width: 400px;
|
| 54 |
-
height: 400px;
|
| 55 |
-
bottom: -200px;
|
| 56 |
-
right: -200px;
|
| 57 |
-
animation-delay: -5s;
|
| 58 |
-
background: linear-gradient(45deg, #6366f1, #8b5cf6);
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
@keyframes float {
|
| 62 |
-
0%, 100% {
|
| 63 |
-
transform: translateY(0) scale(1);
|
| 64 |
-
}
|
| 65 |
-
50% {
|
| 66 |
-
transform: translateY(-20px) scale(1.1);
|
| 67 |
-
}
|
| 68 |
}
|
| 69 |
|
| 70 |
.container {
|
| 71 |
position: relative;
|
| 72 |
-
width:
|
| 73 |
-
|
| 74 |
-
padding: 2rem;
|
| 75 |
z-index: 1;
|
| 76 |
}
|
| 77 |
|
| 78 |
-
.
|
| 79 |
-
background: rgba(255, 255, 255, 0.
|
| 80 |
-
|
| 81 |
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 82 |
border-radius: 24px;
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
}
|
| 85 |
|
| 86 |
-
|
| 87 |
text-align: center;
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
margin-bottom: 0.5rem;
|
| 95 |
-
background: linear-gradient(45deg, #3b82f6, #6366f1);
|
| 96 |
-
-webkit-background-clip: text;
|
| 97 |
-
-webkit-text-fill-color: transparent;
|
| 98 |
}
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
}
|
| 104 |
|
| 105 |
-
.
|
| 106 |
-
margin-bottom:
|
|
|
|
| 107 |
}
|
| 108 |
|
| 109 |
-
.
|
| 110 |
display: block;
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
font-
|
| 114 |
}
|
| 115 |
|
| 116 |
-
|
| 117 |
width: 100%;
|
| 118 |
-
padding:
|
| 119 |
-
|
| 120 |
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 121 |
border-radius: 12px;
|
| 122 |
-
|
| 123 |
-
font-size: 1rem;
|
| 124 |
transition: all 0.3s ease;
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
-
|
|
|
|
|
|
|
| 128 |
outline: none;
|
| 129 |
-
border-color: #3b82f6;
|
| 130 |
-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
| 131 |
}
|
| 132 |
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
}
|
| 136 |
|
| 137 |
-
|
| 138 |
width: 100%;
|
| 139 |
-
padding:
|
| 140 |
-
background: linear-gradient(
|
| 141 |
border: none;
|
| 142 |
-
border-radius:
|
| 143 |
-
color:
|
| 144 |
-
font-size:
|
| 145 |
-
font-weight:
|
| 146 |
cursor: pointer;
|
| 147 |
transition: all 0.3s ease;
|
| 148 |
-
margin-top:
|
| 149 |
}
|
| 150 |
|
| 151 |
-
|
| 152 |
transform: translateY(-2px);
|
| 153 |
-
box-shadow: 0
|
| 154 |
}
|
| 155 |
|
| 156 |
-
.
|
| 157 |
text-align: center;
|
| 158 |
-
margin-top:
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
.login-link a {
|
| 163 |
-
color: #3b82f6;
|
| 164 |
-
text-decoration: none;
|
| 165 |
-
margin-right: 0.25rem;
|
| 166 |
-
}
|
| 167 |
-
|
| 168 |
-
.login-link a:hover {
|
| 169 |
-
text-decoration: underline;
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
.message {
|
| 173 |
-
padding: 1rem;
|
| 174 |
-
border-radius: 8px;
|
| 175 |
-
margin-bottom: 1rem;
|
| 176 |
-
display: none;
|
| 177 |
-
}
|
| 178 |
-
|
| 179 |
-
.success {
|
| 180 |
-
background: rgba(52, 211, 153, 0.1);
|
| 181 |
-
border: 1px solid rgba(52, 211, 153, 0.2);
|
| 182 |
-
color: #34d399;
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
.error {
|
| 186 |
-
background: rgba(239, 68, 68, 0.1);
|
| 187 |
-
border: 1px solid rgba(239, 68, 68, 0.2);
|
| 188 |
-
color: #ef4444;
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
.loading {
|
| 192 |
-
pointer-events: none;
|
| 193 |
-
opacity: 0.7;
|
| 194 |
}
|
| 195 |
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
}
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
border-radius: 50%;
|
| 211 |
-
border-top-color: transparent;
|
| 212 |
-
animation: spin 1s linear infinite;
|
| 213 |
-
}
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
transform: translate(-50%, -50%) rotate(360deg);
|
| 218 |
}
|
| 219 |
}
|
| 220 |
</style>
|
| 221 |
</head>
|
| 222 |
<body>
|
| 223 |
-
<div class="
|
| 224 |
-
<
|
| 225 |
-
<div class="circle"></div>
|
| 226 |
</div>
|
| 227 |
-
|
| 228 |
<div class="container">
|
| 229 |
-
<div class="
|
| 230 |
-
<
|
| 231 |
-
|
| 232 |
-
<
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
<
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
required
|
| 246 |
-
>
|
| 247 |
</div>
|
| 248 |
|
| 249 |
-
<div class="
|
| 250 |
-
<label
|
| 251 |
-
<input
|
| 252 |
-
type="email"
|
| 253 |
-
class="form-input"
|
| 254 |
-
name="email"
|
| 255 |
-
placeholder="أدخل بريدك الإلكتروني"
|
| 256 |
-
required
|
| 257 |
-
>
|
| 258 |
</div>
|
| 259 |
|
| 260 |
-
<div class="
|
| 261 |
-
<label
|
| 262 |
-
<input
|
| 263 |
-
type="text"
|
| 264 |
-
class="form-input"
|
| 265 |
-
name="username"
|
| 266 |
-
placeholder="اختر اسم مستخدم"
|
| 267 |
-
required
|
| 268 |
-
>
|
| 269 |
</div>
|
| 270 |
|
| 271 |
-
<div class="
|
| 272 |
-
<label
|
| 273 |
-
<input
|
| 274 |
-
type="password"
|
| 275 |
-
class="form-input"
|
| 276 |
-
name="password"
|
| 277 |
-
placeholder="اختر كلمة مرور قوية"
|
| 278 |
-
required
|
| 279 |
-
>
|
| 280 |
</div>
|
| 281 |
|
| 282 |
-
<button type="submit"
|
|
|
|
| 283 |
</form>
|
| 284 |
-
|
| 285 |
-
<div class="
|
| 286 |
-
|
| 287 |
</div>
|
| 288 |
</div>
|
| 289 |
</div>
|
| 290 |
|
| 291 |
<script>
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
const messageDiv = document.getElementById('message');
|
| 295 |
-
|
| 296 |
-
function showMessage(type, text) {
|
| 297 |
-
messageDiv.className = `message ${type}`;
|
| 298 |
-
messageDiv.textContent = text;
|
| 299 |
-
messageDiv.style.display = 'block';
|
| 300 |
-
}
|
| 301 |
-
|
| 302 |
-
form.addEventListener('submit', async (e) => {
|
| 303 |
-
e.preventDefault();
|
| 304 |
-
|
| 305 |
-
// تفعيل حالة التحميل
|
| 306 |
-
form.classList.add('loading');
|
| 307 |
|
| 308 |
-
const
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
'Content-Type': 'application/json'
|
| 320 |
-
},
|
| 321 |
-
body: JSON.stringify(formData)
|
| 322 |
-
});
|
| 323 |
|
| 324 |
-
|
|
|
|
|
|
|
|
|
|
| 325 |
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
window.location.href = 'login.html';
|
| 330 |
-
}, 2000);
|
| 331 |
-
} else {
|
| 332 |
-
showMessage('error', data.detail || 'حدث خطأ أثناء إنشاء الحساب');
|
| 333 |
-
}
|
| 334 |
-
} catch (error) {
|
| 335 |
-
showMessage('error', 'حدث خطأ في الاتصال بالخادم');
|
| 336 |
-
} finally {
|
| 337 |
-
// إلغاء حالة التحميل
|
| 338 |
-
form.classList.remove('loading');
|
| 339 |
}
|
| 340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
</script>
|
| 342 |
</body>
|
| 343 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>منصة الذكاء الاصطناعي القانوني</title>
|
| 7 |
+
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap" rel="stylesheet">
|
| 8 |
<style>
|
|
|
|
|
|
|
| 9 |
* {
|
| 10 |
margin: 0;
|
| 11 |
padding: 0;
|
| 12 |
box-sizing: border-box;
|
| 13 |
+
font-family: 'Cairo', 'Tajawal', sans-serif;
|
| 14 |
}
|
| 15 |
|
| 16 |
body {
|
| 17 |
min-height: 100vh;
|
| 18 |
display: flex;
|
|
|
|
| 19 |
align-items: center;
|
| 20 |
+
justify-content: center;
|
| 21 |
position: relative;
|
| 22 |
+
padding: 20px;
|
| 23 |
+
background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6)),
|
| 24 |
+
url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
|
| 25 |
+
background-size: cover;
|
| 26 |
+
color: #333;
|
| 27 |
}
|
| 28 |
|
| 29 |
+
.logo-container {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
position: absolute;
|
| 31 |
+
top: 40px;
|
| 32 |
+
left: 50%;
|
| 33 |
+
transform: translateX(-50%);
|
| 34 |
+
width: 160px;
|
| 35 |
+
height: 160px;
|
| 36 |
+
background: rgba(255, 255, 255, 0.97);
|
| 37 |
border-radius: 50%;
|
| 38 |
+
padding: 12px;
|
| 39 |
+
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
| 40 |
+
display: flex;
|
| 41 |
+
align-items: center;
|
| 42 |
+
justify-content: center;
|
| 43 |
+
z-index: 2;
|
| 44 |
+
animation: float 6s ease-in-out infinite;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
|
| 47 |
.container {
|
| 48 |
position: relative;
|
| 49 |
+
width: 480px;
|
| 50 |
+
margin-top: 100px;
|
|
|
|
| 51 |
z-index: 1;
|
| 52 |
}
|
| 53 |
|
| 54 |
+
.form-box {
|
| 55 |
+
background: rgba(255, 255, 255, 0.98);
|
| 56 |
+
padding: 40px;
|
|
|
|
| 57 |
border-radius: 24px;
|
| 58 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
|
| 59 |
+
border: 1px solid rgba(218, 165, 32, 0.35);
|
| 60 |
+
backdrop-filter: blur(12px);
|
| 61 |
}
|
| 62 |
|
| 63 |
+
h2 {
|
| 64 |
text-align: center;
|
| 65 |
+
color: #000;
|
| 66 |
+
margin-bottom: 30px;
|
| 67 |
+
font-size: 32px;
|
| 68 |
+
font-weight: 700;
|
| 69 |
+
position: relative;
|
| 70 |
+
padding-bottom: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
}
|
| 72 |
|
| 73 |
+
h2::after {
|
| 74 |
+
content: '';
|
| 75 |
+
position: absolute;
|
| 76 |
+
bottom: 0;
|
| 77 |
+
left: 50%;
|
| 78 |
+
transform: translateX(-50%);
|
| 79 |
+
width: 80px;
|
| 80 |
+
height: 4px;
|
| 81 |
+
background: linear-gradient(90deg, #DAA520, #FFD700);
|
| 82 |
+
border-radius: 4px;
|
| 83 |
}
|
| 84 |
|
| 85 |
+
.input-group {
|
| 86 |
+
margin-bottom: 20px;
|
| 87 |
+
position: relative;
|
| 88 |
}
|
| 89 |
|
| 90 |
+
.input-group label {
|
| 91 |
display: block;
|
| 92 |
+
margin-bottom: 8px;
|
| 93 |
+
color: #555;
|
| 94 |
+
font-weight: 500;
|
| 95 |
}
|
| 96 |
|
| 97 |
+
input, select {
|
| 98 |
width: 100%;
|
| 99 |
+
padding: 14px 20px;
|
| 100 |
+
border: 2px solid rgba(218, 165, 32, 0.35);
|
|
|
|
| 101 |
border-radius: 12px;
|
| 102 |
+
font-size: 15px;
|
|
|
|
| 103 |
transition: all 0.3s ease;
|
| 104 |
+
background: rgba(255, 255, 255, 0.95);
|
| 105 |
+
color: #333;
|
| 106 |
}
|
| 107 |
|
| 108 |
+
input:focus, select:focus {
|
| 109 |
+
border-color: #DAA520;
|
| 110 |
+
box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
|
| 111 |
outline: none;
|
|
|
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
+
select {
|
| 115 |
+
appearance: none;
|
| 116 |
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E");
|
| 117 |
+
background-repeat: no-repeat;
|
| 118 |
+
background-position: left 20px center;
|
| 119 |
+
padding-left: 40px;
|
| 120 |
}
|
| 121 |
|
| 122 |
+
button {
|
| 123 |
width: 100%;
|
| 124 |
+
padding: 16px;
|
| 125 |
+
background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
|
| 126 |
border: none;
|
| 127 |
+
border-radius: 14px;
|
| 128 |
+
color: #000;
|
| 129 |
+
font-size: 18px;
|
| 130 |
+
font-weight: 600;
|
| 131 |
cursor: pointer;
|
| 132 |
transition: all 0.3s ease;
|
| 133 |
+
margin-top: 10px;
|
| 134 |
}
|
| 135 |
|
| 136 |
+
button:hover {
|
| 137 |
transform: translateY(-2px);
|
| 138 |
+
box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
|
| 139 |
}
|
| 140 |
|
| 141 |
+
.form-footer {
|
| 142 |
text-align: center;
|
| 143 |
+
margin-top: 25px;
|
| 144 |
+
padding-top: 20px;
|
| 145 |
+
border-top: 1px solid rgba(218, 165, 32, 0.25);
|
| 146 |
+
color: #666;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
}
|
| 148 |
|
| 149 |
+
@keyframes float {
|
| 150 |
+
0%, 100% { transform: translateX(-50%) translateY(0px); }
|
| 151 |
+
50% { transform: translateX(-50%) translateY(-10px); }
|
| 152 |
}
|
| 153 |
|
| 154 |
+
@media (max-width: 520px) {
|
| 155 |
+
.container {
|
| 156 |
+
width: 100%;
|
| 157 |
+
padding: 0 15px;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.form-box {
|
| 161 |
+
padding: 30px 20px;
|
| 162 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
+
h2 {
|
| 165 |
+
font-size: 26px;
|
|
|
|
| 166 |
}
|
| 167 |
}
|
| 168 |
</style>
|
| 169 |
</head>
|
| 170 |
<body>
|
| 171 |
+
<div class="logo-container">
|
| 172 |
+
<img src="https://ufastpro.com/wp-content/uploads/2024/11/تصميم-بدون-عنوان-3.png" alt="Logo" class="logo" style="width: 100%; height: 100%; object-fit: contain; border-radius: 50%;">
|
|
|
|
| 173 |
</div>
|
| 174 |
+
|
| 175 |
<div class="container">
|
| 176 |
+
<div class="form-box">
|
| 177 |
+
<h2>إنشاء حساب جديد</h2>
|
| 178 |
+
<form id="registerForm" onsubmit="return handleRegister(event)">
|
| 179 |
+
<div class="input-group">
|
| 180 |
+
<label>اسم المكتب/الشركة</label>
|
| 181 |
+
<input type="text" id="officeName" required placeholder="أدخل اسم المكتب أو الشركة">
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<div class="input-group">
|
| 185 |
+
<label>صفة المسجل</label>
|
| 186 |
+
<select id="userRole" required>
|
| 187 |
+
<option value="">اختر صفتك</option>
|
| 188 |
+
<option value="owner">مالك المكتب</option>
|
| 189 |
+
<option value="lawyer">محامي</option>
|
| 190 |
+
<option value="employee">موظف في المكتب</option>
|
| 191 |
+
</select>
|
|
|
|
|
|
|
| 192 |
</div>
|
| 193 |
|
| 194 |
+
<div class="input-group">
|
| 195 |
+
<label>رقم الهاتف</label>
|
| 196 |
+
<input type="tel" id="phone" required placeholder="05xxxxxxxx" pattern="[0-9]{10}">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 197 |
</div>
|
| 198 |
|
| 199 |
+
<div class="input-group">
|
| 200 |
+
<label>البريد الإلكتروني</label>
|
| 201 |
+
<input type="email" id="email" required placeholder="example@domain.com">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
</div>
|
| 203 |
|
| 204 |
+
<div class="input-group">
|
| 205 |
+
<label>كلمة المرور</label>
|
| 206 |
+
<input type="password" id="password" required placeholder="8 أحرف على الأقل" minlength="8">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
</div>
|
| 208 |
|
| 209 |
+
<button type="submit">إنشاء الحساب</button>
|
| 210 |
+
<div id="registerMessage" class="message"></div>
|
| 211 |
</form>
|
| 212 |
+
|
| 213 |
+
<div class="form-footer">
|
| 214 |
+
لديك حساب بالفعل؟ <a href="#" onclick="window.location.reload()" style="color: #DAA520; text-decoration: none;">تسجيل الدخول</a>
|
| 215 |
</div>
|
| 216 |
</div>
|
| 217 |
</div>
|
| 218 |
|
| 219 |
<script>
|
| 220 |
+
function handleRegister(event) {
|
| 221 |
+
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
|
| 223 |
+
const officeName = document.getElementById('officeName').value;
|
| 224 |
+
const userRole = document.getElementById('userRole').value;
|
| 225 |
+
const phone = document.getElementById('phone').value;
|
| 226 |
+
const email = document.getElementById('email').value;
|
| 227 |
+
const password = document.getElementById('password').value;
|
| 228 |
+
|
| 229 |
+
// التحقق من صحة البيانات
|
| 230 |
+
if (!officeName || !userRole || !phone || !email || !password) {
|
| 231 |
+
showMessage('registerMessage', 'الرجاء إكمال جميع الحقول المطلوبة', true);
|
| 232 |
+
return false;
|
| 233 |
+
}
|
| 234 |
|
| 235 |
+
if (!isValidEmail(email)) {
|
| 236 |
+
showMessage('registerMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
| 237 |
+
return false;
|
| 238 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
|
| 240 |
+
if (password.length < 8) {
|
| 241 |
+
showMessage('registerMessage', 'كلمة المرور يجب أن تكون 8 أحرف على الأقل', true);
|
| 242 |
+
return false;
|
| 243 |
+
}
|
| 244 |
|
| 245 |
+
if (phone.length !== 10 || !phone.match(/^[0-9]{10}$/)) {
|
| 246 |
+
showMessage('registerMessage', 'الرجاء إدخال رقم هاتف صحيح', true);
|
| 247 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
}
|
| 249 |
+
|
| 250 |
+
// هنا يمكنك إضافة كود إرسال البيانات إلى الخادم
|
| 251 |
+
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
| 252 |
+
|
| 253 |
+
return false; // منع إرسال النموذج تلقائياً
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
function showMessage(elementId, message, isError = false) {
|
| 257 |
+
const element = document.getElementById(elementId);
|
| 258 |
+
element.textContent = message;
|
| 259 |
+
element.style.padding = '10px';
|
| 260 |
+
element.style.marginTop = '15px';
|
| 261 |
+
element.style.borderRadius = '8px';
|
| 262 |
+
element.style.backgroundColor = isError ? '#ffebee' : '#e8f5e9';
|
| 263 |
+
element.style.color = isError ? '#d32f2f' : '#388e3c';
|
| 264 |
+
element.style.textAlign = 'center';
|
| 265 |
+
|
| 266 |
+
setTimeout(() => {
|
| 267 |
+
element.textContent = '';
|
| 268 |
+
element.style.padding = '0';
|
| 269 |
+
element.style.backgroundColor = 'transparent';
|
| 270 |
+
}, 3000);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
function isValidEmail(email) {
|
| 274 |
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
| 275 |
+
}
|
| 276 |
</script>
|
| 277 |
</body>
|
| 278 |
</html>
|