confirm delete

This commit is contained in:
Anton Romanov 2020-02-17 13:07:39 +04:00
parent 440def2b71
commit 1d0c90d932

View File

@ -16,8 +16,15 @@
<p:commandButton value="Удалить выделенные" id="papersRemoveButton" <p:commandButton value="Удалить выделенные" id="papersRemoveButton"
disabled="#{papersView.selectedPapers.isEmpty()}" disabled="#{papersView.selectedPapers.isEmpty()}"
action="#{papersView.deleteSelected}" ajax="true" process="@form" action="#{papersView.deleteSelected}" ajax="true" process="@form"
update="messages @form"/> update="messages @form">
<p:confirm header="Подтверждение" message="Удалить выделенные статьи?"
icon="pi pi-exclamation-triangle"/>
</p:commandButton>
</div> </div>
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
<p:commandButton value="Да" type="button" styleClass="ui-confirmdialog-yes" icon="pi pi-check"/>
<p:commandButton value="Нет" type="button" styleClass="ui-confirmdialog-no" icon="pi pi-times"/>
</p:confirmDialog>
<div class="ui-md-5 ui-g-12"> <div class="ui-md-5 ui-g-12">
<p:inputText placeholder="Создать новую статью" value="#{papersView.newPaperTitle}"/> <p:inputText placeholder="Создать новую статью" value="#{papersView.newPaperTitle}"/>