Skip to content
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

Draft
wants to merge 1 commit into
base: 2
Choose a base branch
from

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz force-pushed the pulls/2/form-sudo-mode branch 3 times, most recently from e7bc942 to 6313c22 Compare February 3, 2025 06:54
@@ -1540,6 +1540,12 @@ public function getEditForm($id = null, $fields = null)
$readonlyFields = $form->Fields()->makeReadonly();
$form->setFields($readonlyFields);
}

// Sudo mode
Copy link
Member Author

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

@@ -274,6 +274,13 @@ public function getEditForm($id = null, $fields = null)
$form->setFormAction($editFormAction);
$form->setAttribute('data-pjax-fragment', 'CurrentForm');

// Sudo mode
Copy link
Member Author

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)

@emteknetnz emteknetnz force-pushed the pulls/2/form-sudo-mode branch 2 times, most recently from d5e63ef to cd2a595 Compare February 4, 2025 03:41
@emteknetnz emteknetnz force-pushed the pulls/2/form-sudo-mode branch from cd2a595 to 10a7494 Compare February 5, 2025 06:38
function SudoModePasswordField(props) {
const {
className,
panelPadded,
Copy link
Member Author

@emteknetnz emteknetnz Feb 5, 2025

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.

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.

1 participant