Skip to content

Commit

Permalink
Merge pull request #133 from izaquiel7/132
Browse files Browse the repository at this point in the history
#132 Pagina de cadastro do serviço.
  • Loading branch information
Daniel da SIlva Calado authored Jul 24, 2018
2 parents ac5683b + 180145b commit 561923c
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions src/main/webapp/Servico/cadastro.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<h:head>
<title>Petpalacy</title>
</h:head>
<h:body>
<ui:composition template="../templates/templateEmpresa.xhtml">
<ui:define name="head">
<h:outputStylesheet library="css" name="cadastrar.css" />
</ui:define>

<c:if test="#{autenticarBean.empresaLogin} == null">
<script>
location.href = "Empresa/cadastrar.xhtml?faces-redirect=true";
</script>

</c:if>

<ui:define name="conteudo">
<p:growl id="gro" life="4000" />

<p:toolbar>
<f:facet name="left"><h:outputText value="CADASTRO DE SERVIÇOS" /></f:facet>
</p:toolbar>

<p:separator />

<div class="container_formcad">
<div class="content_formcad">
<h:form id="formCad">
<h1 class="titulo_cadservi">Dados dos serviços</h1>
<p:panelGrid styleClass="panelgridcad" columns="3">
<h:outputText styleClass="output_text" value="Nome:"/>
<p:inputText id="txtNome" value="#{controllerServico.servico.nome}" required="true"
requiredMessage="Tá faltando preencher o campo nome!"/>
<p:message for="txtNome" />

<h:outputText styleClass="output_text" value="Duração:"/>
<p:inputText id="txtDuracao" value="#{controllerServico.servico.duracao}"></p:inputText>

<h:outputText styleClass="output_text" value="Valor:"/>
<p:inputText id="txtDuracao" value="#{controllerServico.servico.valor}"></p:inputText>

<h:outputText styleClass="output_text" value="Nome da Empresa:"/>
<p:inputText id="txtEmpresaNome" value="#{autenticarBean.empresaLogin.nome}"></p:inputText>

</p:panelGrid>

<br/>

<p:commandButton styleClass="button_cad" value="Cadastrar" action="#{controllerServico.servico.empresa = autenticarBean.empresaLogin; controllerServico.salvar()}"
update=":formCad :gro" >
<p:confirm header="Atenção" message="Deseja realmente salvar?" />
</p:commandButton>
</h:form>

<p:confirmDialog id="dialConfirm" global="true" widgetVar="widDialConfirma" >
<h:form>
<p:commandButton value="sim" styleClass="ui-confirmdialog-yes" type="button" icon="ui-icon-check"/>
<p:commandButton value="não" styleClass="ui-confirmdialog-no" type="button" icon="ui-icon-close"/>
</h:form>
</p:confirmDialog>
</div>
</div>
</ui:define>
</ui:composition>
</h:body>
</html>

0 comments on commit 561923c

Please sign in to comment.