Fix Public Deploy Keys form to allow expiration dates
What does this MR do and why?
Closes #427842 (closed)
The Public Deploy Keys form has HAML syntax which incorrectly showed a new deploy key form with the expiration date field as read only. This MR fixes the behaviour by:
- Showing an editable version of the input when a new deploy key is being created
- Moving the original read only version of the field to an
if?
statement. This ensures no expiration date field is presented if an expiration is not set.
Screenshots or screen recordings
GIF Example
How to set up and validate locally
- Go to Admin Area > Deploy Keys
- Create a new Deploy Key. Use a date value like
2024-01-01
for the expiration date. Save the form. - Edit the Deploy Key. Confirm the key's expiration date has been saved.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Ben King