mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 07:13:08 +02:00
Fix issue processwire/processwire-issues#700 where ProcessPermission "add new" was incorrectly showing Save+Publish buttons
This commit is contained in:
@@ -83,6 +83,20 @@ class ProcessPermission extends ProcessPageType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the page editor
|
||||||
|
*
|
||||||
|
* @param string $moduleName One of 'ProcessPageEdit' or 'ProcessPageAdd' (or other that extends)
|
||||||
|
* @return ProcessPageEdit|ProcessPageAdd|WirePageEditor
|
||||||
|
* @throws WireException If requested editor moduleName not found
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected function getEditor($moduleName) {
|
||||||
|
$editor = parent::getEditor($moduleName);
|
||||||
|
if($editor == 'ProcessPageAdd') $editor->set('noAutoPublish', true);
|
||||||
|
return $editor;
|
||||||
|
}
|
||||||
|
|
||||||
public function ___executeAdd() {
|
public function ___executeAdd() {
|
||||||
|
|
||||||
// hide the title field, since it is counterproductive when adding a new permission
|
// hide the title field, since it is counterproductive when adding a new permission
|
||||||
|
Reference in New Issue
Block a user