Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team6-Digital Insight for Health
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chen Liang
Team6-Digital Insight for Health
Commits
284d727c
Commit
284d727c
authored
5 months ago
by
Yulong Wang
Browse files
Options
Downloads
Patches
Plain Diff
Delete regist.html
parent
073de896
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/static/html/regist.html
+0
-144
0 additions, 144 deletions
src/main/resources/static/html/regist.html
with
0 additions
and
144 deletions
src/main/resources/static/html/regist.html
deleted
100644 → 0
+
0
−
144
View file @
073de896
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<title>
Register
</title>
<link
rel=
"stylesheet"
href=
"../css/regist.css"
>
<link
href=
'https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css'
rel=
'stylesheet'
>
<script
src=
"https://code.jquery.com/jquery-3.6.0.min.js"
></script>
<script
src=
"../js/emailValidation.js"
></script>
</head>
<body>
<!-- NAVBAR CREATION -->
<header
class=
"header"
>
<nav
class=
"navbar"
>
<a
href=
"../html/login.html"
>
Home
</a>
</nav>
</header>
<!-- BACKGROUND AND MAIN CONTAINER -->
<div
class=
"background"
></div>
<div
class=
"container"
>
<div
class=
"item"
>
<h2
class=
"logo"
><i
class=
'bx bxl-xing'
></i>
Health
&
Social Care
</h2>
<div
class=
"text-item"
>
<h2>
Welcome!
<br><span>
To Our Website
</span></h2>
<p>
Effective communication promotes faster and more efficient placements
</p>
<div
class=
"social-icon"
>
<a
href=
"#"
><i
class=
'bx bxl-facebook'
></i></a>
<a
href=
"#"
><i
class=
'bx bxl-twitter'
></i></a>
<a
href=
"#"
><i
class=
'bx bxl-youtube'
></i></a>
<a
href=
"#"
><i
class=
'bx bxl-instagram'
></i></a>
<a
href=
"#"
><i
class=
'bx bxl-linkedin'
></i></a>
</div>
</div>
</div>
<div
class=
"login-section"
style=
"overflow: auto"
>
<div
class=
"form-box register"
>
<form
action=
""
id=
"registForm"
>
<h2>
Sign Up
</h2>
<!-- Username -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-user'
></i></span>
<input
type=
"text"
id=
"name"
name=
"name"
required
>
<label>
Username
</label>
<span
id=
"nameError"
class=
"error-message"
></span>
</div>
<!-- Password -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-lock-alt'
></i></span>
<input
type=
"password"
id=
"password"
name=
"password"
required
>
<label>
Password
</label>
<span
id=
"passwordError"
class=
"error-message"
></span>
</div>
<!-- Email -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-envelope'
></i></span>
<input
type=
"text"
id=
"email"
required
>
<label>
Email
</label>
<span
id=
"emailError"
class=
"error-message"
></span>
</div>
<!-- Phone -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-phone'
></i></span>
<input
type=
"tel"
id=
"phone"
name=
"phone"
required
>
<label>
Phone
</label>
<span
id=
"phoneError"
class=
"error-message"
></span>
</div>
<!-- Address -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-map'
></i></span>
<input
type=
"text"
id=
"address"
name=
"address"
required
>
<label>
Address
</label>
<span
id=
"addressError"
class=
"error-message"
></span>
</div>
<!-- Type (Dropdown) -->
<div
class=
"input-box"
>
<span
class=
"icon"
><i
class=
'bx bxs-category'
></i></span>
<select
required
id=
"type"
>
<option
value=
""
disabled
selected
>
Select Type
</option>
<option
style=
"color: black"
value=
"hospital"
>
hospital
</option>
<option
style=
"color: black"
value=
"patient"
>
patient
</option>
</select>
</div>
</form>
<button
class=
"btn"
onclick=
"regist()"
>
Sign Up
</button>
</div>
</div>
</div>
<script>
var
type
;
var
role
;
const
getType
=
document
.
getElementById
(
"
type
"
);
getType
.
addEventListener
(
"
change
"
,
function
()
{
type
=
getType
.
value
;
// Gets the selected value
});
function
regist
()
{
if
(
type
===
"
hospital
"
)
{
role
=
"
HOSPITAL
"
;
}
else
if
(
type
===
"
patient
"
)
{
role
=
"
PATIENT
"
;
}
const
url
=
'
/superAdmin/sign
'
;
const
data
=
{
name
:
document
.
getElementsByName
(
"
name
"
)[
0
].
value
,
password
:
document
.
getElementsByName
(
"
password
"
)[
0
].
value
,
email
:
document
.
getElementById
(
"
email
"
).
value
,
phone
:
document
.
getElementsByName
(
"
phone
"
)[
0
].
value
,
address
:
document
.
getElementsByName
(
"
address
"
)[
0
].
value
,
status
:
1
,
role
:
role
,
type
:
type
};
console
.
log
(
"
Sending data:
"
,
data
);
fetch
(
url
,
{
method
:
"
POST
"
,
headers
:
{
"
Content-Type
"
:
"
application/json
"
,
},
body
:
JSON
.
stringify
(
data
)
})
.
then
((
response
)
=>
response
.
json
())
.
then
((
data
)
=>
{
console
.
log
(
data
)
if
(
data
.
code
===
1
)
{
console
.
log
(
data
)
window
.
location
.
href
=
"
login.html
"
}
if
(
data
.
code
===
0
){
alert
(
data
.
msg
);
}
})
}
</script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment