Skip to content

Commit ae4fa52

Browse files
committed
add files
0 parents  commit ae4fa52

File tree

225 files changed

+38742
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+38742
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#main-title {
2+
text-align: center;
3+
color: black;
4+
text-shadow: grey 2px 2px;
5+
}
6+
7+
legend {
8+
color: white;
9+
background-color: black;
10+
}
11+
12+
fieldset {
13+
border: 0;
14+
border-radius: 2px;
15+
background-color: lightblue;
16+
}
17+
18+
fieldset > p, .buttons > p {
19+
margin-top: 0;
20+
margin-bottom: 0;
21+
}
22+
23+
input {
24+
border: 1px solid black;
25+
border-bottom: none;
26+
border-right: none;
27+
border-radius: 5px;
28+
background-color: white;
29+
}
30+
31+
#contract-fieldset > label {
32+
margin-right: 24px;
33+
}
34+
35+
#company-select {
36+
margin-right: 24px;
37+
}
38+
39+
input[type=date] {
40+
background-color: white;
41+
border-radius: 0;
42+
}
43+
44+
.bottom-button {
45+
background-color: lightblue;
46+
max-width: 100px;
47+
border-radius: 5px;
48+
}
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<!DOCTYPE html>
2+
<html lang="es" dir="ltr">
3+
<head>
4+
<title>Actividad de Laboratorio del Módulo 2 de Samsung DesArrolladoras</title>
5+
<link rel="stylesheet" href="mmglab.css">
6+
<meta charset="utf-8">
7+
<meta name="author:" content="Marina Madrid García">
8+
</head>
9+
10+
<body>
11+
<h1 id="main-title">Formulario de Información Alta Telefónica</h1>
12+
13+
<form class="" action="mmglab.html" method="post" id="form">
14+
<fieldset>
15+
<legend>Datos Personales</legend>
16+
17+
<p>
18+
<label for="name">Nombre:</label>
19+
<input type="text" name="name" id="name" required maxlength="30">
20+
</p>
21+
22+
<p>
23+
<label for="surname">Apellidos:</label>
24+
<input type="text" name="surname" id="surname" required maxlength="60">
25+
</p>
26+
27+
<p>
28+
<label for="address">Dirección:</label>
29+
<input type="text" name="address" id="address" required maxlength="60">
30+
</p>
31+
32+
<p>
33+
<label for="post-code">Código Postal:</label>
34+
<input type="text" name="post-code" id="post-code" required maxlength="5">
35+
</p>
36+
37+
<p>
38+
<label for="city">Localidad:</label>
39+
<input type="text" name="city" id="city" required>
40+
</p>
41+
</fieldset>
42+
<br>
43+
44+
<fieldset id="contract-fieldset">
45+
<legend>Tipo de Contratación</legend>
46+
47+
<input type="radio" name="contract" value="0" checked="checked"><label>Nuestra Contratación</label>
48+
<input type="radio" name="contract" value="1"><label>Portabilidad</label>
49+
<input type="radio" name="contract" value="2"><label>Cambio de Contrato</label>
50+
51+
<p>
52+
<br>
53+
<label>Elija la compañía actual:</label>
54+
<select name="company" id="company-select">
55+
<option>Movistar</option>
56+
<option>Orange</option>
57+
<option>Vodafone</option>
58+
<option>Yoigo</option>
59+
<option>No Tengo Ninguna Compañía</option>
60+
</select>
61+
62+
<label>En caso de portabilidad, elija nueva compañía:</label>
63+
<select name="new-company">
64+
<option>Movistar</option>
65+
<option>Orange</option>
66+
<option>Vodafone</option>
67+
<option>Yoigo</option>
68+
</select>
69+
</p>
70+
71+
</fieldset>
72+
<br>
73+
74+
<fieldset>
75+
<legend>Datos Bancarios</legend>
76+
77+
<p>
78+
<label for="country">País:</label>
79+
<input type="text" name="country" id="country" value="ES" readonly>
80+
<label>(sólo válido ES)</label>
81+
</p>
82+
83+
<p>
84+
<label for="iban">Control IBAN:</label>
85+
<input type="text" name="iban" id="iban" placeholder="XX" required pattern="[0-9]{2}">
86+
<label>(dos dígitos)</label>
87+
</p>
88+
89+
<p>
90+
<label for="entity">Entidad:</label>
91+
<input type="text" name="entity" id="entity" placeholder="XXXX" required pattern="[0-9]{4}">
92+
<label>(cuatro dígitos)</label>
93+
</p>
94+
95+
<p>
96+
<label for="subsidiary">Sucursal:</label>
97+
<input type="text" name="subsidiary" id="subsidiary" placeholder="XXXX" required pattern="[0-9]{4}">
98+
<label>(cuatro dígitos)</label>
99+
</p>
100+
101+
<p>
102+
<label for="dc">DC:</label>
103+
<input type="text" name="dc" id="dc" placeholder="XX" required pattern="[0-9]{2}">
104+
<label>(dos dígitos)</label>
105+
</p>
106+
107+
<p>
108+
<label for="account">Cuenta:</label>
109+
<input type="text" name="account" id="account" placeholder="XXXXXXXXXX" required pattern="[0-9]{10}">
110+
<label>(diez dígitos)</label>
111+
</p>
112+
113+
</fieldset>
114+
<br>
115+
116+
<fieldset>
117+
<legend>Datos Estadísticos - ¿Cómo nos conoció?</legend>
118+
119+
<div class="chekboxes">
120+
<input type="checkbox" name="source" value="0"><label>A través de la TV</label><br/>
121+
<input type="checkbox" name="source" value="1"><label>A través de la radio</label><br/>
122+
<input type="checkbox" name="source" value="2"><label>A través de la Internet</label><br/>
123+
<input type="checkbox" name="source" value="3"><label>Otros</label><br/>
124+
</div>
125+
<br>
126+
127+
<p>
128+
<input type="range" name="value" value="1" min="1" max="5" id="valoration"><label>Valoración [1-5]</label>
129+
</p>
130+
<br>
131+
<label>Fecha de la Encuesta: </label><input type="date" name="date" value="2019-01-01" id="date"><label>Valoración [1-5]</label>
132+
</fieldset>
133+
134+
<div class="buttons">
135+
<p>
136+
<button type="submit">Enviar Datos</button>
137+
<button type="reset">Borrar Datos</button>
138+
</p>
139+
140+
<p>
141+
<button class="bottom-button" type="button" onclick="alertValoration()">Mostrar Valoración</button>
142+
<button class="bottom-button" type="button" onclick="alertBankAccount()">Mostrar Cuenta</button>
143+
<button class="bottom-button" type="button" onclick="alertWeekDate()">Mostrar Día Semana</button>
144+
</p>
145+
146+
</div>
147+
</form>
148+
149+
<script src="mmglab.js">
150+
</script>
151+
152+
</body>
153+
154+
</html>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
function alertValoration(){
2+
let valoration = document.getElementById('valoration').value;
3+
let punto = (valoration == 1 ? "punto" : "puntos");
4+
alert(`Has valorado con ${valoration} ${punto}`);
5+
}
6+
7+
function onlyNumber(number) {
8+
for(let char of number) {
9+
if (isNaN(parseInt(char, 10))){
10+
return false;
11+
}
12+
}
13+
return true;
14+
}
15+
16+
function validateNumeric(number, fieldname, expectedLength){
17+
if (!number || number.length != expectedLength || onlyNumber(number)){
18+
alert(`El campo ${fieldname} debe tener ${expectedLength} dígitos`);
19+
throw `validationError`;
20+
}
21+
}
22+
23+
function alertBankAccount(){
24+
let country = document.getElementById('country').value;
25+
let iban = document.getElementById('iban').value;
26+
validateNumeric(iban, "IBAN", 2)
27+
let entity = document.getElementById('entity').value;
28+
validateNumeric(entity, "Entidad", 4)
29+
let subsidiary = document.getElementById('subsidiary').value;
30+
validateNumeric(subsidiary, "Sucursal", 4)
31+
let dc = document.getElementById('dc').value;
32+
validateNumeric(dc, "DC", 2)
33+
let account = document.getElementById('account').value;
34+
validateNumeric(account, "Cuenta", 10)
35+
let bankaccount = `${country}-${iban}-${entity}-${subsidiary}-${dc}-${account}`;
36+
alert(`Le informamos que su cuenta bancaria es: ${bankaccount}`);
37+
}
38+
39+
function alertWeekDate(){
40+
let date = new Date(document.getElementById('date').value);
41+
let days = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo'];
42+
let numberdayweek = date.getDay() - 1;
43+
alert(`La fecha seleccionada en el elemento de fecha es un ${days[numberdayweek]}`);
44+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
*{
2+
box-sizing: border-box;
3+
margin: 0;
4+
padding: 0;
5+
}
6+
7+
header{
8+
margin: 2em;
9+
text-align: center;
10+
font-size: xx-large;
11+
font-weight: bold;
12+
}
13+
14+
p{
15+
margin-left: 1em;
16+
margin-bottom: 2em;
17+
}
18+
19+
.buttons{
20+
display: inline-block;
21+
}
22+
23+
#benter, #bdelete{
24+
width: 70px;
25+
height: 30px;
26+
border-style: ridge;
27+
border-radius: 3px;
28+
}
29+
30+
h1{
31+
margin-left: 1em;
32+
margin-bottom: 2em;
33+
text-align: center;
34+
}
35+
36+
h3{
37+
margin-left: 1.7em;
38+
text-align: center;
39+
}
40+
41+
.greencolor{
42+
color: green;
43+
}
44+
45+
.redcolor{
46+
color: red;
47+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta name="author:" content="Marina Madrid García">
8+
<title>Comprobación de DNI</title>
9+
<link rel="stylesheet" href="mmg_exjs.css">
10+
</head>
11+
<body>
12+
<header>Verificación de la letra del DNI</header>
13+
14+
<p>
15+
¿Sabe cómo se calcula la letra de DNI? Compruébelo en esta página web, solo debe introducir el número de DNI que quiera saber, y la letra que usted crea.
16+
</p>
17+
18+
<p>
19+
<label for="number">Número:</label>
20+
<input type="text" name="number" id="number" onkeypress="onEnterProcess(event)" required maxlength="8" placeholder="XXXXXXXX">
21+
</p>
22+
23+
<p>
24+
<label for="letter">Letra:</label>
25+
<input type="text" name="letter" id="letter" onkeypress="onEnterProcess(event)" required maxlength="1" placeholder="X">
26+
</p>
27+
28+
<div class="buttons">
29+
<p>
30+
<button onclick="process()" id="benter">Enter</button>
31+
<button onclick="deleteAll()" id="bdelete">Delete</button>
32+
</p>
33+
</div>
34+
35+
<div class="result1"></div>
36+
37+
<div class="result2"></div>
38+
39+
<script src="mmg_exjs.js"></script>
40+
</body>
41+
</html>

0 commit comments

Comments
 (0)