Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pissirSmartHome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Alfredo Chissotti
pissirSmartHome
Commits
240962a0
Commit
240962a0
authored
2 years ago
by
Elisa Giglio
Browse files
Options
Downloads
Patches
Plain Diff
modifica al form di creazione di un nuovo dominio
parent
30199a28
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webapp/public/js/authentication/app.js
+10
-2
10 additions, 2 deletions
webapp/public/js/authentication/app.js
with
10 additions
and
2 deletions
webapp/public/js/authentication/app.js
+
10
−
2
View file @
240962a0
...
...
@@ -104,9 +104,11 @@ class App {
form
.
addEventListener
(
'
submit
'
,
async
(
event
)
=>
{
event
.
preventDefault
();
let
errors
=
0
;
const
domainNameInput
=
document
.
getElementById
(
'
nuovoDominio
'
);
const
domainName
=
domainNameInput
.
value
.
trim
();
if
(
domainName
===
''
){
errors
++
;
domainNameInput
.
classList
.
add
(
'
is-invalid
'
);
domainNameInput
.
classList
.
remove
(
'
is-valid
'
);
document
.
getElementById
(
'
valid-domainName
'
).
innerHTML
=
''
;
...
...
@@ -147,6 +149,7 @@ class App {
const
checkboxDiv
=
document
.
getElementById
(
'
checkbox-div
'
);
if
(
checks
.
length
===
0
){
errors
++
;
checkboxDiv
.
classList
.
add
(
'
is-invalid
'
);
checkboxDiv
.
classList
.
remove
(
'
is-valid
'
);
document
.
getElementById
(
'
valid-services
'
).
innerHTML
=
''
;
...
...
@@ -166,6 +169,7 @@ class App {
const
nome
=
nomeInput
.
value
;
if
(
nome
===
''
)
{
errors
++
;
nomeInput
.
classList
.
add
(
'
is-invalid
'
);
nomeInput
.
classList
.
remove
(
'
is-valid
'
);
document
.
getElementById
(
`valid-userName
${
i
}
`
).
innerHTML
=
''
;
...
...
@@ -181,6 +185,7 @@ class App {
const
passwordInput
=
document
.
getElementById
(
`passwordUtente
${
i
}
`
);
const
password
=
passwordInput
.
value
;
if
(
password
===
''
)
{
errors
++
;
passwordInput
.
classList
.
add
(
'
is-invalid
'
);
passwordInput
.
classList
.
remove
(
'
is-valid
'
);
document
.
getElementById
(
`valid-userPassword
${
i
}
`
).
innerHTML
=
''
;
...
...
@@ -195,7 +200,8 @@ class App {
const
ruoloInput
=
document
.
getElementById
(
`ruoloUtente
${
i
}
`
);
const
ruolo
=
ruoloInput
.
value
;
if
(
ruolo
===
''
||
ruolo
===
'
unselected
'
)
{
if
(
ruolo
===
'
unselected
'
)
{
errors
++
;
ruoloInput
.
classList
.
add
(
'
is-invalid
'
);
ruoloInput
.
classList
.
remove
(
'
is-valid
'
);
document
.
getElementById
(
`valid-userRole
${
i
}
`
).
innerHTML
=
''
;
...
...
@@ -215,7 +221,9 @@ class App {
});
i
++
;
}
if
(
errors
>
0
)
{
return
;
}
const
json
=
{
domain
:
domainName
,
services
:
checks
,
...
...
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