Skip to content

Commit

Permalink
rename delete to hide
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Mar 11, 2024
1 parent 4153584 commit 453af75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lemarche/templates/tenders/_list_item_siae.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
{% if tender.is_new_for_siaes %}
<span class="float-right badge badge-sm badge-pill badge-new">Nouveau</span>
{% elif tender.deadline_date_is_outdated_annotated %}
<form action="{% url 'tenders:delete-tender-siae' tender.slug %}"
method="post" hx-post="{% url 'tenders:delete-tender-siae' tender.slug %}"
<form action="{% url 'tenders:hide-tender-siae' tender.slug %}"
method="post" hx-post="{% url 'tenders:hide-tender-siae' tender.slug %}"
hx-target="#card-{{tender.slug}}" hx-swap="outerHTML"
>
{% csrf_token %}
Expand Down
8 changes: 4 additions & 4 deletions lemarche/www/tenders/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TenderDetailSurveyTransactionedView,
TenderDetailView,
TenderListView,
TenderSiaeDeleteView,
TenderSiaeHideView,
TenderSiaeListView,
)

Expand Down Expand Up @@ -47,9 +47,9 @@
name="detail-not-interested-click",
),
path(
"<str:slug>/supprimer-depot-de-besoin",
TenderSiaeDeleteView.as_view(),
name="delete-tender-siae",
"<str:slug>/cacher-depot-de-besoin",
TenderSiaeHideView.as_view(),
name="hide-tender-siae",
),
path(
"<str:slug>/sondage-transaction",
Expand Down
2 changes: 1 addition & 1 deletion lemarche/www/tenders/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def get_success_message(self, already_answered=False):
return "Merci pour votre réponse !"


class TenderSiaeDeleteView(LoginRequiredMixin, View):
class TenderSiaeHideView(LoginRequiredMixin, View):
def post(self, request, *args, **kwargs):
tender = get_object_or_404(Tender, slug=kwargs["slug"])
user = self.request.user
Expand Down

0 comments on commit 453af75

Please sign in to comment.