Skip to content

Commit

Permalink
has been corrected, i need to differentiate between archiver, midifie…
Browse files Browse the repository at this point in the history
…r and closer
  • Loading branch information
kiloutyg committed Mar 19, 2024
1 parent 832bde4 commit 274ae0c
Showing 1 changed file with 65 additions and 42 deletions.
107 changes: 65 additions & 42 deletions templates/services/efnc/modification/form_modification.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@
{% endif %}
{% if EFNC.archived is null and EFNC.status is null %}
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-1 textwhite">
class="d-grid gap-2 d-md-flex justify-content-md-center mt-3 textwhite">
<button
type="submit"
class="btn btn-primary mb-3 submit-EFNCform-modification">
class="btn btn-primary mb-1 submit-EFNCform-modification">
Modifier
</button>
</div>
Expand All @@ -190,53 +190,76 @@
{% endif %}
</div>
{{ form_end(form1) }}
<form
method="post"
action="{{ path('app_archive_entity', {entityType: 'efnc', id: EFNC.id}) }}">
{% if EFNC.archived is null and EFNC.status is null %}

<form
method="post"
action="{{ path('app_archive_entity', {entityType: 'efnc', id: EFNC.id}) }}">

<div
class="container mt-2 mb-2"
data-controller="archiving-commentary">
<div
class="row justify-content-md-center">
class="container mt-2 mb-2"
data-controller="archiving-commentary">
<div
class="col-md-12">
<label
for="archivingCommentary"
class="form-label text-white">
Commentaire d'archivage obligatoire
<div
data-archiving-commentary-target="archivingCommentaryMessage"
class="archivingCommentaryMessage-message d-flex justify-content-evenly"></div>
</label>
<textarea
class="form-control"
id="archivingCommentary"
name="archivingCommentary"
data-archiving-commentary-target="archivingCommentary"
data-action="keyup->archiving-commentary#archivingCommentary"></textarea>
class="row justify-content-md-center">
<div
class="col-md-12">
<label
for="archivingCommentary"
class="form-label text-white">
Commentaire d'archivage obligatoire
<div
data-archiving-commentary-target="archivingCommentaryMessage"
class="archivingCommentaryMessage-message d-flex justify-content-evenly"></div>
</label>
<textarea
class="form-control"
id="archivingCommentary"
name="archivingCommentary"
data-archiving-commentary-target="archivingCommentary"
data-action="keyup->archiving-commentary#archivingCommentary"></textarea>
</div>
</div>
</div>
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-2">
<button
type="submit"
class="btn btn-danger archive-EFNC"
data-archiving-commentary-target="archivingButton"
hidden
disabled>
Archiver
</button>
{% if is_granted('ROLE_MASTER_ADMIN') %}
<a
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-2">
<button
type="submit"
class="btn btn-danger archive-EFNC"
href="{{path('app_close_entity', {entityType: 'efnc', id: EFNC.id})}}">
Cloturer
</a>
{% endif %}
data-archiving-commentary-target="archivingButton"
hidden
disabled>
Archiver
</button>
{% if is_granted('ROLE_MASTER_ADMIN') %}
<a
class="btn btn-danger archive-EFNC"
href="{{path('app_close_entity', {entityType: 'efnc', id: EFNC.id})}}">
Cloturer
</a>
{% endif %}
</div>
</div>
</form>
{% elseif EFNC.archived is same as(true) and EFNC.status is null %}
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-2 mb-2 text-white">
Archivage effectué par

{{ EFNC.LastModifier|capitalize|split('.')|first }}
{{ EFNC.LastModifier|upper|split('.')|last }}

avec le commentaire suivant :
{{ EFNC.archivingCommentary }}
</div>
</form>
{% elseif EFNC.archived is same as(true) and EFNC.status is not null %}
<div
class="d-grid gap-2 d-md-flex justify-content-md-center mt-2 mb-2 text-white">
Cloture effectué par

{{ EFNC.LastModifier|capitalize|split('.')|first }}
{{ EFNC.LastModifier|upper|split('.')|last }}
</div>
{% endif %}

</div>
</div>
{% endblock %}

0 comments on commit 274ae0c

Please sign in to comment.