-
Notifications
You must be signed in to change notification settings - Fork 96
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
NEW SudoModePasswordField component #1896
base: 2
Are you sure you want to change the base?
NEW SudoModePasswordField component #1896
Conversation
e7bc942
to
6313c22
Compare
code/LeftAndMain.php
Outdated
@@ -1540,6 +1540,12 @@ public function getEditForm($id = null, $fields = null) | |||
$readonlyFields = $form->Fields()->makeReadonly(); | |||
$form->setFields($readonlyFields); | |||
} | |||
|
|||
// Sudo mode |
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.
Scenario is editing an individual record that is a record managed by a gridfield e.g. CMSProfileController will use this when editing the logged in users profile
code/ModelAdmin.php
Outdated
@@ -274,6 +274,13 @@ public function getEditForm($id = null, $fields = null) | |||
$form->setFormAction($editFormAction); | |||
$form->setAttribute('data-pjax-fragment', 'CurrentForm'); | |||
|
|||
// Sudo mode |
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.
Scenario is a managed model on a model admin, for instance Member on SecurityAdmin (which extends ModelAdmin)
d5e63ef
to
cd2a595
Compare
cd2a595
to
10a7494
Compare
function SudoModePasswordField(props) { | ||
const { | ||
className, | ||
panelPadded, |
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 "panelPadded" functionality in this PR is related to making the field looking pretty "inline" which is only used in that PR which I think we should close. If we close that, then the panelPadded functionality should be removed from this PR.
Issue https://github.com/silverstripeltd/product-issues/issues/589