mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
save expose setting
This commit is contained in:
@@ -4,6 +4,8 @@ namespace Alchemy\Phrasea\PhraseanetService\Controller;
|
||||
|
||||
use Alchemy\Phrasea\Application as PhraseaApplication;
|
||||
use Alchemy\Phrasea\Controller\Controller;
|
||||
use Alchemy\Phrasea\PhraseanetService\Form\PSExposeConfigurationType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class PSAdminController extends Controller
|
||||
{
|
||||
@@ -12,4 +14,42 @@ class PSAdminController extends Controller
|
||||
return $this->render('admin/phraseanet-service/index.html.twig');
|
||||
}
|
||||
|
||||
public function authAction()
|
||||
{
|
||||
return $this->render('admin/phraseanet-service/auth.html.twig');
|
||||
}
|
||||
|
||||
public function exposeAction(PhraseaApplication $app, Request $request)
|
||||
{
|
||||
$exposeConfiguration = $app['conf']->get(['phraseanet-service', 'expose'], null);
|
||||
|
||||
$form = $app->form(new PSExposeConfigurationType(), $exposeConfiguration);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
$app['conf']->set(['phraseanet-service', 'expose'], $form->getData());
|
||||
|
||||
return $app->redirectPath('ps_admin');
|
||||
}
|
||||
|
||||
return $this->render('admin/phraseanet-service/expose.html.twig', [
|
||||
'form' => $form->createView()
|
||||
]);
|
||||
}
|
||||
|
||||
public function notifyAction()
|
||||
{
|
||||
return $this->render('admin/phraseanet-service/notify.html.twig');
|
||||
}
|
||||
|
||||
public function reportAction()
|
||||
{
|
||||
return $this->render('admin/phraseanet-service/report.html.twig');
|
||||
}
|
||||
|
||||
public function uploaderAction()
|
||||
{
|
||||
return $this->render('admin/phraseanet-service/uploader.html.twig');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user