protected function handleSubmit(Action $action, EnvironmentInterface $environment)
    {
        $inputProvider   = $environment->getInputProvider();
        $sessionStorage  = $environment->getSessionStorage();
        $eventDispatcher = $environment->getEventDispatcher();

        if (('auto' === $inputProvider->getValue('SUBMIT_TYPE'))
            || !$inputProvider->hasValue($this->getMode($action) . '_saveNback')) {
            return;
        }

        $sessionStorage->remove($environment->getDataDefinition()->getName() . '.' . $this->getMode($action));

        $urlEvent = new GetReferrerEvent(false, $environment->getDataDefinition()->getName());

        $eventDispatcher->dispatch(ContaoEvents::SYSTEM_GET_REFERRER, $urlEvent);
        $eventDispatcher->dispatch(ContaoEvents::CONTROLLER_REDIRECT, new RedirectEvent($urlEvent->getReferrerUrl()));
    }