updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -10,19 +10,21 @@ use Drupal\Core\Form\FormBase;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Render\Element;
|
||||
use Drupal\Core\Entity\Entity\EntityFormDisplay;
|
||||
use Drupal\user\PrivateTempStoreFactory;
|
||||
use Drupal\Core\TempStore\PrivateTempStoreFactory;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
/**
|
||||
* Builds and process a form for editing a single entity field.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class QuickEditFieldForm extends FormBase {
|
||||
|
||||
/**
|
||||
* Stores the tempstore factory.
|
||||
*
|
||||
* @var \Drupal\user\PrivateTempStoreFactory
|
||||
* @var \Drupal\Core\TempStore\PrivateTempStoreFactory
|
||||
*/
|
||||
protected $tempStoreFactory;
|
||||
|
||||
@@ -50,7 +52,7 @@ class QuickEditFieldForm extends FormBase {
|
||||
/**
|
||||
* Constructs a new EditFieldForm.
|
||||
*
|
||||
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
|
||||
* @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
|
||||
* The tempstore factory.
|
||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||
* The module handler.
|
||||
@@ -71,7 +73,7 @@ class QuickEditFieldForm extends FormBase {
|
||||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
return new static(
|
||||
$container->get('user.private_tempstore'),
|
||||
$container->get('tempstore.private'),
|
||||
$container->get('module_handler'),
|
||||
$container->get('entity.manager')->getStorage('node_type'),
|
||||
$container->get('typed_data_manager')->getValidator()
|
||||
@@ -114,6 +116,10 @@ class QuickEditFieldForm extends FormBase {
|
||||
'#attributes' => ['class' => ['quickedit-form-submit']],
|
||||
];
|
||||
|
||||
// Use the non-inline form error display for Quick Edit forms, because in
|
||||
// this case the errors are already near the form element.
|
||||
$form['#disable_inline_form_errors'] = TRUE;
|
||||
|
||||
// Simplify it for optimal in-place use.
|
||||
$this->simplify($form, $form_state);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Drupal\quickedit;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\Core\Form\FormState;
|
||||
use Drupal\Core\Render\RendererInterface;
|
||||
use Drupal\user\PrivateTempStoreFactory;
|
||||
use Drupal\Core\TempStore\PrivateTempStoreFactory;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -25,7 +25,7 @@ class QuickEditController extends ControllerBase {
|
||||
/**
|
||||
* The PrivateTempStore factory.
|
||||
*
|
||||
* @var \Drupal\user\PrivateTempStoreFactory
|
||||
* @var \Drupal\Core\TempStore\PrivateTempStoreFactory
|
||||
*/
|
||||
protected $tempStoreFactory;
|
||||
|
||||
@@ -53,7 +53,7 @@ class QuickEditController extends ControllerBase {
|
||||
/**
|
||||
* Constructs a new QuickEditController.
|
||||
*
|
||||
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
|
||||
* @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
|
||||
* The PrivateTempStore factory.
|
||||
* @param \Drupal\quickedit\MetadataGeneratorInterface $metadata_generator
|
||||
* The in-place editing metadata generator.
|
||||
@@ -74,7 +74,7 @@ class QuickEditController extends ControllerBase {
|
||||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
return new static(
|
||||
$container->get('user.private_tempstore'),
|
||||
$container->get('tempstore.private'),
|
||||
$container->get('quickedit.metadata.generator'),
|
||||
$container->get('quickedit.editor.selector'),
|
||||
$container->get('renderer')
|
||||
|
||||
Reference in New Issue
Block a user