-
Notifications
You must be signed in to change notification settings - Fork 638
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
Feature/cms 660 show read-only settings when allowAdminChanges
is disabled
#16265
Feature/cms 660 show read-only settings when allowAdminChanges
is disabled
#16265
Conversation
…ead-only-settings-when-allowadminchanges-false
Love this! It might be worth adding a "Learn More" button to a KB article explaining why settings can't/shouldn't be changed in production. Newer Craft developers or over-confident clients might read the current disclaimer as instructions to simply turn on "allowAdminChanges" and potentially get themselves in a mess. |
…allowadminchanges-false
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-just awesome! I pinged you on the Notion page for this feature as I had some follow-up questions.
…allowadminchanges-false
…allowadminchanges-false
- ConfigurableComponent:::getReadOnlySettingsHtml() - Plugin::getReadOnlySettingsResponse()
src/helpers/Cp.php
Outdated
@@ -2917,6 +2930,7 @@ public static function layoutElementSelectorHtml( | |||
'has-custom-width' => $element->hasCustomWidth(), | |||
'has-settings' => $element->hasSettings(), | |||
], | |||
'disabled' => true, |
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-just What’s the reason for this?
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.
It was adding a disabled
attribute to the fields inside the field layout designer’s .fld-field-library
. But with the changes from #16374, it’s no longer needed (plus, it looks like I forgot to make it dynamic). I took that out.
bd582a5
to
3f3a6dd
Compare
I changed things up a bit so now all configurable components have a Fields, filesystems, and mail transport adapters now override Plugins similarly now have a The point of these changes is to limit the need to check |
Otherwise, w/o any JS registered, browsers don't know what to do with the <vue-autosuggest> tag.
[ci skip]
Description
Shows read-only settings when
allowAdminChanges
is disabled..revision-notice
to a generic.content-notice
class so that the styles can be reused for other purposes tooallowAdminChanges
is disabled; to do so, they need to ensure none of the settings are editable in such case and setpublic bool $hasReadOnlyCpSettings
totrue
Further info are in Brandon's comment below.
Related issues
cms-660