Skip to content

Disable New Program Year save button if no available academic years#9367

Open
michaelchadwick wants to merge 2 commits into
ilios:masterfrom
michaelchadwick:frontend-7168-new-py-undefined-bugfix
Open

Disable New Program Year save button if no available academic years#9367
michaelchadwick wants to merge 2 commits into
ilios:masterfrom
michaelchadwick:frontend-7168-new-py-undefined-bugfix

Conversation

@michaelchadwick
Copy link
Copy Markdown
Contributor

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for ilios-frontend ready!

Name Link
🔨 Latest commit 5cb01ae
🔍 Latest deploy log https://app.netlify.com/projects/ilios-frontend/deploys/6a206fc42bf7680008b6a59a
😎 Deploy Preview https://deploy-preview-9367--ilios-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@dartajax
Copy link
Copy Markdown
Member

dartajax commented Jun 3, 2026

What an excellent catch @michaelchadwick

Copy link
Copy Markdown
Member

@dartajax dartajax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click tested - looks fine to me

Copy link
Copy Markdown
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix works as intended. code looks good. the styles can be streamlined, please see line comments.

<button
type="button"
class="done text"
class="done text{{if this.noAvailableYears ' disabled'}}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the added class is not necessary if you use the :disabled pseudo class in the stylesheet instead.

.buttons {
@include m.ilios-form-buttons;

button.disabled {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the :disabled pseudo class instead.

Suggested change
button.disabled {
button:disabled {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New ProgramYear creation can still error on lack of selected year

3 participants