Carlos J Corrada Bravo 4 роки тому
коміт
29015e8b6d

BIN
__pycache__/admin.cpython-38.pyc Переглянути файл


BIN
__pycache__/connect.cpython-38.pyc Переглянути файл


BIN
__pycache__/enfermera.cpython-38.pyc Переглянути файл


BIN
__pycache__/estudiante.cpython-38.pyc Переглянути файл


BIN
__pycache__/facultad.cpython-38.pyc Переглянути файл


BIN
__pycache__/hello.cpython-38.pyc Переглянути файл


BIN
__pycache__/index.cpython-38.pyc Переглянути файл


BIN
__pycache__/madre.cpython-38.pyc Переглянути файл


+ 5
- 0
admin.py Переглянути файл

@@ -0,0 +1,5 @@
1
+def add():
2
+	return '{"titulo":"Administración","accion":"Añadir","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'
3
+
4
+def edit(id):
5
+	return '{"titulo":"Administración","accion":"Editar","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'

+ 7
- 0
connect.py Переглянути файл

@@ -0,0 +1,7 @@
1
+import sqlalchemy as db
2
+# import mysqlclient
3
+# mysql+pymysql://<username>:<password>@<host>/<dbname>[?<options>]
4
+
5
+engine = db.create_engine('mysql+pymysql://registro_escolar:mwgzHRXTPrS3JEnd@localhost/registro_escolar')
6
+connection = engine.connect()
7
+metadata = db.MetaData()

+ 5
- 0
enfermera.py Переглянути файл

@@ -0,0 +1,5 @@
1
+def add():
2
+	return '{"titulo":"Enfermera","accion":"Añadir","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'
3
+
4
+def edit(id):
5
+	return '{"titulo":"Enfermera","accion":"Editar","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'

+ 17
- 0
estudiante.py Переглянути файл

@@ -0,0 +1,17 @@
1
+from connect import connection, engine, metadata
2
+import sqlalchemy as db
3
+
4
+def add():
5
+	return '{"titulo":"Estudiante","accion":"A\u00f1adir","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Grado","type":"text","name":"grado"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Educaci\u00f3n Especial","type":"checkbox","name":"ed_especial"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'
6
+	
7
+def edit(id):
8
+	estudiantes = db.Table('estudiantes', metadata, autoload=True, autoload_with=engine)
9
+	usuarios = db.Table('usuarios', metadata, autoload=True, autoload_with=engine)
10
+	query = db.select([usuarios, estudiantes])
11
+	query = query.select_from(usuarios.join(estudiantes, usuarios.columns.id == estudiantes.columns.user_id)).where(estudiantes.columns.user_id == id)
12
+	results = connection.execute(query).fetchall()
13
+# 	print(results[0]["nombres"])
14
+# 	print(js)
15
+	return ('{"titulo":"Estudiante","accion":"Editar","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres","value":"'+results[0]["nombres"]+'"},{"label":"Apellidos","type":"text","name":"apellidos","value":"'+results[0]["apellidos"]+'"},{"label":"Email","type":"text","name":"email","value":"'+results[0]["email"]+'"},{"label":"Grado","type":"text","name":"grado","value":"'+str(results[0]["grado"])+'"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nacimiento","value":"'+str(results[0]["fecha_nacimiento"])+'"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero","value":"'+results[0]["genero"]+'"},{"label":"Educaci\u00f3n Especial","type":"checkbox","name":"educacion_especial","value":"'+results[0]["educacion_especial"]+'"}],"col2":[{"label":"Direcci\u00f3n 1","type":"text","name":"direccion1","value":"'+results[0]["direccion1"]+'"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2","value":"'+results[0]["direccion2"]+'"},{"label":"Ciudad","type":"text","name":"ciudad","value":"'+results[0]["ciudad"]+'"},{"label":"País","type":"text","name":"pais","value":"'+results[0]["pais"]+'"},{"label":"Zipcode","type":"text","name":"zipcode","value":"'+results[0]["zipcode"]+'"},{"label":"Tel\u00e9fono 1","type":"tel","name":"telefono1","value":"'+results[0]["telefono1"]+'"},{"label":"Tel\u00e9fono 2","type":"tel","name":"telefono2","value":"'+results[0]["telefono2"]+'"}]}}')
16
+	
17
+print(edit(1))

+ 5
- 0
facultad.py Переглянути файл

@@ -0,0 +1,5 @@
1
+def add():
2
+	return '{"titulo":"Facultad","accion":"Añadir","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'
3
+
4
+def edit(id):
5
+	return '{"titulo":"Facultad","accion":"Editar","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Posición","type":"text","name":"pos"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}]}}'

+ 52
- 0
index.py Переглянути файл

@@ -0,0 +1,52 @@
1
+from flask import Flask, render_template
2
+import json
3
+import estudiante, madre, admin, enfermera, facultad
4
+
5
+app = Flask(__name__)
6
+
7
+@app.route('/', methods=['GET', 'POST'])
8
+def index():
9
+#     return "Hello, World!"
10
+    return render_template('dashAdministracion.html')
11
+
12
+@app.route('/forma/<accion>/<tipo>/', methods=['GET', 'POST'])
13
+@app.route('/forma/<accion>/<tipo>/<id>', methods=['GET', 'POST'])
14
+def formas(accion,tipo,id=None):
15
+	return render_template('forma.html', tipo=tipo, accion=accion, id=id)
16
+
17
+    
18
+@app.route('/formaDatos/<accion>/<tipo>/', methods=['GET', 'POST'])
19
+@app.route('/formaDatos/<accion>/<tipo>/<id>', methods=['GET', 'POST'])
20
+def formaEst(accion, tipo, id=None):
21
+# 	data = json.loads('formaEstudiantes.json')
22
+	if(tipo=="estudiante"):
23
+		if(accion=="add"):
24
+			return estudiante.add()
25
+		if(accion=="edit"):
26
+			return estudiante.edit(id)
27
+	if(tipo=="madre"):
28
+		if(accion=="add"):
29
+			return madre.add()
30
+		if(accion=="edit"):
31
+			return madre.edit(id)
32
+	if(tipo=="admin"):
33
+		if(accion=="add"):
34
+			return admin.add()
35
+		if(accion=="edit"):
36
+			return admin.edit(id)
37
+	if(tipo=="enfermera"):
38
+		if(accion=="add"):
39
+			return enfermera.add()
40
+		if(accion=="edit"):
41
+			return enfermera.edit(id)
42
+	if(tipo=="facultad"):
43
+		if(accion=="add"):
44
+			return facultad.add()
45
+		if(accion=="edit"):
46
+			return facultad.edit(id)
47
+
48
+
49
+@app.route('/dashAdmin', methods=['GET', 'POST'])
50
+def dashAdmin():
51
+# 	data = json.loads('formaEstudiantes.json')
52
+	return '{"tasks": [    {      "titulo": "Estudiantes",      "url": "admin/estudiantes.html"    }, {      "titulo": "Facultad",      "url": "admin/facultad.html"    },     {      "titulo": "Administración",      "url": "admin/adminstracion.html"    },     {      "titulo": "Enfermeria",      "url": "admin/enfermeria.html"    },     {      "titulo": "Madres",      "url": "admin/madres.html"    },     {      "titulo": "Cursos",      "url": "admin/cursos.html"    },     {      "titulo": "Matricula",      "url": "admin/matricula.html"    },     {      "titulo": "Transcripción",      "url": "admin/transcripcion.html"    },     {      "titulo": "Oferta",      "url": "admin/oferta.html"    },     {      "titulo": "Visita Oficina",      "url": "admin/oficina.html"    },     {      "titulo": "Mensajes",      "url": "admin/mensajes.html"    }  ], "titulo": "Administración"}'

+ 5
- 0
madre.py Переглянути файл

@@ -0,0 +1,5 @@
1
+def add():
2
+	return '{"titulo":"Madre","accion":"A\u00f1adir","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"}]}}'
3
+
4
+def edit(id):
5
+	return '{"titulo":"Madre","accion":"Editar","entradas":{"col1":[{"label":"Nombres","type":"text","name":"nombres"},{"label":"Apellidos","type":"text","name":"apellidos"},{"label":"Email","type":"text","name":"email"},{"label":"Fecha de Nacimiento","type":"date","name":"fecha_nac"},{"label":"Genero","type":"select","options":["","Femenino","Masculino","Otro"],"name":"genero"},{"label":"Tel\u00e9fono 2","type":"tel","name":"tel2"}],"col2":[{"label":"Direcci\u00f3n 1","name":"direccion1"},{"label":"Direcci\u00f3n 2","type":"text","name":"direccion2"},{"label":"Ciudad","type":"text","name":"ciudad"},{"label":"Zipcode","type":"text","name":"zipcode"},{"label":"Tel\u00e9fono 1","type":"tel","name":"tel1"}]}}'

+ 20
- 0
static/dashboard.js Переглянути файл

@@ -0,0 +1,20 @@
1
+var dashboard = angular.module('dashboard', []);
2
+
3
+// Define the `PhoneListController` controller on the `phonecatApp` module
4
+dashboard.controller('AdminListController', function AdminListController($http, $scope) {
5
+    $http.get('dashAdmin').then(function(response) {
6
+      $scope.tasks = response.data.tasks;
7
+      $scope.titulo = response.data.titulo;
8
+    console.log(response.data);
9
+    });
10
+
11
+});
12
+
13
+dashboard.controller('OtroListController', function OtroListController($http, $scope) {
14
+    $http.get('otroData.php').then(function(response) {
15
+      $scope.tasks = response.data.tasks;
16
+      $scope.titulo = response.data.titulo;
17
+    console.log(response.data);
18
+    });
19
+
20
+});

+ 84
- 0
static/estilo.css Переглянути файл

@@ -0,0 +1,84 @@
1
+:root {
2
+    --colorOscuro:#37474F;
3
+    --colorVerde:#63d297;
4
+    --fontClaro:#fff;
5
+}
6
+.boton
7
+{
8
+  background-color: var(--colorVerde); 
9
+  color: var(--colorOscuro);
10
+  text-align: center;
11
+  text-decoration: none;
12
+/*   cursor: pointer; */
13
+  display: inline-block;
14
+
15
+}
16
+.logout {
17
+  padding: 0 10px 10px;
18
+  line-height: 38px;
19
+  font-size: 12px;
20
+  margin: 20px 20px 20px 0px;
21
+  border-radius: 4px;
22
+  height: 36px;
23
+}
24
+.usuario {
25
+  padding: 0 10px 10px;
26
+  line-height: 38px;
27
+  font-size: 12px;
28
+  margin: 20px 20px 20px 0px;
29
+  border-radius: 4px;
30
+  height: 36px;
31
+}
32
+.labelForma {
33
+  padding: 5px 10px 0px;
34
+  line-height: 38px;
35
+  font-size: 16px;
36
+  margin: 10px 10px 10px 10px;
37
+  border-radius: 4px;
38
+  width: 200px;
39
+  height: 48px;
40
+}
41
+.task {
42
+  border: 2px solid var(--colorOscuro);
43
+  padding: 20px;
44
+  font-size: 30px;
45
+  margin: 4px 2% 140px;
46
+  border-radius: 12px;
47
+  width: 280px;
48
+  height: 100px;
49
+}
50
+
51
+.boton:hover {
52
+  text-decoration: none;
53
+}
54
+
55
+
56
+body {
57
+/*   padding: 20px; */
58
+  background-color: #fff; 
59
+  font-family: "arial";
60
+  text-align: center;
61
+}
62
+.header{
63
+  background-color: var(--colorOscuro); 
64
+  color: var(--fontClaro);;
65
+  width: 100%;
66
+  height: 80px;
67
+  line-height: 80px;
68
+  text-align: center;
69
+/*   padding: 0px 0 10px; */
70
+/*   padding: 10px 0 10px; */
71
+  font-size: 60px;
72
+}
73
+.logo
74
+{
75
+  font-size: 10px;
76
+	width:72px;
77
+	height:90%;
78
+	margin: 4px 0px 4px 20px;
79
+}
80
+.fila
81
+{
82
+	margin: 140px 0px 140px 0;
83
+	text-align: center;
84
+}

+ 19
- 0
static/forma.js Переглянути файл

@@ -0,0 +1,19 @@
1
+var forma = angular.module('forma', []);
2
+
3
+// Define the `PhoneListController` controller on the `phonecatApp` module
4
+
5
+forma.controller('FormController', function FormController($http, $scope, accion, tipo, id) {
6
+  	console.log(accion +","+ tipo +","+ id);
7
+  	var url = '/formaDatos/'+accion+'/'+tipo+'/'
8
+  	if(id!="none")
9
+  	{
10
+  		url+= id;
11
+  	}
12
+    $http.get(url).then(function(response) {
13
+      $scope.entradas = response.data.entradas;
14
+      $scope.titulo = response.data.titulo;
15
+      $scope.accion = response.data.accion;
16
+    console.log(response.data);
17
+    });
18
+});
19
+

BIN
templates/.DS_Store Переглянути файл


+ 42
- 0
templates/dashAdministracion.html Переглянути файл

@@ -0,0 +1,42 @@
1
+<html>
2
+<head>
3
+    <meta charset="utf-8">
4
+	<link rel="stylesheet" href="{{ url_for('static', filename='estilo.css') }}" />
5
+<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
6
+<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
7
+<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
8
+<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
9
+  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
10
+	<script src="{{ url_for('static', filename='dashboard.js') }}"></script>
11
+
12
+</head>
13
+<body ng-app="dashboard" ng-controller="AdminListController">
14
+      {% raw %}
15
+<div class="container-fluid">
16
+<div class="header">
17
+  <div class="row">
18
+	    <div class="col-1">
19
+	    <div class="boton logo">
20
+		Logo
21
+	</div>
22
+	</div>
23
+    <div class="col-2">
24
+ </div>
25
+    <div class="col-6">
26
+	<p>Dashboard {{titulo}}</p>
27
+ </div>
28
+    <div class="col-2" style="visibility:visible">
29
+	<a href="" class="boton usuario">Carlos J Corrada Bravo</a>
30
+  </div>
31
+   <div class="col-1">
32
+	<a href="https://cdcc.uprrp.edu" class="boton logout">logout</a>
33
+  </div>
34
+ </div>
35
+</div>
36
+<div class="fila">
37
+<a  ng-repeat="task in tasks" href="{{task.url}}" class="boton task">{{task.titulo}}</a>
38
+</div>
39
+</div>
40
+      {% endraw %}
41
+</body>
42
+</html>

+ 87
- 0
templates/forma.html Переглянути файл

@@ -0,0 +1,87 @@
1
+<html>
2
+<head>
3
+    <meta charset="utf-8">
4
+	<link rel="stylesheet" href="{{ url_for('static', filename='estilo.css') }}" />
5
+<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
6
+<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
7
+<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
8
+<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
9
+  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
10
+	<script src="{{ url_for('static', filename='forma.js') }}"></script>
11
+    <script>
12
+       forma.value("accion", "{{accion}}").value("tipo", "{{tipo}}").value("id", "{{id}}");
13
+    </script>
14
+</head>
15
+<body ng-app="forma" ng-controller="FormController">
16
+<div class="container-fluid">
17
+<div class="header">
18
+  <div class="row">
19
+	    <div class="col-1">
20
+	    <div class="boton logo">
21
+		Logo
22
+	</div>
23
+	</div>
24
+    <div class="col-2">
25
+ </div>
26
+    <div class="col-6">
27
+      
28
+	<p>{% raw %}{{accion}} {{titulo}}  {% endraw %}
29
+</p>
30
+ </div>
31
+    <div class="col-2" style="visibility:visible">
32
+	<a href="" class="boton usuario">Carlos J Corrada Bravo</a>
33
+  </div>
34
+   <div class="col-1">
35
+	<a href="https://cdcc.uprrp.edu" class="boton logout">logout</a>
36
+  </div>
37
+ </div>
38
+</div>
39
+<div class="container" align="center">
40
+<form class="form">
41
+<span ng-repeat="entrada in entradas.col1">
42
+<div>
43
+      {% raw %}
44
+	<span class="boton labelForma">
45
+		{{entrada.label}}
46
+	</span>
47
+      {% endraw %}
48
+	<span ng-if="entrada.type=='select'">
49
+      {% raw %}
50
+		<select class="form-control-inline"  style="width: 250px;height: 48px;">
51
+			<option ng-for="let opcion of entrada.options" [value]=$index [selected]="$index==opcion.value">{{opcion}}</option>
52
+		</select>
53
+      {% endraw %}
54
+	</span>
55
+	      {% raw %}
56
+	<span ng-if="entrada.type!='select'">
57
+		<input  class="form-control-inline" type="{{entrada.type}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
58
+	</span>
59
+      {% endraw %}
60
+
61
+  <span ng-if="entradas.col2[$index].name">
62
+      {% raw %}
63
+	<span class="boton labelForma">
64
+		{{entradas.col2[$index].label}}
65
+	</span>
66
+      {% endraw %}
67
+	<span ng-if="entradas.col2[$index].type=='select'">
68
+      {% raw %}
69
+		<select class="form-control-inline"  style="width: 250px;height: 48px;">
70
+			<option ng-repeat="opcion in entradas.col2[$index].options" value="{{$index}}" [selected]="$index == entradas.col2[$index].value">{{opcion}}</option>
71
+		</select>
72
+      {% endraw %}
73
+	</span>
74
+	      {% raw %}
75
+	<span ng-if="entradas.col2[$index].type!='select'">
76
+		<input class="form-control-inline" type="{{entradas.col2[$index].type}}" name="{{entradas.col2[$index].name}}" value="{{entradas.col2[$index].value}}" style="width: 250px;height: 48px;align:left;">
77
+	</span>
78
+      {% endraw %}
79
+  </span>
80
+</div>
81
+</span>
82
+<input class="boton labelForma" type="submit">
83
+</form>
84
+</div>
85
+</div>
86
+</body>
87
+</html>

+ 86
- 0
templates/formaEstudiante.html Переглянути файл

@@ -0,0 +1,86 @@
1
+<html>
2
+<head>
3
+    <meta charset="utf-8">
4
+	<link rel="stylesheet" href="{{ url_for('static', filename='estilo.css') }}" />
5
+<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
6
+<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
7
+<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
8
+<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
9
+<!-- 	<script src="../angular-phonecat/app/lib/angular/angular.js"></script> -->
10
+  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
11
+<!-- 	<script src="forma.js"></script> -->
12
+	<script src="{{ url_for('static', filename='forma.js') }}"></script>
13
+</head>
14
+<body ng-app="forma" ng-controller="{{tipo}}FormController">
15
+<div class="container-fluid">
16
+<div class="header">
17
+  <div class="row">
18
+	    <div class="col-1">
19
+	    <div class="boton logo">
20
+		Logo
21
+	</div>
22
+	</div>
23
+    <div class="col-2">
24
+ </div>
25
+      {% raw %}
26
+    <div class="col-6">
27
+	<p>{{accion}} {{titulo}}</p>
28
+ </div>
29
+      {% endraw %}
30
+    <div class="col-2" style="visibility:visible">
31
+	<a href="" class="boton usuario">Carlos J Corrada Bravo</a>
32
+  </div>
33
+   <div class="col-1">
34
+	<a href="https://cdcc.uprrp.edu" class="boton logout">logout</a>
35
+  </div>
36
+ </div>
37
+</div>
38
+<div class="container" align="center">
39
+<form class="form">
40
+<span ng-repeat="entrada in entradas.col1">
41
+<div>
42
+      {% raw %}
43
+	<span class="boton labelForma">
44
+		{{entrada.label}}
45
+	</span>
46
+      {% endraw %}
47
+	<span ng-if="entrada.type=='select'">
48
+      {% raw %}
49
+		<select class="form-control-inline"  style="width: 250px;height: 48px;">
50
+			<option ng-repeat="opcion in entrada.options" value="{{$index}}" [selected]="forma.value == parcela.forma_parcela">{{opcion}}</option>
51
+		</select>
52
+      {% endraw %}
53
+	</span>
54
+	      {% raw %}
55
+	<span ng-if="entrada.type!='select'">
56
+		<input  class="form-control-inline" type="{{entrada.type}}" name="{{entrada.name}}" style="width: 250px;height: 48px;align:left;">
57
+	</span>
58
+      {% endraw %}
59
+
60
+  <span ng-if="entradas.col2[$index].name">
61
+      {% raw %}
62
+	<span class="boton labelForma">
63
+		{{entradas.col2[$index].label}}
64
+	</span>
65
+      {% endraw %}
66
+	<span ng-if="entradas.col2[$index].type=='select'">
67
+      {% raw %}
68
+		<select class="form-control-inline"  style="width: 250px;height: 48px;">
69
+			<option ng-repeat="opcion in entradas.col2[$index].options" value="{{$index}}" [selected]="forma.value == parcela.forma_parcela">{{opcion}}</option>
70
+		</select>
71
+      {% endraw %}
72
+	</span>
73
+	      {% raw %}
74
+	<span ng-if="entradas.col2[$index].type!='select'">
75
+		<input class="form-control-inline" type="{{entradas.col2[$index].type}}" name="{{entradas.col2[$index].name}}" style="width: 250px;height: 48px;align:left;">
76
+	</span>
77
+      {% endraw %}
78
+  </span>
79
+</div>
80
+</span>
81
+<input class="boton labelForma" type="submit">
82
+</form>
83
+</div>
84
+</div>
85
+</body>
86
+</html>