Skip to content

Commit 3426483

Browse files
author
Fernando José
committed
Add menssagem com o id e nome #32
1 parent 5048800 commit 3426483

File tree

1 file changed

+4
-3
lines changed
  • src/main/resources/templates/project

1 file changed

+4
-3
lines changed

src/main/resources/templates/project/list.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ <h5 class="modal-title">Deletar Registro</h5>
8282
<a
8383
class="btn btn-sm btn-primary"
8484
th:href="@{/project/edit/{id}(id=${project.id})}">Editar</a>
85-
<a th:id="${project.id}"
85+
<a th:id="${project.id}" th:name="${project.name}"
8686
class="delete btn btn-sm btn-danger confirModal">Excluir</a>
8787
</div>
8888
</td>
@@ -116,11 +116,12 @@ <h5 class="modal-title">Deletar Registro</h5>
116116
/* Guardando o ID do registro (foi colocado como um atributo n o botão) */
117117

118118
const id = $(this).attr("id");
119+
const name = $(this).attr("name");
119120

120121
/* Adicionando o texto ao modal */
121122
$("#texto-modal").text(
122-
"Tem certeza que deseja deletar o registro #"
123-
+ id + "?");
123+
"Tem certeza que deseja excluir o projeto: "
124+
+ id + " - "+ name + " ?");
124125

125126
/* Adicionando a URL para delete */
126127
$("#link-delete")

0 commit comments

Comments
 (0)