Skip to content

Commit

Permalink
Merge pull request #429 from FJNR-inc/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
RignonNoel authored Mar 14, 2020
2 parents 697b5bb + 587b61e commit d0d2526
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 10 deletions.
29 changes: 28 additions & 1 deletion retirement/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ class PictureAdminInline(admin.TabularInline):
readonly_fields = ('picture_tag', )


def make_reservation_refundable(self, request, queryset):

Reservation.objects.filter(
retreat__in=queryset
).update(refundable=True)


make_reservation_refundable.\
short_description = 'Make reservation refundable'


def make_reservation_not_refundable(self, request, queryset):

Reservation.objects.filter(
retreat__in=queryset
).update(refundable=False)


make_reservation_not_refundable.\
short_description = 'Make reservation not refundable'


class RetreatAdmin(SimpleHistoryAdmin,
ExportActionModelAdmin,
SafeDeleteAdmin,
Expand Down Expand Up @@ -45,7 +67,12 @@ class RetreatAdmin(SimpleHistoryAdmin,
'id'
]

actions = ['undelete_selected', 'export_admin_action']
actions = [
'undelete_selected',
'export_admin_action',
make_reservation_not_refundable,
make_reservation_refundable
]


class PictureAdmin(SimpleHistoryAdmin, TranslationAdmin):
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/cancelation.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h1 class="email__content__title">

{% if CUSTOM_MESSAGE %}
<h2 class="email__content__subtitle">
Informations additionnels
Informations additionnelles
</h2>
<p>
{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/cancelation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Nous comprenons que la fermeture de l'espace peut affecter votre horaire et nous
{% if CUSTOM_MESSAGE %}


** INFORMATIONS ADDITIONNELS
** INFORMATIONS ADDITIONNELLES
------------------------------------------------------------

{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/exchange.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h1 class="email__content__title">

{% if CUSTOM_MESSAGE %}
<h2 class="email__content__subtitle">
Informations additionnels
Informations additionnelles
</h2>
<p>
{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/exchange.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Ceci est une confirmation d'échange. Merci d'en garder une copie.
{% if CUSTOM_MESSAGE %}


** INFORMATIONS ADDITIONNELS
** INFORMATIONS ADDITIONNELLES
------------------------------------------------------------

{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/refund.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1 class="email__content__title">

{% if CUSTOM_MESSAGE %}
<h2 class="email__content__subtitle">
Informations additionnels
Informations additionnelles
</h2>
<p>
{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion retirement/templates/refund.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ceci est un reçu pour votre remboursement. Merci d'en garder une copie.
{% if CUSTOM_MESSAGE %}


** INFORMATIONS ADDITIONNELS
** INFORMATIONS ADDITIONNELLES
------------------------------------------------------------

{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion store/templates/invoice.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ <h1 style="margin: 0 0 10px; font-size: 25px; line-height: 30px; color: #333333;
<tr>
<td valign="middle" style="text-align: center; padding: 40px 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #ffffff;">
<h2>
Informations additionnels
Informations additionnelles
</h2>
<p style="margin: 0;">
{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion store/templates/invoice.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Ceci est un reçu pour votre achat. Merci d'en garder une copie.
{% if CUSTOM_MESSAGE %}


** INFORMATIONS ADDITIONNELS
** INFORMATIONS ADDITIONNELLES
------------------------------------------------------------

{{CUSTOM_MESSAGE}}
Expand Down
2 changes: 1 addition & 1 deletion workplace/templates/cancelation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Nous comprenons que la fermeture de l'espace peut affecter votre horaire et nous
{% if CUSTOM_MESSAGE %}


** INFORMATIONS ADDITIONNELS
** INFORMATIONS ADDITIONNELLES
------------------------------------------------------------

{{CUSTOM_MESSAGE}}
Expand Down

0 comments on commit d0d2526

Please sign in to comment.