Skip to content

Commit

Permalink
Add .disabled class to all disabled text fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rungta committed Apr 22, 2024
1 parent cf873d4 commit d8633e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Release notes for the Contact Form Tuner Craft CMS plugin.
### Added
- Added support for Craft 5.

### Fixed
- Settings configured via a config file now consistently appear as disabled in the control panel.



## 1.1.1 - 2023-02-25
Expand Down
5 changes: 5 additions & 0 deletions src/templates/_settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
value: settings.ccEmail is iterable ? settings.ccEmail|join(', ') : settings.ccEmail,
autofocus: true,
disabled: 'ccEmail' in overrides,
class: 'ccEmail' in overrides ? 'disabled',
warning: 'ccEmail' in overrides ? configWarning('ccEmail'),
errors: settings.getErrors('ccEmail'),
}) }}
Expand All @@ -29,6 +30,7 @@
instructions: "Separate multiple names with commas."|t('contact-form-tuner'),
value: settings.ccName is iterable ? settings.ccName|join(', ') : settings.ccName,
disabled: 'ccName' in overrides,
class: 'ccName' in overrides ? 'disabled',
warning: 'ccName' in overrides ? configWarning('ccName'),
errors: settings.getErrors('ccName'),
}) }}
Expand All @@ -40,6 +42,7 @@
instructions: "Separate multiple email addresses with commas."|t('contact-form-tuner'),
value: settings.bccEmail is iterable ? settings.bccEmail|join(', ') : settings.bccEmail,
disabled: 'bccEmail' in overrides,
class: 'bccEmail' in overrides ? 'disabled',
warning: 'bccEmail' in overrides ? configWarning('bccEmail'),
errors: settings.getErrors('bccEmail'),
}) }}
Expand All @@ -65,6 +68,7 @@
value: settings.replyToEmail is iterable ? settings.replyToEmail|join(', ') : settings.replyToEmail,
placeholder: 'Contact Form sets this to the ‘From’ email by default.'|t('contact-form-tuner'),
disabled: 'replyToEmail' in overrides,
class: 'replyToEmail' in overrides ? 'disabled',
warning: 'replyToEmail' in overrides ? configWarning('replyToEmail'),
errors: settings.getErrors('replyToEmail'),
}) }}
Expand All @@ -77,6 +81,7 @@
value: settings.replyToName is iterable ? settings.replyToName|join(', ') : settings.replyToName,
placeholder: 'Contact Form sets this to the ‘From’ name by default.'|t('contact-form-tuner'),
disabled: 'replyToName' in overrides,
class: 'replyToName' in overrides ? 'disabled',
warning: 'replyToName' in overrides ? configWarning('replyToName'),
errors: settings.getErrors('replyToName'),
}) }}
Expand Down

0 comments on commit d8633e1

Please sign in to comment.