Redirect to the right tab on /config

This commit is contained in:
Jeremy Benoist 2016-02-12 12:00:26 +01:00
parent 43e4a806bd
commit c7a4f74f9f
2 changed files with 13 additions and 7 deletions

View file

@ -64,7 +64,7 @@ class ConfigController extends Controller
'Password updated'
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set4');
}
// handle changing user information
@ -82,7 +82,7 @@ class ConfigController extends Controller
'Information updated'
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set3');
}
// handle rss information
@ -98,7 +98,7 @@ class ConfigController extends Controller
'RSS information updated'
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set2');
}
// handle tagging rule
@ -116,7 +116,7 @@ class ConfigController extends Controller
'Tagging rules updated'
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set5');
}
// handle adding new user
@ -147,7 +147,7 @@ class ConfigController extends Controller
sprintf('User "%s" added', $newUser->getUsername())
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set6');
}
return $this->render('WallabagCoreBundle:Config:index.html.twig', array(
@ -187,7 +187,12 @@ class ConfigController extends Controller
return new JsonResponse(array('token' => $config->getRssToken()));
}
return $request->headers->get('referer') ? $this->redirect($request->headers->get('referer')) : $this->redirectToRoute('config');
$this->get('session')->getFlashBag()->add(
'notice',
'RSS token updated'
);
return $this->redirect($this->generateUrl('config').'#set2');
}
/**
@ -214,7 +219,7 @@ class ConfigController extends Controller
'Tagging rule deleted'
);
return $this->redirect($this->generateUrl('config'));
return $this->redirect($this->generateUrl('config').'#set5');
}
/**

View file

@ -39,6 +39,7 @@ Items per page: "Nombre d'articles par page"
Language: 'Langue'
Save: 'Enregistrer'
RSS token: 'Jeton RSS'
RSS token updated: 'Jeton RSS mis à jour'
Name: 'Nom'
Email: 'Adresse e-mail'
No token: 'Aucun jeton généré'