Spaces:
Running
Running
Update reg.html
Browse files
reg.html
CHANGED
@@ -20,9 +20,7 @@
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
-
background:
|
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 |
|
@@ -33,7 +31,7 @@
|
|
33 |
transform: translateX(-50%);
|
34 |
width: 160px;
|
35 |
height: 160px;
|
36 |
-
background:
|
37 |
border-radius: 50%;
|
38 |
padding: 12px;
|
39 |
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
@@ -41,7 +39,6 @@
|
|
41 |
align-items: center;
|
42 |
justify-content: center;
|
43 |
z-index: 2;
|
44 |
-
animation: float 6s ease-in-out infinite;
|
45 |
}
|
46 |
|
47 |
.container {
|
@@ -49,15 +46,38 @@
|
|
49 |
width: 480px;
|
50 |
margin-top: 100px;
|
51 |
z-index: 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
.form-box {
|
55 |
-
|
|
|
|
|
56 |
padding: 40px;
|
57 |
border-radius: 24px;
|
58 |
-
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.
|
59 |
border: 1px solid rgba(218, 165, 32, 0.35);
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
h2 {
|
@@ -101,7 +121,7 @@
|
|
101 |
border-radius: 12px;
|
102 |
font-size: 15px;
|
103 |
transition: all 0.3s ease;
|
104 |
-
background:
|
105 |
color: #333;
|
106 |
}
|
107 |
|
@@ -138,6 +158,18 @@
|
|
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;
|
@@ -146,9 +178,26 @@
|
|
146 |
color: #666;
|
147 |
}
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
|
154 |
@media (max-width: 520px) {
|
@@ -173,60 +222,131 @@
|
|
173 |
</div>
|
174 |
|
175 |
<div class="container">
|
176 |
-
<div class="
|
177 |
-
|
178 |
-
<
|
179 |
-
<
|
180 |
-
|
181 |
-
<
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
-
<
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
<option value="owner">مالك المكتب</option>
|
189 |
-
<option value="lawyer">محامي</option>
|
190 |
-
<option value="employee">موظف في المكتب</option>
|
191 |
-
</select>
|
192 |
</div>
|
|
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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('
|
227 |
-
const password = document.getElementById('
|
228 |
|
229 |
-
// التحقق من صحة البيانات
|
230 |
if (!officeName || !userRole || !phone || !email || !password) {
|
231 |
showMessage('registerMessage', 'الرجاء إكمال جميع الحقول المطلوبة', true);
|
232 |
return false;
|
@@ -247,27 +367,10 @@
|
|
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) {
|
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
+
background: #ffffff;
|
|
|
|
|
24 |
color: #333;
|
25 |
}
|
26 |
|
|
|
31 |
transform: translateX(-50%);
|
32 |
width: 160px;
|
33 |
height: 160px;
|
34 |
+
background: #ffffff;
|
35 |
border-radius: 50%;
|
36 |
padding: 12px;
|
37 |
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
|
|
39 |
align-items: center;
|
40 |
justify-content: center;
|
41 |
z-index: 2;
|
|
|
42 |
}
|
43 |
|
44 |
.container {
|
|
|
46 |
width: 480px;
|
47 |
margin-top: 100px;
|
48 |
z-index: 1;
|
49 |
+
perspective: 1000px;
|
50 |
+
}
|
51 |
+
|
52 |
+
.forms-container {
|
53 |
+
position: relative;
|
54 |
+
width: 100%;
|
55 |
+
height: 100%;
|
56 |
+
transform-style: preserve-3d;
|
57 |
+
transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
58 |
+
}
|
59 |
+
|
60 |
+
.forms-container.flipped {
|
61 |
+
transform: rotateY(180deg);
|
62 |
}
|
63 |
|
64 |
.form-box {
|
65 |
+
position: absolute;
|
66 |
+
width: 100%;
|
67 |
+
background: #ffffff;
|
68 |
padding: 40px;
|
69 |
border-radius: 24px;
|
70 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
|
71 |
border: 1px solid rgba(218, 165, 32, 0.35);
|
72 |
+
backface-visibility: hidden;
|
73 |
+
}
|
74 |
+
|
75 |
+
.login-form {
|
76 |
+
transform: rotateY(0deg);
|
77 |
+
}
|
78 |
+
|
79 |
+
.register-form {
|
80 |
+
transform: rotateY(180deg);
|
81 |
}
|
82 |
|
83 |
h2 {
|
|
|
121 |
border-radius: 12px;
|
122 |
font-size: 15px;
|
123 |
transition: all 0.3s ease;
|
124 |
+
background: #ffffff;
|
125 |
color: #333;
|
126 |
}
|
127 |
|
|
|
158 |
box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
|
159 |
}
|
160 |
|
161 |
+
.toggle-btn {
|
162 |
+
background: transparent;
|
163 |
+
color: #DAA520;
|
164 |
+
border: 2px solid #DAA520;
|
165 |
+
margin-top: 20px;
|
166 |
+
}
|
167 |
+
|
168 |
+
.toggle-btn:hover {
|
169 |
+
background: #DAA520;
|
170 |
+
color: white;
|
171 |
+
}
|
172 |
+
|
173 |
.form-footer {
|
174 |
text-align: center;
|
175 |
margin-top: 25px;
|
|
|
178 |
color: #666;
|
179 |
}
|
180 |
|
181 |
+
.message {
|
182 |
+
padding: 10px;
|
183 |
+
margin-top: 15px;
|
184 |
+
border-radius: 8px;
|
185 |
+
text-align: center;
|
186 |
+
display: none;
|
187 |
+
}
|
188 |
+
|
189 |
+
.message.show {
|
190 |
+
display: block;
|
191 |
+
}
|
192 |
+
|
193 |
+
.message.error {
|
194 |
+
background-color: #ffebee;
|
195 |
+
color: #d32f2f;
|
196 |
+
}
|
197 |
+
|
198 |
+
.message.success {
|
199 |
+
background-color: #e8f5e9;
|
200 |
+
color: #388e3c;
|
201 |
}
|
202 |
|
203 |
@media (max-width: 520px) {
|
|
|
222 |
</div>
|
223 |
|
224 |
<div class="container">
|
225 |
+
<div class="forms-container">
|
226 |
+
<!-- نموذج تسجيل الدخول -->
|
227 |
+
<div class="form-box login-form">
|
228 |
+
<h2>تسجيل الدخول</h2>
|
229 |
+
<form id="loginForm" onsubmit="return handleLogin(event)">
|
230 |
+
<div class="input-group">
|
231 |
+
<label>البريد الإلكتروني</label>
|
232 |
+
<input type="email" id="loginEmail" required placeholder="أدخل بريدك الإلكتروني">
|
233 |
+
</div>
|
234 |
+
|
235 |
+
<div class="input-group">
|
236 |
+
<label>كلمة المرور</label>
|
237 |
+
<input type="password" id="loginPassword" required placeholder="أدخل كلمة المرور">
|
238 |
+
</div>
|
239 |
+
|
240 |
+
<button type="submit">تسجيل الدخول</button>
|
241 |
+
<div id="loginMessage" class="message"></div>
|
242 |
+
</form>
|
243 |
|
244 |
+
<button class="toggle-btn" onclick="toggleForm()">إنشاء حساب جديد</button>
|
245 |
+
|
246 |
+
<div class="form-footer">
|
247 |
+
منصة ذكاء اصطناعي قانوني موثوقة ومرخصة
|
|
|
|
|
|
|
|
|
248 |
</div>
|
249 |
+
</div>
|
250 |
|
251 |
+
<!-- نموذج إنشاء حساب -->
|
252 |
+
<div class="form-box register-form">
|
253 |
+
<h2>إنشاء حساب جديد</h2>
|
254 |
+
<form id="registerForm" onsubmit="return handleRegister(event)">
|
255 |
+
<div class="input-group">
|
256 |
+
<label>اسم المكتب/الشركة</label>
|
257 |
+
<input type="text" id="officeName" required placeholder="أدخل اسم المكتب أو الشركة">
|
258 |
+
</div>
|
259 |
+
|
260 |
+
<div class="input-group">
|
261 |
+
<label>صفة المسجل</label>
|
262 |
+
<select id="userRole" required>
|
263 |
+
<option value="">اختر صفتك</option>
|
264 |
+
<option value="owner">مالك المكتب</option>
|
265 |
+
<option value="lawyer">محامي</option>
|
266 |
+
<option value="employee">موظف في المكتب</option>
|
267 |
+
</select>
|
268 |
+
</div>
|
269 |
|
270 |
+
<div class="input-group">
|
271 |
+
<label>رقم الهاتف</label>
|
272 |
+
<input type="tel" id="phone" required placeholder="05xxxxxxxx" pattern="[0-9]{10}">
|
273 |
+
</div>
|
274 |
|
275 |
+
<div class="input-group">
|
276 |
+
<label>البريد الإلكتروني</label>
|
277 |
+
<input type="email" id="registerEmail" required placeholder="[email protected]">
|
278 |
+
</div>
|
279 |
|
280 |
+
<div class="input-group">
|
281 |
+
<label>كلمة المرور</label>
|
282 |
+
<input type="password" id="registerPassword" required placeholder="8 أحرف على الأقل" minlength="8">
|
283 |
+
</div>
|
284 |
+
|
285 |
+
<button type="submit">إنشاء الحساب</button>
|
286 |
+
<div id="registerMessage" class="message"></div>
|
287 |
+
</form>
|
288 |
+
|
289 |
+
<button class="toggle-btn" onclick="toggleForm()">العودة لتسجيل الدخول</button>
|
290 |
+
|
291 |
+
<div class="form-footer">
|
292 |
+
بالتسجيل، أنت توافق على <a href="#" style="color: #DAA520; text-decoration: none;">الشروط والأحكام</a>
|
293 |
+
</div>
|
294 |
</div>
|
295 |
</div>
|
296 |
</div>
|
297 |
|
298 |
<script>
|
299 |
+
const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6500/api';
|
300 |
+
|
301 |
+
function toggleForm() {
|
302 |
+
document.querySelector('.forms-container').classList.toggle('flipped');
|
303 |
+
clearMessages();
|
304 |
+
}
|
305 |
+
|
306 |
+
function clearMessages() {
|
307 |
+
document.querySelectorAll('.message').forEach(msg => {
|
308 |
+
msg.className = 'message';
|
309 |
+
msg.textContent = '';
|
310 |
+
});
|
311 |
+
}
|
312 |
+
|
313 |
+
function showMessage(elementId, message, isError = false) {
|
314 |
+
const element = document.getElementById(elementId);
|
315 |
+
element.textContent = message;
|
316 |
+
element.className = `message ${isError ? 'error' : 'success'} show`;
|
317 |
+
}
|
318 |
+
|
319 |
+
function handleLogin(event) {
|
320 |
+
event.preventDefault();
|
321 |
+
|
322 |
+
const email = document.getElementById('loginEmail').value;
|
323 |
+
const password = document.getElementById('loginPassword').value;
|
324 |
+
|
325 |
+
if (!email || !password) {
|
326 |
+
showMessage('loginMessage', 'الرجاء إدخال جميع البيانات المطلوبة', true);
|
327 |
+
return false;
|
328 |
+
}
|
329 |
+
|
330 |
+
if (!isValidEmail(email)) {
|
331 |
+
showMessage('loginMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
332 |
+
return false;
|
333 |
+
}
|
334 |
+
|
335 |
+
// هنا يمكنك إضافة كود الاتصال بالخادم
|
336 |
+
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
337 |
+
|
338 |
+
return false;
|
339 |
+
}
|
340 |
+
|
341 |
function handleRegister(event) {
|
342 |
event.preventDefault();
|
343 |
|
344 |
const officeName = document.getElementById('officeName').value;
|
345 |
const userRole = document.getElementById('userRole').value;
|
346 |
const phone = document.getElementById('phone').value;
|
347 |
+
const email = document.getElementById('registerEmail').value;
|
348 |
+
const password = document.getElementById('registerPassword').value;
|
349 |
|
|
|
350 |
if (!officeName || !userRole || !phone || !email || !password) {
|
351 |
showMessage('registerMessage', 'الرجاء إكمال جميع الحقول المطلوبة', true);
|
352 |
return false;
|
|
|
367 |
return false;
|
368 |
}
|
369 |
|
370 |
+
// هنا يمكنك إضافة كود الاتصال بالخادم
|
371 |
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
372 |
|
373 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
function isValidEmail(email) {
|