Browse Source

nos consigo el puto login

master
Cristobal Bernal Mayordomo 1 year ago
parent
commit
4df68aef79
2 changed files with 158 additions and 0 deletions
  1. +115
    -0
      src/main/java/com/cristobalbernal/foro/Entidades/Foro.java
  2. +43
    -0
      src/main/resources/templates/Registrar/Registrar.html

+ 115
- 0
src/main/java/com/cristobalbernal/foro/Entidades/Foro.java View File

@ -0,0 +1,115 @@
package com.cristobalbernal.foro.Entidades;
import jakarta.persistence.*;
import java.sql.Timestamp;
@Entity
public class Foro {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Id
@Column(name = "id", nullable = false)
private int id;
@Basic
@Column(name = "titulo", nullable = true, length = 150)
private String titulo;
@Basic
@Column(name = "descripcion", nullable = true, length = 150)
private String descripcion;
@Basic
@Column(name = "fechaYHora", nullable = true)
private Timestamp fechaYHora;
@Basic
@Column(name = "imagen", nullable = false)
private int imagen;
@Basic
@Column(name = "categoria_foro_id", nullable = false)
private int categoriaForoId;
public Foro() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitulo() {
return titulo;
}
public void setTitulo(String titulo) {
this.titulo = titulo;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public Timestamp getFechaYHora() {
return fechaYHora;
}
public void setFechaYHora(Timestamp fechaYHora) {
this.fechaYHora = fechaYHora;
}
public int getImagen() {
return imagen;
}
public void setImagen(int imagen) {
this.imagen = imagen;
}
public int getCategoriaForoId() {
return categoriaForoId;
}
public void setCategoriaForoId(int categoriaForoId) {
this.categoriaForoId = categoriaForoId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Foro foro = (Foro) o;
if (id != foro.id) return false;
if (imagen != foro.imagen) return false;
if (categoriaForoId != foro.categoriaForoId) return false;
if (titulo != null ? !titulo.equals(foro.titulo) : foro.titulo != null) return false;
if (descripcion != null ? !descripcion.equals(foro.descripcion) : foro.descripcion != null) return false;
if (fechaYHora != null ? !fechaYHora.equals(foro.fechaYHora) : foro.fechaYHora != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (titulo != null ? titulo.hashCode() : 0);
result = 31 * result + (descripcion != null ? descripcion.hashCode() : 0);
result = 31 * result + (fechaYHora != null ? fechaYHora.hashCode() : 0);
result = 31 * result + imagen;
result = 31 * result + categoriaForoId;
return result;
}
public Foro(int id, String titulo, String descripcion, int imagen, int categoriaForoId) {
this.id = id;
this.titulo = titulo;
this.descripcion = descripcion;
this.imagen = imagen;
this.categoriaForoId = categoriaForoId;
}
}

+ 43
- 0
src/main/resources/templates/Registrar/Registrar.html View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta name="title" content="Ask online Form">
<meta name="description" content="The Ask is a bootstrap design help desk, support forum website template coded and designed with bootstrap Design, Bootstrap, HTML5 and CSS. Ask ideal for wiki sites, knowledge base sites, support forum sites">
<meta name="keywords" content="HTML, CSS, JavaScript,Bootstrap,js,Forum,webstagram ,webdesign ,website ,web ,webdesigner ,webdevelopment">
<meta name="robots" content="index, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" th:href="@{/css/bootstrap.css}">
<link rel="stylesheet" th:href="@{/css/style.css}">
<link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
<link rel="stylesheet" th:href="@{/css/loginstyle.css}">
</head>
<body>
<header th:replace="menu/menu :: mimenu"></header>
<div class="modal-wrap">
<div class="modal-bodies">
<div class="modal-body modal-body-step-1 is-showing">
<div class="title">Registrar</div>
<div class="description">Sitio De Registro</div>
<form th:action="@{/process_register}" method="post" th:object="${user}">
<input type="text" name="username" placeholder="Name"/>
<input type="email" name="email" placeholder="Email"/>
<input type="password" name="password" placeholder="Password"/>
<div class="text-center">
<input class="button" type="submit" value="Registrar">
</div>
</form>
</div>
</div>
</div>
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
</body>
</html>

Loading…
Cancel
Save