diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 8894690ce..6944a686e 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -18,11 +18,11 @@ class EntryController extends Controller /** * @param Request $request * - * @Route("/new", name="new_entry") + * @Route("/new-entry", name="new_entry") * * @return \Symfony\Component\HttpFoundation\Response */ - public function addEntryAction(Request $request) + public function addEntryFormAction(Request $request) { $entry = new Entry($this->getUser()); @@ -48,11 +48,23 @@ class EntryController extends Controller return $this->redirect($this->generateUrl('homepage')); } - return $this->render('WallabagCoreBundle:Entry:new.html.twig', array( + return $this->render('WallabagCoreBundle:Entry:new_form.html.twig', array( 'form' => $form->createView(), )); } + /** + * @param Request $request + * + * @Route("/new", name="new") + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function addEntryAction(Request $request) + { + return $this->render('WallabagCoreBundle:Entry:new.html.twig'); + } + /** * Edit an entry content. * diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig index b11512a40..95ed07852 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig @@ -3,5 +3,5 @@ {% block title %}{% trans %}Save new entry{% endtrans %}{% endblock %} {% block content %} - {{ form(form) }} + {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }} {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/new_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/new_form.html.twig new file mode 100644 index 000000000..d182d5520 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/new_form.html.twig @@ -0,0 +1,15 @@ +
+ + {% if form_errors(form) %} + {{ form_errors(form) }} + {% endif %} + + {% if form_errors(form.url) %} + {{ form_errors(form.url) }} + {% endif %} + + {{ form_label(form.url) }} + {{ form_widget(form.url) }} + + +
diff --git a/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig index c69c03c32..58cb316b1 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig @@ -7,7 +7,7 @@

{% trans %}There are several ways to save an article:{% endtrans %}

{% trans %}Browser Addons{% endtrans %}