/
formPage.jsp
49 lines (39 loc) · 1.58 KB
/
formPage.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<%@include file="../../../admin/header.jsp" %>
<c:if test="${retorno == true}">
<p>Página ${tipoSubmit} com sucesso!</p>
</c:if>
<c:if test="${retorno == false}">
<p>ERRO! Página näo foi ${tipoSubmit}.</p>
</c:if>
<div id="dialog-confirm">
<p>Você realmente deseja excluir essa página?</p>
</div>
<form action="<c:url value="/adm/page" />" method="post" id="formPage">
<c:if test="${page != null}"><input name="page.id" type="hidden" value="${page.id}" /></c:if>
<table>
<tr>
<td>Status: </td>
<td>
<label for="ativado">Ativado:</label><input type="radio" name="page.status" id="ativado" <c:if test="${page.status || page.status == null }">checked="checked"</c:if> value="1" />
<label for="desativado">Desativado:</label><input type="radio" name="page.status" id="desativado" <c:if test="${ !page.status || page.status == null }">checked="checked"</c:if> value="0" /> </td>
</tr>
<tr>
<td>Título: </td>
<td><input name="page.title" id="title" value="${page.title}" /></td>
</tr>
<tr>
<td colspan="2"><textarea name="page.content" id="content" >${page.content}</textarea></td>
</tr>
<tr>
<td>
<c:if test="${page == null}"><button name="_method" class="submit" value="post">Criar</button></c:if>
<c:if test="${page.id != null}">
<button name="_method" class="submit" value="put">Editar</button>
<input name="submitDelete" id="submitDelete" type="button" value="Deletar" />
<input name="_method" value="delete" type="hidden" />
</c:if>
</td>
</tr>
</table>
</form>
<%@include file="../../../admin/footer.jsp" %>