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
General
: Disable readonly input elements
#8114
Conversation
WalkthroughThe recent updates aim to improve the user interface by removing unnecessary ID fields from various forms and transitioning from using the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@@ -123,7 +111,7 @@ <h5 class="pb-1" jhiTranslate="artemisApp.examManagement.sections.conduction">Ex | |||
<label class="form-check-label" for="workingTimeInMinutes" jhiTranslate="artemisApp.examManagement.workingTime">Working Time</label> | |||
<jhi-help-icon [text]="'artemisApp.examManagement' + (exam.testExam ? '.testExam' : '') + '.workingTimeTooltip'" /> | |||
@if (!exam.testExam) { | |||
<input readonly type="text" class="form-control" [value]="workingTimeInMinutes" /> | |||
<input disabled type="text" class="form-control" [value]="workingTimeInMinutes" /> |
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.
The change to disable the input field for working time (<input disabled type="text" class="form-control" [value]="workingTimeInMinutes" />
) instead of making it read-only is consistent with the PR's objective to align with Bootstrap's updated styling guidelines. This ensures that the input field is styled appropriately according to the new guidelines. However, it's important to ensure that this change does not impact the functionality where the value of workingTimeInMinutes
needs to be submitted with the form, as disabled fields are not included in form submissions. Consider using a hidden input field to store the value if it needs to be submitted.
src/main/webapp/app/exercises/text/participate/text-editor.component.html
Show resolved
Hide resolved
General
: Replace readonly with disabled on input elementsGeneral
: Add disabled on readonly input elements
.../lecture-unit/lecture-unit-management/attachment-unit-form/attachment-unit-form.component.ts
Show resolved
Hide resolved
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.
Tested on TS2: The forms I tested (user management, system notifications, update course, update exam, update exercise for all exercise types, explanation for modeling exercises) all worked as expected.
General
: Add disabled on readonly input elementsGeneral
: Disable readonly input elements
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.
Code looks good to me 👍
Checklist
General
Client
Motivation and Context
Bootstrap changed their styling for form-controls. Readonly input elements are no longer styled, but only disabled still are.
See twbs/bootstrap#36499
Also closes #8005
Description
This PR adds disabled to readonly input elements to work the same but show some disabled styling. ID input fields are always deactivated and we decided to remove them from the form, since they dont bring any value.
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Code Review
Manual Tests
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit
[readOnly]
to[disabled]
for improved user interface consistency.