Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UyTube_obligatorio_PdA
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Juan José Álvarez Pérez
UyTube_obligatorio_PdA
Commits
49538cb9
Commit
49538cb9
authored
5 years ago
by
Julio Arrieta
Browse files
Options
Downloads
Patches
Plain Diff
modificando las validaciones de alta usuario, antes del commit con pre_master
parent
642f2adf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
UyTube_web/web/AltaUsuario.jsp
+3
-21
3 additions, 21 deletions
UyTube_web/web/AltaUsuario.jsp
UyTube_web/web/js/alta-usuario.js
+20
-0
20 additions, 0 deletions
UyTube_web/web/js/alta-usuario.js
with
23 additions
and
21 deletions
UyTube_web/web/AltaUsuario.jsp
+
3
−
21
View file @
49538cb9
...
...
@@ -10,24 +10,6 @@
<%
boolean
sesionIniciada
=
(
boolean
)
(
request
.
getSession
().
getAttribute
(
"usuario"
)
!=
null
);
%>
<script>
var
check
=
function
()
{
if
(
document
.
getElementById
(
'
input_Contrasenia
'
).
value
==
document
.
getElementById
(
'
input_Repetir_contraseña
'
).
value
)
{
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
green
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
Correcto
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
false
;
if
(
document
.
getElementById
(
'
input_Contrasenia
'
).
value
==
""
){
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
red
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
Ingrese la contraseña
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
true
;
}
}
else
{
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
red
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
No son iguales
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
true
;
}
}
</script>
<head>
<meta
charset=
"UTF-8"
>
...
...
@@ -90,7 +72,7 @@
<form
class=
"form-signin"
action=
"/uytube/usuario-agregar"
method=
"post"
enctype=
"multipart/form-data"
>
<h1
class=
"h3 mb-3 font-weight-normal"
id=
"Texto_ingrese"
>
Ingrese sus datos
</h1><br>
<input
class=
"form-control"
type=
"text"
name=
"nickname"
placeholder=
"Nickname"
id=
"input_Nickname"
required
>
<span
id=
"msjNickname"
></span>
<span
class=
"small"
id=
"msjNickname"
></span>
<br>
<div
class=
"row"
>
...
...
@@ -103,13 +85,13 @@
</div>
<input
class=
"form-control"
type=
"email"
name=
"email"
placeholder=
"Email"
id=
"email"
required
>
<span
id=
"msjEmail"
></span>
<span
class=
"small"
id=
"msjEmail"
></span>
<br>
<input
class=
"form-control"
name=
"fechaNa"
type=
"date"
id=
"input_fecha"
name=
"trip-start"
><br>
<input
class=
"form-control"
type=
"password"
name=
"password"
placeholder=
"Contraseña"
id=
"input_Contrasenia"
onkeyup=
"check()"
required
><br>
<input
class=
"form-control"
type=
"password"
placeholder=
"Repita contraseña"
id=
"input_Repetir_contraseña"
onkeyup=
"check()"
required
>
<span
id=
'message'
></span>
<span
class=
"small"
id=
'message'
></span>
<div
class=
"d-block my-3"
>
<label
for=
"cc-name"
>
Privacidad del canal
</label>
...
...
This diff is collapsed.
Click to expand it.
UyTube_web/web/js/alta-usuario.js
+
20
−
0
View file @
49538cb9
...
...
@@ -13,6 +13,9 @@ $("#input_Nickname").keyup(function(){
},
function
(
respuesta
,
status
){
//alert("Data: " + respuesta + "\nStatus: " + status);
$
(
"
#msjNickname
"
).
text
(
respuesta
);
if
(
respuesta
==
"
Este nickname no está disponible
"
){
$
(
"
#msjNickname
"
).
css
(
"
color
"
,
"
red
"
);
}
});
});
...
...
@@ -33,3 +36,20 @@ $("#email").keyup(function(){
});
});
var
check
=
function
()
{
if
(
document
.
getElementById
(
'
input_Contrasenia
'
).
value
==
document
.
getElementById
(
'
input_Repetir_contraseña
'
).
value
)
{
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
green
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
Correcto
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
false
;
if
(
document
.
getElementById
(
'
input_Contrasenia
'
).
value
==
""
){
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
red
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
Ingrese la contraseña
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
true
;
}
}
else
{
document
.
getElementById
(
'
message
'
).
style
.
color
=
'
red
'
;
document
.
getElementById
(
'
message
'
).
innerHTML
=
'
No son iguales
'
;
document
.
getElementById
(
"
btn_Registrarme
"
).
disabled
=
true
;
}
}
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