Skip to content

Commit

Permalink
Do not display confirmation window combo box option if confirmation s…
Browse files Browse the repository at this point in the history
…ystem disabled
  • Loading branch information
krzywon committed Jun 3, 2021
1 parent 39dbc55 commit be1584a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NEMO/templates/calendar/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{% if user.is_staff %}
<li data-toggle="tooltip" data-placement="right" title="Displays {{ facility_name }} reservations and usage for a specific user. This includes reservations, area access, tool usage, and missed reservations."><a href="javascript:void(0)" onclick="change_calendar_event_type(this)">Specific user</a></li>
{% endif %}
{% if user.is_superuser %}
{% if user.is_superuser and use_confirmation_system %}
<li data-toggle="tooltip" data-placement="right" title="Displays {{ facility_name }} unconfirmed reservations and usage for all areas and tools."><a href="javascript:void(0)" onclick="change_calendar_event_type(this)">Confirmation window</a></li>
{% endif %}
</ul>
Expand Down
2 changes: 2 additions & 0 deletions NEMO/views/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def calendar(request, item_type=None, item_id=None):
calendar_week_column_format = get_customization('calendar_week_column_format')
calendar_month_column_format = get_customization('calendar_month_column_format')
calendar_start_of_the_day = get_customization('calendar_start_of_the_day')
use_confirmation_system = get_customization('reservations_require_confirmation') == 'enabled'

dictionary = {
'rendered_item_tree_html': rendered_item_tree_html,
Expand All @@ -85,6 +86,7 @@ def calendar(request, item_type=None, item_id=None):
'calendar_week_column_format' : calendar_week_column_format,
'calendar_month_column_format' : calendar_month_column_format,
'calendar_start_of_the_day' : calendar_start_of_the_day,
'use_confirmation_system': use_confirmation_system,
'self_login': False,
'self_logout': False,
}
Expand Down

0 comments on commit be1584a

Please # to comment.