Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
ultranet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wilson Valverde
ultranet
Commits
473a570d
Commit
473a570d
authored
Nov 26, 2020
by
Wilson Valverde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
registro
parent
f5be00bc
Pipeline
#88
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
0 deletions
+134
-0
index.html
index.html
+134
-0
No files found.
index.html
View file @
473a570d
...
@@ -7,12 +7,146 @@
...
@@ -7,12 +7,146 @@
<link
rel=
"stylesheet"
href=
"font-awesome/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"font-awesome/css/font-awesome.min.css"
>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"
></script>
<script
src=
"https://code.jquery.com/jquery-2.2.2.min.js"
></script>
<meta
http-equiv=
"Content-Security-Policy"
content=
"upgrade-insecure-requests"
>
</head>
</head>
<script>
$
(
document
).
ready
(
function
()
{
var
fecha
=
new
Date
();
var
now
=
new
Date
();
var
day
=
(
"0"
+
now
.
getDate
()).
slice
(
-
2
);
var
month
=
(
"0"
+
(
now
.
getMonth
()
+
1
)).
slice
(
-
2
);
var
today
=
now
.
getFullYear
()
+
"-"
+
(
month
)
+
"-"
+
(
day
)
;
$
(
'#creation_date'
).
val
(
today
);
$
(
'#formulario'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
// Capturamnos el boton de envío
var
btnEnviar
=
$
(
"#btnEnviar"
);
var
nombre
=
$
(
"#name_user"
).
val
();
console
.
log
(
$
(
"#formulario"
).
serialize
()
+
"holaaaaaaaa"
+
btnEnviar
);
ajaxx
(
btnEnviar
,
nombre
);
// Nos permite cancelar el envio del formulario
});
function
ajaxx
(
btnEnviar
,
nombre
)
{
$
.
ajax
({
type
:
"POST"
,
//url: "http://201.182.151.33:8086/job/new",
//url: 'https://academia.nodo.com.ec/taller',
url
:
'http://localhost:3000/affiliate/new'
,
//data: ,
data
:
$
(
"#formulario"
).
serialize
(),
beforeSend
:
function
()
{
/*
* Esta función se ejecuta durante el envió de la petición al
* servidor.
* */
// btnEnviar.text("Enviando"); Para button
btnEnviar
.
val
(
"Enviando"
);
// Para input de tipo button
btnEnviar
.
attr
(
"disabled"
,
"disabled"
);
},
complete
:
function
(
data
)
{
/*
* Se ejecuta al termino de la petición
* */
btnEnviar
.
val
(
"Enviar formulario"
);
btnEnviar
.
removeAttr
(
"disabled"
);
},
success
:
function
(
data
)
{
/*
* Se ejecuta cuando termina la petición y esta ha sido
* correcta
* */
//$(".respuesta").html(data);
console
.
log
(
data
);
alert
(
"Excelente ya se encuentra afiliado"
);
// console.log($("#name_user").val());
// $(".nombre").text(nombre);
// $("#thanks").trigger("click");
/*localStorage.setItem('nombre', nombre);
window.location = "gracias.html"*/
},
error
:
function
(
data
)
{
/*
* Se ejecuta si la peticón ha sido erronea
* */
alert
(
"El correo ya se encuentra registrado"
);
//$("#respuesta").html(data.body);
console
.
log
(
data
);
}
});
}
});
</script>
<script>
function
sololetras
(
e
)
{
var
key
=
e
.
keyCode
||
e
.
which
,
tecla
=
String
.
fromCharCode
(
key
).
toLowerCase
(),
letras
=
" áéíóúabcdefghijklmnñopqrstuvwxyz"
,
especiales
=
[
8
,
37
,
39
,
46
],
tecla_especial
=
false
;
for
(
var
i
in
especiales
)
{
if
(
key
==
especiales
[
i
])
{
tecla_especial
=
true
;
break
;
}
}
if
(
letras
.
indexOf
(
tecla
)
==
-
1
&&
!
tecla_especial
)
{
return
false
;
}
}
function
solonumeros
(
a
)
{
var
e
=
$
(
"#"
+
a
).
val
();
var
reg
=
/^
\d
+$/
;
if
(
!
reg
.
test
(
e
))
{
$
(
"#"
+
a
).
val
(
""
);
}
}
</script>
<body>
<body>
<header
>
<header
>
ultranet
ultranet
</header>
</header>
<containter>
<containter>
<form
id=
"formulario"
action=
"#"
>
Reserva tu cupo de afiliado
<br>
<div
class=
"inputWithIcon"
>
<input
type=
"text"
id=
"name_user"
name=
"name_user"
onkeypress=
"return sololetras(event)"
placeholder=
"Nombres"
required
>
<i
class=
"fa fa-user fa-lg fa-fw"
aria-hidden=
"true"
></i>
</div>
<div
class=
"inputWithIcon"
>
<input
type=
"text"
name=
"country_user"
placeholder=
"Parroquia"
onkeypress=
"return sololetras(event)"
required
>
<i
class=
"fa fa-globe fa-lg fa-fw"
aria-hidden=
"true"
></i>
</div>
<div
class=
"inputWithIcon"
>
<input
type=
"text"
name=
"tlf_user"
placeholder=
"Teléfono Convencional"
onkeypress=
"return solonumeros(event)"
required
>
<i
class=
"fa fa-globe fa-lg fa-fw"
aria-hidden=
"true"
></i>
</div>
<div
class=
"inputWithIcon"
>
<input
type=
"email"
name=
"email_user"
placeholder=
"Email"
required
>
<i
class=
"fa fa-envelope fa-lg fa-fw"
aria-hidden=
"true"
></i>
</div>
<div
class=
"inputWithIcon"
>
<input
type=
"text"
name=
"phone_user"
id=
"phone_user"
onkeyup=
"solonumeros(this.id)"
placeholder=
"Celular"
required
>
<i
class=
"fa fa-phone fa-lg fa-fw"
aria-hidden=
"true"
></i>
</div>
<input
type=
"date"
id=
"creation_date"
name=
"creation_date"
readonly
>
<p
style=
"font-size: 0.8vw; margin-bottom: 0px;"
>
Tus datos están seguros con nosotros.
</p>
<button
type=
"submit"
id=
"btnEnviar"
class=
"btnSubmit"
><strong>
RESERVAR
</strong></button>
</form>
</containter>
</containter>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment