-
Couldn't load subscription status.
- Fork 1
HEEDLS-374 Centre Configuration - Edit centre details #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
| var ratioX = Math.Min((float)maxSideLengthPx / (float)image.Width, 1); | ||
| var ratioY = Math.Min((float)maxSideLengthPx / (float)image.Height, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures that we don't accidentally enlarge a small logo or signature - I thought that would be the expected behaviour, happy to be corrected though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable to me! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor questions. Also looks like there is a small merge conflict around the new Edit button and Preview Certificate button.
...ingSolutions.Web/ViewModels/TrackingSystem/CentreConfiguration/EditCentreDetailsViewModel.cs
Show resolved
Hide resolved
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Show resolved
Hide resolved
...ingSolutions.Web/ViewModels/TrackingSystem/CentreConfiguration/EditCentreDetailsViewModel.cs
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Outdated
Show resolved
Hide resolved
...olutions.Web/Controllers/TrackingSystem/CentreConfiguration/CentreConfigurationController.cs
Outdated
Show resolved
Hide resolved
...b.Tests/Controllers/TrackingSystem/CentreConfiguration/CentreConfigurationControllerTests.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # DigitalLearningSolutions.Data.Tests/DataServices/CentresDataServiceTests.cs # DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/_CentreConfigurationCentreDetails.cshtml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Looks like the most recent build/test for github was cancelled, might be worth rerunning this.
Also here is a reminder to sort the line endings on that file you mentioned in another comment once it gets through Tech Lead review.
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Outdated
Show resolved
Hide resolved
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Show resolved
Hide resolved
DigitalLearningSolutions.Web/Views/TrackingSystem/CentreConfiguration/EditCentreDetails.cshtml
Show resolved
Hide resolved
...olutions.Web/Controllers/TrackingSystem/CentreConfiguration/CentreConfigurationController.cs
Outdated
Show resolved
Hide resolved
...olutions.Web/Controllers/TrackingSystem/CentreConfiguration/CentreConfigurationController.cs
Outdated
Show resolved
Hide resolved
...b.Tests/Controllers/TrackingSystem/CentreConfiguration/CentreConfigurationControllerTests.cs
Show resolved
Hide resolved
| var ratioX = Math.Min((float)maxSideLengthPx / (float)image.Width, 1); | ||
| var ratioY = Math.Min((float)maxSideLengthPx / (float)image.Height, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable to me! 👍
DigitalLearningSolutions.Data.Tests/DataServices/CentresDataServiceTests.cs
Show resolved
Hide resolved
|
Forgot to mention but I found the preview image & the Incognito mode combo very entertaining 😄 |
It's not incognito! I just have Firefox in dark mode 😅 |
…ing to othger similar forms
| private IActionResult AddRegistrationPromptConfigureAnswersPostNext(RegistrationPromptAnswersViewModel model) | ||
| { | ||
| IgnoreAddNewAnswerValidation(); | ||
| ModelState.ClearAllErrors(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not your change but is the if-statement below ever true when we clear the errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think not. Both this method and EditRegistrationPromptPostSave previously called IgnoreAddNewAnswerValidation before checking ModelState.IsValid which does exactly the same thing as ModelState.ClearAllErrors. I think they might have been holdovers that were never removed, so I'll remove them now. But if they are necessary for some bizarre reason, it will be easy enough to add them back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just a comment about other bit of the system that we should check 👍
Adds the edit centre details page to the Tracking System. Includes a new image resize method that ensures no side length of an image exceeds a certain pixel value.
