Compare commits

..

19 Commits
d10-dev ... d9

Author SHA1 Message Date
ppound c0391680c4 fixed bug when deleting an entity that has associated reservations 3 years ago
ppound d6aeea71ae better way of getting bundle label 3 years ago
ppound 96baeaab63 changes requested by liquidcms 3 years ago
ppound 4072a85c6c fixed case where modifying a series of reservations 3 years ago
ppound f565f67189 fix repeated reservation bookings 3 years ago
ppound fad009aeff Use content types label not machine name for calendar title 3 years ago
ppound 11ce218d09 fixed issue where users were redirected to non existence page after deleting a reservation users now get sent back to front 3 years ago
ppound 49b4387626 added case for user to only delete their own reservations 3 years ago
ppound 7270b635e8 users with the Create new Reservations extended perm can now book unlimited number of reservations 3 years ago
ppound 369917ce79 made logic for the date to far in the future message more foolproof 3 years ago
ppound 9fbeb49afd limit repeating bookings to administrators only 3 years ago
ppound 864c8b9d62 added a message when a user clicks to far into the future and made some string translatable 3 years ago
ppound a9cd045626 Only check the number of reservations allowed for new reserations 3 years ago
ppound a8d6753add updated so daily and open limits work 3 years ago
ppound fb3147d8bf added the length dropdown back to the form so mobile users can select different lengths 3 years ago
ppound 79e1111561 code formatting and eliminate a log notice 3 years ago
ppound e78dd2993f removed commented out code 3 years ago
ppound 279d63fe4a more updates for drupal 9 3 years ago
ppound 51e96315c9 initial work on d9 port 3 years ago
  1. 10
      config/install/field.storage.reserve_category.reserve_maxadv_ext.yml
  2. 10
      config/install/field.storage.reserve_category.reserve_maxadv_std.yml
  3. 10
      config/install/field.storage.reserve_category.reserve_minadv_ext.yml
  4. 10
      config/install/field.storage.reserve_category.reserve_minadv_std.yml
  5. 470
      config/install/views.view.reservations.yml
  6. 47
      reservation.inc
  7. 18
      reserve.inc
  8. 2
      reserve.info.yml
  9. 6
      reserve.module
  10. 2
      reserve.series.inc
  11. 7
      src/Controller/CalendarController.php
  12. 1
      src/Form/ReserveDailyHoursForm.php
  13. 5
      src/Form/ReserveDefaultHoursForm.php
  14. 2
      src/Form/ReserveSettingsForm.php
  15. 3
      src/Plugin/Field/FieldFormatter/ReserveCategoryFormatter.php
  16. 3
      src/Plugin/Field/FieldType/ReserveCategory.php
  17. 6
      src/Plugin/Field/FieldWidget/ReserveCategorySelect.php
  18. 46
      src/Tests/LoadTest.php

10
config/install/field.storage.reserve_category.reserve_maxadv_ext.yml

@ -12,19 +12,19 @@ settings:
allowed_values: allowed_values:
- -
value: 30 value: 30
label: '30' label: 30
- -
value: 60 value: 60
label: '60' label: 60
- -
value: 90 value: 90
label: '90' label: 90
- -
value: 180 value: 180
label: '180' label: 180
- -
value: 360 value: 360
label: '360' label: 360
module: options module: options
locked: true locked: true
cardinality: 1 cardinality: 1

10
config/install/field.storage.reserve_category.reserve_maxadv_std.yml

@ -12,19 +12,19 @@ settings:
allowed_values: allowed_values:
- -
value: 7 value: 7
label: '7' label: 7
- -
value: 14 value: 14
label: '14' label: 14
- -
value: 30 value: 30
label: '30' label: 30
- -
value: 60 value: 60
label: '60' label: 60
- -
value: 90 value: 90
label: '90' label: 90
module: options module: options
locked: true locked: true
cardinality: 1 cardinality: 1

10
config/install/field.storage.reserve_category.reserve_minadv_ext.yml

@ -12,19 +12,19 @@ settings:
allowed_values: allowed_values:
- -
value: 0 value: 0
label: '0' label: 0
- -
value: 1 value: 1
label: '1' label: 1
- -
value: 7 value: 7
label: '7' label: 7
- -
value: 14 value: 14
label: '14' label: 14
- -
value: 30 value: 30
label: '30' label: 30
module: options module: options
locked: true locked: true
cardinality: 1 cardinality: 1

10
config/install/field.storage.reserve_category.reserve_minadv_std.yml

@ -12,19 +12,19 @@ settings:
allowed_values: allowed_values:
- -
value: 0 value: 0
label: '0' label: 0
- -
value: 1 value: 1
label: '1' label: 1
- -
value: 7 value: 7
label: '7' label: 7
- -
value: 14 value: 14
label: '14' label: 14
- -
value: 30 value: 30
label: '30' label: 30
module: options module: options
locked: true locked: true
cardinality: 1 cardinality: 1

470
config/install/views.view.reservations.yml

@ -17,7 +17,7 @@ dependencies:
- reserve - reserve
- views_bulk_operations - views_bulk_operations
_core: _core:
default_config_hash: Fpw3XOpA8QhT5E7YrASas4PrG75lo7-SVSpwa9dvMYA default_config_hash: qtxsAzivRyJgkwE59iiTdA2ucLdj2OtA9MwdI-OUYzI
id: reservations id: reservations
label: Reservations label: Reservations
module: views module: views
@ -25,14 +25,165 @@ description: ''
tag: '' tag: ''
base_table: reserve_reservation_field_data base_table: reserve_reservation_field_data
base_field: id base_field: id
core: 8.x
display: display:
default: default:
display_plugin: default
id: default id: default
display_title: Master display_title: Master
display_plugin: default
position: 0 position: 0
display_options: display_options:
title: 'My Rese' access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: 40
offset: 0
id: 0
total_pages: null
tags:
previous: ‹‹
next: ››
first: '« First'
last: 'Last »'
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
style:
type: table
options:
grouping: { }
row_class: ''
default_row_class: true
override: true
sticky: false
caption: ''
summary: ''
description: ''
columns:
views_bulk_operations_bulk_form: views_bulk_operations_bulk_form
name: name
reservation_date: reservation_date
reservation_time: reservation_date
reservation_length: reservation_date
reservation_private: reservation_private
reservation_repeat_type: reservation_repeat_type
reservation_repeat_until: reservation_repeat_type
reservable_content_type: reservable_content_type
reservation_ebundle: reservable_content_type
operations: operations
info:
views_bulk_operations_bulk_form:
align: ''
separator: ''
empty_column: false
responsive: ''
name:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_date:
sortable: true
default_sort_order: asc
align: ''
separator: ' '
empty_column: false
responsive: ''
reservation_time:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_length:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_private:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_repeat_type:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_repeat_until:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservable_content_type:
sortable: true
default_sort_order: asc
align: ''
separator: '<br>'
empty_column: false
responsive: ''
reservation_ebundle:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
operations:
align: ''
separator: ''
empty_column: false
responsive: ''
default: '-1'
empty_table: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields: fields:
views_bulk_operations_bulk_form: views_bulk_operations_bulk_form:
id: views_bulk_operations_bulk_form id: views_bulk_operations_bulk_form
@ -41,8 +192,7 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: views_bulk_operations_bulk_form label: ''
label: 'Views bulk operations'
exclude: false exclude: false
alter: alter:
alter_text: false alter_text: false
@ -75,7 +225,7 @@ display:
element_class: '' element_class: ''
element_label_type: '' element_label_type: ''
element_label_class: '' element_label_class: ''
element_label_colon: true element_label_colon: false
element_wrapper_type: '' element_wrapper_type: ''
element_wrapper_class: '' element_wrapper_class: ''
element_default_classes: true element_default_classes: true
@ -88,11 +238,16 @@ display:
form_step: true form_step: true
buttons: false buttons: false
action_title: Action action_title: Action
clear_on_exposed: true
force_selection_info: false
selected_actions: selected_actions:
- views_bulk_edit: views_bulk_edit
action_id: views_bulk_operations_delete_entity views_bulk_operations_delete_entity: views_bulk_operations_delete_entity
preconfiguration:
views_bulk_edit:
label_override: ''
get_bundles_from_results: 1
views_bulk_operations_delete_entity:
label_override: ''
plugin_id: views_bulk_operations_bulk_form
name: name:
id: name id: name
table: reserve_reservation_field_data table: reserve_reservation_field_data
@ -100,9 +255,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
entity_type: null
entity_field: name
plugin_id: field
label: Group label: Group
exclude: false exclude: false
alter: alter:
@ -158,6 +310,9 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
entity_type: null
entity_field: name
plugin_id: field
reservation_date: reservation_date:
id: reservation_date id: reservation_date
table: reserve_reservation__reservation_date table: reserve_reservation__reservation_date
@ -165,7 +320,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: When label: When
exclude: false exclude: false
alter: alter:
@ -222,6 +376,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_time: reservation_time:
id: reservation_time id: reservation_time
table: reserve_reservation__reservation_time table: reserve_reservation__reservation_time
@ -229,7 +384,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: '' label: ''
exclude: false exclude: false
alter: alter:
@ -285,6 +439,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_length: reservation_length:
id: reservation_length id: reservation_length
table: reserve_reservation__reservation_length table: reserve_reservation__reservation_length
@ -292,7 +447,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: '' label: ''
exclude: false exclude: false
alter: alter:
@ -347,6 +501,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_private: reservation_private:
id: reservation_private id: reservation_private
table: reserve_reservation__reservation_private table: reserve_reservation__reservation_private
@ -354,7 +509,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: Private label: Private
exclude: false exclude: false
alter: alter:
@ -400,8 +554,8 @@ display:
type: boolean type: boolean
settings: settings:
format: default format: default
format_custom_false: ''
format_custom_true: '' format_custom_true: ''
format_custom_false: ''
group_column: value group_column: value
group_columns: { } group_columns: { }
group_rows: true group_rows: true
@ -412,6 +566,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_repeat_type: reservation_repeat_type:
id: reservation_repeat_type id: reservation_repeat_type
table: reserve_reservation__reservation_repeat_type table: reserve_reservation__reservation_repeat_type
@ -419,7 +574,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: Repeating label: Repeating
exclude: false exclude: false
alter: alter:
@ -474,6 +628,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_repeat_until: reservation_repeat_until:
id: reservation_repeat_until id: reservation_repeat_until
table: reserve_reservation__reservation_repeat_until table: reserve_reservation__reservation_repeat_until
@ -481,7 +636,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: '' label: ''
exclude: false exclude: false
alter: alter:
@ -538,6 +692,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservable_content_type: reservable_content_type:
id: reservable_content_type id: reservable_content_type
table: reserve_reservation__reservable_content_type table: reserve_reservation__reservable_content_type
@ -545,7 +700,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: 'Reservation Type' label: 'Reservation Type'
exclude: false exclude: false
alter: alter:
@ -600,6 +754,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
reservation_ebundle: reservation_ebundle:
id: reservation_ebundle id: reservation_ebundle
table: reserve_reservation__reservation_ebundle table: reserve_reservation__reservation_ebundle
@ -607,7 +762,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: field
label: Ebundle label: Ebundle
exclude: false exclude: false
alter: alter:
@ -663,6 +817,7 @@ display:
multi_type: separator multi_type: separator
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field
operations: operations:
id: operations id: operations
table: reserve_reservation table: reserve_reservation
@ -670,8 +825,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
entity_type: reserve_reservation
plugin_id: entity_operations
label: Operations label: Operations
exclude: false exclude: false
alter: alter:
@ -714,73 +867,8 @@ display:
empty_zero: false empty_zero: false
hide_alter_empty: true hide_alter_empty: true
destination: true destination: true
pager: entity_type: reserve_reservation
type: full plugin_id: entity_operations
options:
offset: 0
items_per_page: 40
total_pages: null
id: 0
tags:
next: ››
previous: ‹‹
first: '« First'
last: 'Last »'
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
access:
type: none
options: { }
cache:
type: tag
options: { }
empty:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
plugin_id: text
empty: true
content:
value: 'The are no reservations.'
format: basic_html
tokenize: false
sorts:
reservation_date_value:
id: reservation_date_value
table: reserve_reservation__reservation_date
field: reservation_date_value
relationship: none
group_type: group
admin_label: ''
plugin_id: datetime
order: ASC
expose:
label: ''
field_identifier: reservation_date_value
exposed: false
granularity: second
arguments: { }
filters: filters:
name: name:
id: name id: name
@ -789,9 +877,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
entity_type: reserve_reservation
entity_field: name
plugin_id: string
operator: contains operator: contains
value: '' value: ''
group: 1 group: 1
@ -802,8 +887,6 @@ display:
description: '' description: ''
use_operator: false use_operator: false
operator: name_op operator: name_op
operator_limit_selection: false
operator_list: { }
identifier: name identifier: name
required: false required: false
remember: false remember: false
@ -824,6 +907,9 @@ display:
default_group: All default_group: All
default_group_multiple: { } default_group_multiple: { }
group_items: { } group_items: { }
entity_type: reserve_reservation
entity_field: name
plugin_id: string
reservation_date_value: reservation_date_value:
id: reservation_date_value id: reservation_date_value
table: reserve_reservation__reservation_date table: reserve_reservation__reservation_date
@ -831,7 +917,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: datetime
operator: '=' operator: '='
value: value:
min: '' min: ''
@ -846,8 +931,6 @@ display:
description: '' description: ''
use_operator: false use_operator: false
operator: reservation_date_value_op operator: reservation_date_value_op
operator_limit_selection: false
operator_list: { }
identifier: reservation_date_value identifier: reservation_date_value
required: false required: false
remember: false remember: false
@ -868,122 +951,45 @@ display:
default_group: All default_group: All
default_group_multiple: { } default_group_multiple: { }
group_items: { } group_items: { }
plugin_id: datetime
sorts:
reservation_date_value:
id: reservation_date_value
table: reserve_reservation__reservation_date
field: reservation_date_value
relationship: none
group_type: group
admin_label: ''
order: ASC
exposed: false
expose:
label: ''
granularity: second
plugin_id: datetime
header: { }
footer: { }
empty:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: false
content:
value: 'The are no reservations.'
format: basic_html
plugin_id: text
relationships: { }
arguments: { }
display_extenders: { }
filter_groups: filter_groups:
operator: OR operator: OR
groups: groups:
1: AND 1: AND
style: title: 'My Rese'
type: table
options:
grouping: { }
row_class: ''
default_row_class: true
columns:
name: name
reservation_date: reservation_date
reservation_time: reservation_date
reservation_length: reservation_date
reservation_private: reservation_private
reservation_repeat_type: reservation_repeat_type
reservation_repeat_until: reservation_repeat_type
reservable_content_type: reservable_content_type
reservation_ebundle: reservable_content_type
operations: operations
default: '-1'
info:
name:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_date:
sortable: true
default_sort_order: asc
align: ''
separator: ' '
empty_column: false
responsive: ''
reservation_time:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_length:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_private:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_repeat_type:
sortable: true
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservation_repeat_until:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
reservable_content_type:
sortable: true
default_sort_order: asc
align: ''
separator: '<br>'
empty_column: false
responsive: ''
reservation_ebundle:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
operations:
align: ''
separator: ''
empty_column: false
responsive: ''
override: true
sticky: false
summary: ''
empty_table: false
caption: ''
description: ''
row:
type: fields
options:
default_field_elements: true
inline: { }
separator: ''
hide_empty: false
query:
type: views_query
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
replica: false
query_tags: { }
relationships: { }
header: { }
footer: { }
display_extenders: { }
cache_metadata: cache_metadata:
max-age: 0 max-age: 0
contexts: contexts:
@ -1001,26 +1007,26 @@ display:
- 'config:field.storage.reserve_reservation.reservation_repeat_until' - 'config:field.storage.reserve_reservation.reservation_repeat_until'
- 'config:field.storage.reserve_reservation.reservation_time' - 'config:field.storage.reserve_reservation.reservation_time'
page_1: page_1:
display_plugin: page
id: page_1 id: page_1
display_title: 'Manage (admin)' display_title: 'Manage (admin)'
display_plugin: page
position: 1 position: 1
display_options: display_options:
title: 'Manage Reservations'
defaults:
title: false
display_description: ''
display_extenders: { } display_extenders: { }
path: admin/structure/reservations/reserve_reservations/manage-reservations path: admin/structure/reservations/reserve_reservations/manage-reservations
menu: menu:
type: normal type: normal
title: 'Manage Reservations' title: 'Manage Reservations'
description: '' description: ''
weight: 0
expanded: false expanded: false
menu_name: admin
parent: entity.reserve_reservation.collection parent: entity.reserve_reservation.collection
weight: 0
context: '0' context: '0'
menu_name: admin
display_description: ''
title: 'Manage Reservations'
defaults:
title: false
cache_metadata: cache_metadata:
max-age: 0 max-age: 0
contexts: contexts:
@ -1038,12 +1044,14 @@ display:
- 'config:field.storage.reserve_reservation.reservation_repeat_until' - 'config:field.storage.reserve_reservation.reservation_repeat_until'
- 'config:field.storage.reserve_reservation.reservation_time' - 'config:field.storage.reserve_reservation.reservation_time'
page_2: page_2:
display_plugin: page
id: page_2 id: page_2
display_title: 'My Reservations' display_title: 'My Reservations'
display_plugin: page
position: 2 position: 2
display_options: display_options:
title: 'My Reservations' display_extenders: { }
display_description: ''
path: reserve/%ebundle/my-reservations
arguments: arguments:
reservation_ebundle_value: reservation_ebundle_value:
id: reservation_ebundle_value id: reservation_ebundle_value
@ -1052,7 +1060,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
plugin_id: string
default_action: default default_action: default
exception: exception:
value: all value: all
@ -1068,8 +1075,8 @@ display:
summary_options: summary_options:
base_path: '' base_path: ''
count: true count: true
override: false
items_per_page: 25 items_per_page: 25
override: false
summary: summary:
sort_order: asc sort_order: asc
number_of_records: 0 number_of_records: 0
@ -1085,6 +1092,7 @@ display:
path_case: none path_case: none
transform_dash: false transform_dash: false
break_phrase: false break_phrase: false
plugin_id: string
user_id: user_id:
id: user_id id: user_id
table: reserve_reservation_field_data table: reserve_reservation_field_data
@ -1092,9 +1100,6 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
entity_type: reserve_reservation
entity_field: user_id
plugin_id: numeric
default_action: default default_action: default
exception: exception:
value: all value: all
@ -1108,8 +1113,8 @@ display:
summary_options: summary_options:
base_path: '' base_path: ''
count: true count: true
override: false
items_per_page: 25 items_per_page: 25
override: false
summary: summary:
sort_order: asc sort_order: asc
number_of_records: 0 number_of_records: 0
@ -1121,21 +1126,22 @@ display:
validate_options: { } validate_options: { }
break_phrase: false break_phrase: false
not: false not: false
entity_type: reserve_reservation
entity_field: user_id
plugin_id: numeric
defaults: defaults:
title: false
arguments: false arguments: false
display_description: '' title: false
display_extenders: { }
path: reserve/%ebundle/my-reservations
menu: menu:
type: tab type: tab
title: 'My Reservations' title: 'My Reservations'
description: '' description: ''
weight: 0
expanded: false expanded: false
menu_name: main
parent: '' parent: ''
weight: 0
context: '0' context: '0'
menu_name: main
title: 'My Reservations'
cache_metadata: cache_metadata:
max-age: 0 max-age: 0
contexts: contexts:

47
reservation.inc

@ -8,7 +8,6 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Link; use Drupal\Core\Link;
use Drupal\Core\Url; use Drupal\Core\Url;
use Drupal\Core\StringTranslation\TranslatableMarkup;
function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInterface $form_state) { function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInterface $form_state) {
// params either passed in on url - CREATE // params either passed in on url - CREATE
@ -80,15 +79,33 @@ function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInte
$d = $yyyymmdd . ' 00:00:00'; $d = $yyyymmdd . ' 00:00:00';
if (reserve_daily_max_exceeded($yyyymmdd) && !$book_extended) { if (reserve_daily_max_exceeded($yyyymmdd) && !$book_extended) {
$daily_exceeded_message = t('You have exceeded the max number of daily bookings. Unable to add reservation.'); $form = array();
reserve_set_modal_message($form, $daily_exceeded_message); $form['message'] = [
'#type' => 'markup',
'#weight' => -25,
'#markup' => '
<div class="messages__wrapper layout-container">
<div role="contentinfo" aria-label="Warning message" class="messages messages--warning">' .
t('You have exceeded the max number of daily bookings. Unable to add reservation.') .
'</div></div>',
];
return;
} }
$config = \Drupal::config('reserve.settings'); $config = \Drupal::config('reserve.settings');
$max_per_user = $config->get('reservations_per_user'); $max_per_user = $config->get('reservations_per_user');
if (count(reserve_user_reservations()) > $max_per_user if (count(reserve_user_reservations()) > $max_per_user
&& !$book_extended) { && !$book_extended) {
$max_reservations_exceeded_message = t('You have exceeded your max number of open bookings. Unable to add reservation.'); $form = array();
reserve_set_modal_message($form, $max_reservations_exceeded_message); $form['message'] = [
'#type' => 'markup',
'#weight' => -25,
'#markup' => '
<div class="messages__wrapper layout-container">
<div role="contentinfo" aria-label="Warning message" class="messages messages--warning">' .
t('You have exceeded your max number of open bookings. Unable to add reservation.') .
'</div></div>',
];
return;
} }
} }
$entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($eid); $entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($eid);
@ -99,10 +116,9 @@ function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInte
$bundleName = $bundle_info[$entity->getEntityTypeId()][$entity->bundle()]['label']; $bundleName = $bundle_info[$entity->getEntityTypeId()][$entity->bundle()]['label'];
// set default Group Name as name of current user // set default Group Name as name of current user
$form['name']['widget'][0]['value']['#required'] = TRUE; $form['name']['widget'][0]['value']['#default_value'] = $form['name']['widget'][0]['value']['#default_value'] ?
/*$form['name']['widget'][0]['value']['#default_value'] = $form['name']['widget'][0]['value']['#default_value'] ?
$form['name']['widget'][0]['value']['#default_value'] : $form['name']['widget'][0]['value']['#default_value'] :
\Drupal::currentUser()->getDisplayName();*/ \Drupal::currentUser()->getDisplayName();
// set values taken from URL // set values taken from URL
$form['reservation_date']['widget'][0]['value']['#default_value'] = DrupalDateTime::createFromTimestamp(strtotime($yyyymmdd)); $form['reservation_date']['widget'][0]['value']['#default_value'] = DrupalDateTime::createFromTimestamp(strtotime($yyyymmdd));
@ -279,21 +295,6 @@ function reserve_return_to_home_page($form, FormStateInterface $form_state) {
$form_state->setRedirectUrl($url); $form_state->setRedirectUrl($url);
} }
function reserve_set_modal_message(&$form, $message) {
$form['message'] = [
'#type' => 'markup',
'#weight' => -25,
'#markup' => '
<div class="messages__wrapper layout-container">
<div role="contentinfo" aria-label="Warning message" class="messages messages--warning">' .
$message .
'</div></div>',
];
$form['message']['#errors'] = TRUE;
$form['actions']['submit']['#attributes']['disabled'] = 'disabled';
$form['actions']['submit']['#access'] = FALSE;
}
/** /**
* Custom submit handler for login form. * Custom submit handler for login form.
*/ */

18
reserve.inc

@ -1,5 +1,4 @@
<?php <?php
use Drupal\field\Entity\FieldConfig;
/** /**
* @file * @file
* Classes and general Room Reservations helper functions. * Classes and general Room Reservations helper functions.
@ -22,13 +21,13 @@ function reserve_categories($ebundle = null) {
$entity_type = ebundle_split($ebundle, 'type'); $entity_type = ebundle_split($ebundle, 'type');
$bundle = ebundle_split($ebundle, 'bundle'); $bundle = ebundle_split($ebundle, 'bundle');
$field = reserve_category_fields($ebundle); $field = reserve_category_fields($ebundle);
$fconfig = FieldConfig::loadByName($entity_type, $bundle, $field)->getSettings(); $fconfig = \Drupal\field\Entity\FieldConfig::loadByName($entity_type, $bundle, $field)->getSettings();
$ids = array_filter($fconfig['categories']); $ids = array_filter($fconfig['categories']);
} }
else { else {
$query = \Drupal::service('entity_type.manager') $query = \Drupal::service('entity_type.manager')
->getStorage('reserve_category')->getQuery(); ->getStorage('reserve_category')->getQuery();
$ids = $query->condition('status', TRUE)->accessCheck(FALSE)->execute(); $ids = $query->condition('status', TRUE)->execute();
} }
$cats = \Drupal::entityTypeManager()->getStorage('reserve_category')->loadMultiple($ids); $cats = \Drupal::entityTypeManager()->getStorage('reserve_category')->loadMultiple($ids);
@ -67,7 +66,7 @@ function reserve_entities($ebundle) {
} }
//->sort('reservations_display_order', 'ASC') //->sort('reservations_display_order', 'ASC')
$ids = $query->accessCheck(FALSE)->execute(); $ids = $query->execute();
$entities = \Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple($ids); $entities = \Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple($ids);
@ -278,7 +277,7 @@ function reserve_hours($option = NULL) {
} }
// convert display to 24:00 format if required // convert display to 24:00 format if required
if ($config->get('hour_format') == 1) { if ($config->get('reserve_hour_format')) {
$display = date('H:i', strtotime($display)); $display = date('H:i', strtotime($display));
} }
@ -697,7 +696,7 @@ function reserve_start_conflicts($room, $yyyy_mmdd, $time) {
) )
"; ";
$conflicts_found = FALSE; $conflicts_found = FALSE;
$conflicts_found = \Drupal::database()->query($sql, array( $conflicts_found = db_query($sql, array(
':room' => $room, ':room' => $room,
':date0' => $search_items[0]['date'], ':time0' => $search_items[0]['start_time'], ':length0' => $search_items[0]['length'], ':date0' => $search_items[0]['date'], ':time0' => $search_items[0]['start_time'], ':length0' => $search_items[0]['length'],
':date1' => $search_items[1]['date'], ':time1' => $search_items[1]['start_time'], ':length1' => $search_items[1]['length'], ':date1' => $search_items[1]['date'], ':time1' => $search_items[1]['start_time'], ':length1' => $search_items[1]['length'],
@ -706,7 +705,8 @@ function reserve_start_conflicts($room, $yyyy_mmdd, $time) {
':date4' => $search_items[4]['date'], ':time4' => $search_items[4]['start_time'], ':length4' => $search_items[4]['length'], ':date4' => $search_items[4]['date'], ':time4' => $search_items[4]['start_time'], ':length4' => $search_items[4]['length'],
':date5' => $search_items[5]['date'], ':time5' => $search_items[5]['start_time'], ':length5' => $search_items[5]['length'], ':date5' => $search_items[5]['date'], ':time5' => $search_items[5]['start_time'], ':length5' => $search_items[5]['length'],
':date6' => $search_items[6]['date'], ':time6' => $search_items[6]['start_time'], ':length6' => $search_items[6]['length'], ':date6' => $search_items[6]['date'], ':time6' => $search_items[6]['start_time'], ':length6' => $search_items[6]['length'],
':date7' => $search_items[7]['date'], ':time7' => $search_items[7]['start_time'], ':length7' => $search_items[7]['length']))->rowCount(); ':date7' => $search_items[7]['date'], ':time7' => $search_items[7]['start_time'], ':length7' => $search_items[7]['length'])
)->rowCount();
return $conflicts_found; return $conflicts_found;
} }
@ -933,7 +933,6 @@ function reserve_daily_max_exceeded($yyyy_mmdd) {
if ($user->id()) { if ($user->id()) {
$ids = \Drupal::service('entity_type.manager') $ids = \Drupal::service('entity_type.manager')
->getStorage('reserve_reservation')->getQuery() ->getStorage('reserve_reservation')->getQuery()
->accessCheck(FALSE)
->condition('user_id', $user->id()) ->condition('user_id', $user->id())
->condition('reservation_date', $yyyy_mmdd . '%', 'like') ->condition('reservation_date', $yyyy_mmdd . '%', 'like')
->execute(); ->execute();
@ -967,7 +966,6 @@ function reserve_user_reservations() {
$latest_date = date('Y-m-d', strtotime("now +13 days")); $latest_date = date('Y-m-d', strtotime("now +13 days"));
$ids = \Drupal::service('entity_type.manager') $ids = \Drupal::service('entity_type.manager')
->getStorage('reserve_reservation')->getQuery() ->getStorage('reserve_reservation')->getQuery()
->accessCheck(TRUE)
->condition('user_id', $user->id()) ->condition('user_id', $user->id())
->condition('reservation_date', $earliest_date, '>=') ->condition('reservation_date', $earliest_date, '>=')
->condition('reservation_date', $latest_date, '<=') ->condition('reservation_date', $latest_date, '<=')
@ -1093,7 +1091,7 @@ function reserve_which_year($month, $day) {
// determine if this year or next year // determine if this year or next year
$yearnow = date('Y'); $yearnow = date('Y');
$absdaynow = date('z'); $absdaynow = date('z');
$absdaydefault = date('z', mktime(0, 0, 0, (int)$month, (int)$day, $yearnow)); $absdaydefault = date('z', mktime(0, 0, 0, $month, $day, $yearnow));
if ($absdaynow > $absdaydefault) { if ($absdaynow > $absdaydefault) {
$year = $yearnow + 1; $year = $yearnow + 1;
} }

2
reserve.info.yml

@ -2,7 +2,7 @@ name: Reserve
type: module type: module
description: Reservation system. description: Reservation system.
package: Reserve package: Reserve
core_version_requirement: ^9.5 || ^10 core_version_requirement: ^8 || ^9
dependencies: dependencies:
- drupal:views - drupal:views
- drupal:options - drupal:options

6
reserve.module

@ -16,9 +16,9 @@ use Drupal\Core\Form\FormStateInterface;
define ('RESERVE_SAVE_CONFIRMATION_MSG', t('Configuration settings have been saved')); define ('RESERVE_SAVE_CONFIRMATION_MSG', t('Configuration settings have been saved'));
define ('RESERVE_RESET_CONFIRMATION_MSG', t('Configuration settings have been reset to their default values')); define ('RESERVE_RESET_CONFIRMATION_MSG', t('Configuration settings have been reset to their default values'));
include(dirname(__FILE__) . '/reserve.inc'); module_load_include('inc', 'reserve', 'reserve');
include(dirname(__FILE__) . '/reserve.series.inc'); module_load_include('inc', 'reserve', 'reserve.series');
include(dirname(__FILE__) . '/reservation.inc'); module_load_include('inc', 'reserve', 'reservation');
$GLOBALS['debug'] = false; $GLOBALS['debug'] = false;

2
reserve.series.inc

@ -130,7 +130,6 @@ function reserve_reserve_reservation_update($entity) {
// grab all reservations in this series except the one being submitted // grab all reservations in this series except the one being submitted
$ids = \Drupal::service('entity_type.manager') $ids = \Drupal::service('entity_type.manager')
->getStorage('reserve_reservation')->getQuery() ->getStorage('reserve_reservation')->getQuery()
->accessCheck(TRUE)
->condition('status', TRUE) ->condition('status', TRUE)
->condition('reservation_series_id', $sid) ->condition('reservation_series_id', $sid)
->condition('id', $entity->id(), '!=') ->condition('id', $entity->id(), '!=')
@ -184,7 +183,6 @@ function _reserve_series_delete($entity) {
// grab all reservations in this series // grab all reservations in this series
$ids = \Drupal::service('entity_type.manager') $ids = \Drupal::service('entity_type.manager')
->getStorage('reserve_reservation')->getQuery() ->getStorage('reserve_reservation')->getQuery()
->accessCheck(TRUE)
->condition('reservation_series_id', $sid) ->condition('reservation_series_id', $sid)
->execute(); ->execute();
$results = \Drupal::entityTypeManager()->getStorage('reserve_reservation')->loadMultiple($ids); $results = \Drupal::entityTypeManager()->getStorage('reserve_reservation')->loadMultiple($ids);

7
src/Controller/CalendarController.php

@ -1,7 +1,6 @@
<?php <?php
namespace Drupal\reserve\Controller; namespace Drupal\reserve\Controller;
use Drupal\field\Entity\FieldConfig;
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Drupal\Core\Link; use Drupal\Core\Link;
@ -335,7 +334,7 @@ class CalendarController extends ControllerBase {
$extended = \Drupal::currentUser()->hasPermission('add reservations extended'); $extended = \Drupal::currentUser()->hasPermission('add reservations extended');
$config = \Drupal::config('reserve.settings'); $config = \Drupal::config('reserve.settings');
$category_field = reserve_category_fields($ebundle); $category_field = reserve_category_fields($ebundle);
$clearimg = '<img src="' . base_path() . \Drupal::service('extension.list.module')->getPath('reserve') . '/images/clear.png" />'; $clearimg = '<img src="' . base_path() . drupal_get_path('module', 'reserve') . '/images/clear.png" />';
$modal = ['attributes' => [ $modal = ['attributes' => [
'class' => ['use-ajax'], 'class' => ['use-ajax'],
'data-dialog-type' => 'modal', 'data-dialog-type' => 'modal',
@ -372,12 +371,12 @@ class CalendarController extends ControllerBase {
$variables['#calendar-text'] = $config->get('calendar_text'); $variables['#calendar-text'] = $config->get('calendar_text');
$variables['#reserve_room_instructions_text'] = $config->get('reserve_instructions') ? $config->get('reserve_instructions') : $variables['#reserve_room_instructions_text'] = $config->get('reserve_instructions') ? $config->get('reserve_instructions') :
t('To make a reservation, click on the desired time/day in the calendar below. You will be asked to login.'); t('To make a reservation, click on the desired time/day in the calendar below. You will be asked to login.');
$variables['#arrow'] = base_path() . \Drupal::service('extension.list.module')->getPath('reserve') . '/images/arrow-icon.png'; $variables['#arrow'] = base_path() . drupal_get_path('module', 'reserve') . '/images/arrow-icon.png';
$variables['#date'] = \Drupal::service('date.formatter')->format(strtotime($month . ' ' . $xday . ', ' . $year), 'custom', 'l, F d, Y'); $variables['#date'] = \Drupal::service('date.formatter')->format(strtotime($month . ' ' . $xday . ', ' . $year), 'custom', 'l, F d, Y');
$variables['#date_picker'] = \Drupal::formBuilder()->getForm('Drupal\reserve\Form\CalendarDatePicker'); $variables['#date_picker'] = \Drupal::formBuilder()->getForm('Drupal\reserve\Form\CalendarDatePicker');
$field = reserve_category_fields($ebundle); $field = reserve_category_fields($ebundle);
$fconfig = FieldConfig::loadByName($entity_type, $bundle, $field)->getSettings(); $fconfig = \Drupal\field\Entity\FieldConfig::loadByName($entity_type, $bundle, $field)->getSettings();
$variables['#calendar_header'] = $fconfig['calendar_header']; $variables['#calendar_header'] = $fconfig['calendar_header'];
$variables['#reservation_instructions'] = $fconfig['reservation_instructions']; $variables['#reservation_instructions'] = $fconfig['reservation_instructions'];

1
src/Form/ReserveDailyHoursForm.php

@ -5,6 +5,7 @@ namespace Drupal\reserve\Form;
use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
module_load_include('inc', 'reserve', 'reserve.admin');
/** /**
* Class ReserveCategorySettingsForm. * Class ReserveCategorySettingsForm.

5
src/Form/ReserveDefaultHoursForm.php

@ -5,6 +5,8 @@ namespace Drupal\reserve\Form;
use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
module_load_include('inc', 'reserve', 'reserve.admin');
/** /**
* Class ReserveCategorySettingsForm. * Class ReserveCategorySettingsForm.
* *
@ -233,6 +235,7 @@ class ReserveDefaultHoursForm extends ConfigFormBase {
*/ */
public function submitForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state->getValues(); $values = $form_state->getValues();
$default_hours = array(); $default_hours = array();
if ($form_state->getTriggeringElement()['#name'] == 'save') { if ($form_state->getTriggeringElement()['#name'] == 'save') {
for ($day = 0; $day < 7; $day++) { for ($day = 0; $day < 7; $day++) {
@ -241,7 +244,7 @@ class ReserveDefaultHoursForm extends ConfigFormBase {
$default_hours[] = $values['day_' . $day]['second_shift_open_' . $day]; $default_hours[] = $values['day_' . $day]['second_shift_open_' . $day];
$default_hours[] = $values['day_' . $day]['second_shift_close_' . $day]; $default_hours[] = $values['day_' . $day]['second_shift_close_' . $day];
} }
$confirmation = RESERVE_SAVE_CONFIRMATION_MSG; $confirmation = t(RESERVE_SAVE_CONFIRMATION_MSG);
} }
if ($form_state->getTriggeringElement()['#name'] == 'reset') { if ($form_state->getTriggeringElement()['#name'] == 'reset') {
for ($day = 0; $day < 7; $day++) { for ($day = 0; $day < 7; $day++) {

2
src/Form/ReserveSettingsForm.php

@ -114,7 +114,7 @@ class ReserveSettingsForm extends ConfigFormBase {
'#title' => t('Time to show on calendar before/after open slots'), '#title' => t('Time to show on calendar before/after open slots'),
'#type' => 'select', '#type' => 'select',
'#options' => array(0 => '0 hours', 1 => t('1 hour'), 2 => t('2 hours'), '3' => t('All day')), '#options' => array(0 => '0 hours', 1 => t('1 hour'), 2 => t('2 hours'), '3' => t('All day')),
'#default_value' => $config->get('show_before_after_hours') ? $config->get('show_before_after_hours') : 3, '#default_value' => $config->get('show_before_after_hours') ? $config->get('advanced_booking_admin') : 3,
'#description' => t('The number of hours before the first and last open slots for the day that are shown on the calendar. The default is to display the entire day.'), '#description' => t('The number of hours before the first and last open slots for the day that are shown on the calendar. The default is to display the entire day.'),
); );

3
src/Plugin/Field/FieldFormatter/ReserveCategoryFormatter.php

@ -2,7 +2,6 @@
namespace Drupal\reserve\Plugin\Field\FieldFormatter; namespace Drupal\reserve\Plugin\Field\FieldFormatter;
use Drupal\reserve\Entity\ReserveCategory;
use Drupal\Core\Field\FormatterBase; use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemListInterface;
@ -36,7 +35,7 @@ class ReserveCategoryFormatter extends FormatterBase {
$element = []; $element = [];
foreach ($items as $delta => $item) { foreach ($items as $delta => $item) {
$category = ReserveCategory::load($item->cid); $category = \Drupal\reserve\Entity\ReserveCategory::load($item->cid);
// Render each element as markup. // Render each element as markup.
$element[$delta] = [ $element[$delta] = [
'#type' => 'markup', '#type' => 'markup',

3
src/Plugin/Field/FieldType/ReserveCategory.php

@ -64,8 +64,7 @@ class ReserveCategory extends FieldItemBase implements FieldItemInterface {
*/ */
public function fieldSettingsForm(array $form, FormStateInterface $form_state) { public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
// get a list of all Reserve Categories // get a list of all Reserve Categories
$ids = \Drupal::entityQuery('reserve_category')->accessCheck(TRUE) $ids = \Drupal::entityQuery('reserve_category')->sort('name', 'ASC')->execute();
->sort('name', 'ASC')->execute();
$categories = \Drupal\reserve\Entity\ReserveCategory::loadMultiple($ids); $categories = \Drupal\reserve\Entity\ReserveCategory::loadMultiple($ids);
$options = array(); $options = array();
foreach ($categories as $cat) { foreach ($categories as $cat) {

6
src/Plugin/Field/FieldWidget/ReserveCategorySelect.php

@ -2,7 +2,6 @@
namespace Drupal\reserve\Plugin\Field\FieldWidget; namespace Drupal\reserve\Plugin\Field\FieldWidget;
use Drupal\reserve\Entity\ReserveCategory;
use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase; use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
@ -30,9 +29,8 @@ class ReserveCategorySelect extends WidgetBase {
// get a list of all Reserve Categories for this bundle // get a list of all Reserve Categories for this bundle
$set = $items->getSettings()['categories']; $set = $items->getSettings()['categories'];
$ids = \Drupal::entityQuery('reserve_category')->accessCheck(TRUE) $ids = \Drupal::entityQuery('reserve_category')->sort('name', 'ASC')->execute();
->sort('name', 'ASC')->execute(); $categories = \Drupal\reserve\Entity\ReserveCategory::loadMultiple($ids);
$categories = ReserveCategory::loadMultiple($ids);
$options = array(); $options = array();
foreach ($categories as $key => $cat) { foreach ($categories as $key => $cat) {
if (!in_array($key, $set)) continue; if (!in_array($key, $set)) continue;

46
src/Tests/LoadTest.php

@ -0,0 +1,46 @@
<?php
namespace Drupal\reserve\Tests;
use Drupal\Core\Url;
use Drupal\simpletest\WebTestBase;
/**
* Simple test to ensure that main page loads with module enabled.
*
* @group reserve
*/
class LoadTest extends WebTestBase{
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['reserve'];
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected $user;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
}
/**
* Tests that the home page loads with a 200 response.
*/
public function testLoad() {
$this->drupalGet(Url::fromRoute('<front>'));
$this->assertResponse(200);
}
}
Loading…
Cancel
Save