-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add siae_has_detail_cocontracting_click_date. Add tests
- Loading branch information
Showing
7 changed files
with
152 additions
and
120 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
lemarche/templates/tenders/_detail_cocontracting_click_confirm.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<div class="alert alert-success mt-3 mt-lg-0" role="alert"> | ||
<p class="mb-0 fs-sm"> | ||
Votre intérêt a bien été signalé au client. | ||
<strong>Co-traitance</strong> : votre intérêt a bien été signalé au client. | ||
</p> | ||
</div> |
32 changes: 17 additions & 15 deletions
32
lemarche/templates/tenders/_detail_cta_cocontracting.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
<div id="detail_cocontracting_container" class="mt-3"> | ||
{% if not tender.siae_detail_cocontracting_click_date_count %} | ||
<div class="card c-card rounded-lg shadow-lg"> | ||
<div class="card-body"> | ||
<h3>Répondre en co-traitance ?</h3> | ||
<p> | ||
Cette demande vous intéresse mais vous ne pouvez pas répondre seul ? Signalez au client que vous souhaiteriez répondre en co-traitance. | ||
</p> | ||
<div class="card c-card rounded-lg shadow-lg"> | ||
<div class="card-body"> | ||
<h3>Répondre en co-traitance ?</h3> | ||
<p> | ||
Cette demande vous intéresse mais vous ne pouvez pas répondre seul ? Signalez au client que vous souhaiteriez répondre en co-traitance. | ||
</p> | ||
{% if user_can_click %} | ||
{% if user.is_authenticated %} | ||
<button type="button" class="btn btn-primary btn-block" title="Répondre en co-traitance" hx-post="{% url 'tenders:detail-cocontracting-click' tender.slug %}" hx-target="#detail_cocontracting_container"> | ||
Répondre en co-traitance | ||
<button type="button" class="btn btn-primary btn-block" title="{{ tender.cta_cocontracting_card_button_text|safe }}" hx-post="{% url 'tenders:detail-cocontracting-click' tender.slug %}" hx-target="#detail_cocontracting_container"> | ||
<span>{{ tender.cta_cocontracting_card_button_text|safe }}</span> | ||
</button> | ||
{% elif siae_id %} | ||
<button type="button" class="btn btn-primary btn-block" title="Répondre en co-traitance" hx-post="{% url 'tenders:detail-cocontracting-click' tender.slug %}?siae_id={{siae_id}}" hx-target="#detail_cocontracting_container"> | ||
Répondre en co-traitance | ||
<button type="button" class="btn btn-primary btn-block" title="{{ tender.cta_cocontracting_card_button_text|safe }}" hx-post="{% url 'tenders:detail-cocontracting-click' tender.slug %}?siae_id={{siae_id}}" hx-target="#detail_cocontracting_container"> | ||
<span>{{ tender.cta_cocontracting_card_button_text|safe }}</span> | ||
</button> | ||
{% endif %} | ||
</div> | ||
{% else %} | ||
<a href="#" id="show-tender-cocontracting-modal-btn" class="btn btn-primary btn-block" data-toggle="modal" data-target="#login_or_signup_siae_tender_modal" data-next-params="{% url 'tenders:detail' tender.slug %}"> | ||
<span>{{ tender.cta_cocontracting_card_button_text|safe }}</span> | ||
</a> | ||
{% endif %} | ||
</div> | ||
{% else %} | ||
{% include "tenders/_detail_cocontracting_click_confirm.html" %} | ||
{% endif %} | ||
</div> | ||
</div> |
66 changes: 31 additions & 35 deletions
66
lemarche/templates/tenders/_detail_cta_not_interested.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
<div id="detail_not_interested_container" class="mt-3"> | ||
{% if not tender.siae_detail_not_interested_click_date_count %} | ||
<div class="card c-card rounded-lg shadow-lg"> | ||
<div class="card-body"> | ||
<h3>Pas intéressé ?</h3> | ||
<p> | ||
Cette demande ne vous intéresse pas ? Dites-le nous ! | ||
</p> | ||
{% if user_can_click %} | ||
<form method="POST" action="{% url 'tenders:detail-not-interested-click' tender.slug %}?siae_id="> | ||
{% csrf_token %} | ||
<div class="form-group"> | ||
<label for="id_detail_not_interested_feedback">Afin d'améliorer la pertinence des demandes que nous vous envoyons, expliquez-nous pourquoi celle-ci ne vous intéresse pas.</label> | ||
<textarea id="id_detail_not_interested_feedback" class="form-control" name="detail_not_interested_feedback" placeholder="Parce que..." rows="3"></textarea> | ||
</div> | ||
<div> | ||
{% if user.is_authenticated %} | ||
<button type="submit" class="btn btn-warning btn-block" title="{{ tender.cta_not_interested_card_button_text|safe }}" hx-post="{% url 'tenders:detail-not-interested-click' tender.slug %}" hx-target="#detail_not_interested_container"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</button> | ||
{% elif siae_id %} | ||
<button type="submit" class="btn btn-warning btn-block" title="{{ tender.cta_not_interested_card_button_text|safe }}" hx-post="{% url 'tenders:detail-not-interested-click' tender.slug %}?siae_id={{siae_id}}" hx-target="#detail_not_interested_container"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</button> | ||
{% endif %} | ||
</div> | ||
</form> | ||
{% else %} | ||
<a href="#" id="show-tender-not-interested-modal-btn" class="btn btn-primary btn-block" data-toggle="modal" data-target="#login_or_signup_siae_tender_modal" data-next-params="{% url 'tenders:detail' tender.slug %}"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</a> | ||
{% endif %} | ||
</div> | ||
<div class="card c-card rounded-lg shadow-lg"> | ||
<div class="card-body"> | ||
<h3>Pas intéressé ?</h3> | ||
<p> | ||
Cette demande ne vous intéresse pas ? Dites-le nous ! | ||
</p> | ||
{% if user_can_click %} | ||
<form method="POST" action="{% url 'tenders:detail-not-interested-click' tender.slug %}?siae_id="> | ||
{% csrf_token %} | ||
<div class="form-group"> | ||
<label for="id_detail_not_interested_feedback">Afin d'améliorer la pertinence des demandes que nous vous envoyons, expliquez-nous pourquoi celle-ci ne vous intéresse pas.</label> | ||
<textarea id="id_detail_not_interested_feedback" class="form-control" name="detail_not_interested_feedback" placeholder="Parce que..." rows="3"></textarea> | ||
</div> | ||
<div> | ||
{% if user.is_authenticated %} | ||
<button type="submit" class="btn btn-warning btn-block" title="{{ tender.cta_not_interested_card_button_text|safe }}" hx-post="{% url 'tenders:detail-not-interested-click' tender.slug %}" hx-target="#detail_not_interested_container"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</button> | ||
{% elif siae_id %} | ||
<button type="submit" class="btn btn-warning btn-block" title="{{ tender.cta_not_interested_card_button_text|safe }}" hx-post="{% url 'tenders:detail-not-interested-click' tender.slug %}?siae_id={{siae_id}}" hx-target="#detail_not_interested_container"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</button> | ||
{% endif %} | ||
</div> | ||
</form> | ||
{% else %} | ||
<a href="#" id="show-tender-not-interested-modal-btn" class="btn btn-primary btn-block" data-toggle="modal" data-target="#login_or_signup_siae_tender_modal" data-next-params="{% url 'tenders:detail' tender.slug %}"> | ||
<span>{{ tender.cta_not_interested_card_button_text|safe }}</span> | ||
</a> | ||
{% endif %} | ||
</div> | ||
{% else %} | ||
{% include "tenders/_detail_not_interested_click_confirm.html" %} | ||
{% endif %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.