Closed Mike-Heneghan closed 5 years ago
To do list:
Trying to add "Remove Location" button to the location/detail.html
partial has been problematic. It might be better to use a different to allow easier handling of the methods.
As Services are indexed in Elasticsearch and the button would be on the Locations detail page I think it would be best if the location/detail.html partial was not used as this causes issues with passing variables. After deleting the join between the selected Location and Service the service should be saved.
To do list:
location/detail.html
partial. The rather than DeleteView I think the UpdateView would be a better generic view for handling this feature.
Although the functionality is implemented it is not necessarily following best practices of a DeleteView. Need to refactor to improve.
Need to fix formatting:
To do list:
For the formatting it would be easiest to change the "Remove location" button to an anchor but, it doesn't seem like good practice / possible to submit the form using an anchor tag without JS.
From the chrome dev tools, a margin-top: 0.5 rem
is applied to buttons. Can't seem to override it without inline styling.
Merged into master
Currently is a user wants to remove a location from their service they are likely to try to do this by selecting "Delete Location":
If the location is also associated with other services a warning appears.
As a usability improvement, it would be useful to change the language and behaviour to 'Remove Location' which would delete the join between the service and location rather than the location itself.