Skip to content

Instantly share code, notes, and snippets.

@enzoftware
Created June 9, 2018 06:05
Show Gist options
  • Save enzoftware/ddbc70248dd00069d360f47434012a91 to your computer and use it in GitHub Desktop.
Save enzoftware/ddbc70248dd00069d360f47434012a91 to your computer and use it in GitHub Desktop.
libro crear
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Plantilla Admin</title>
<!-- Bootstrap core CSS -->
<link href="/css/bootstrap.min.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="/css/dashboard.css" rel="stylesheet" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div th:replace="fragments/admin/menu_superior :: menu_superior"></div>
</nav>
<div class="container-fluid">
<div class="row">
<div th:replace="fragments/admin/menu_lateral :: menu_lateral"></div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<h1 class="page-header">Nuevo libro</h1>
<form method="post" th:object="${libro}" action="/admin/libro/guardar" enctype="multipart/form-data" >
<div class="form-group">
<label for="">Editorial</label>
<select class="form-control" th:field="*{editorial}" >
<option th:each="editorial : ${editoriales}"
th:value="${editorial.id}"
th:text="${editorial.nombre}"></option>
</select>
</div>
<div class="form-group">
<label for="">Genero</label>
<select class="form-control" th:field="*{genero}">
<option th:each="genero : ${generos}"
th:value="${genero.id}"
th:text="${genero.nombre}"></option>
</select>
</div>
<div class="form-group">
<label for="campo01">Titulo</label>
<input th:field="*{titulo}" type="text" class="form-control" id="campo01" placeholder="Ingrese titulo" />
</div>
<div class="form-group">
<label for="campo02">Precio</label>
<input th:field="*{precio}" type="text" class="form-control" id="campo02" placeholder="Ingrese precio" />
</div>
<div class="form-group">
<label for="campo03">ISBN</label>
<input th:field="*{isbn}" type="text" class="form-control" id="campo03" placeholder="Ingrese ISBN" />
</div>
<div class="form-group">
<label for="">Sinopsis</label>
<textarea th:field="*{sinopsis}" class="form-control" rows="3"></textarea>
</div>
<div class="form-group">
<label for="campo09">Autores</label>
<div class="checkbox">
<div th:each="autor : ${autores}">
<label>
<input th:field="*{autores}"
th:value="${autor.id}" th:text="${autor.nombres}"
type="checkbox" id="campo09" />
</label>
</div>
</div>
</div>
<div class="form-group">
<label for="campo10">Imagen</label>
<input type="file" name="imagen" class="form-control" id="campo10" accept="image/*" >
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src=js/jquery-3.2.1.min.js"><\/script>')</script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment