{"action":"created","comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/27620223","id":27620223,"diff_hunk":"@@ -421,8 +421,41 @@ protected function findBy($entityClass, $searchQuery, array $searchableFields, $\n      */\n     protected function createEditForm($entity, array $entityProperties)\n     {\n+        return $this->createEntityForm($entity, $entityProperties, 'edit');\n+    }\n+\n+    /**\n+     * Creates the form used to create an entity.\n+     *\n+     * @param object $entity\n+     * @param array  $entityProperties\n+     *\n+     * @return Form\n+     */\n+    protected function createNewForm($entity, array $entityProperties)\n+    {\n+        return $this->createEntityForm($entity, $entityProperties, 'new');\n+    }\n+\n+    /**\n+     * Creates the form used to create or edit an entity.\n+     *\n+     * @param object $entity\n+     * @param array  $entityProperties\n+     * @param string $view The name of the view where this form is used ('new' or 'edit')\n+     *\n+     * @return Form\n+     */\n+    protected function createEntityForm($entity, array $entityProperties, $view)\n+    {\n+        $formUsesHorizontalLayout = in_array('@EasyAdmin/form/bootstrap_3_horizontal_layout.html.twig', $this->config['design']['form_theme']);\n+\n         $form = $this->createFormBuilder($entity, array(\n             'data_class' => $this->entity['class'],\n+            'attr' => array(\n+                'id' => $view.'-form',\n+                'form_button_row_class' => $formUsesHorizontalLayout ? 'col-sm-10 col-sm-offset-2' : '',","path":"Controller/AdminController.php","position":37,"original_position":37,"commit_id":"c13baa68b26a40cb305ff75a617e79b0aa6799f1","original_commit_id":"c13baa68b26a40cb305ff75a617e79b0aa6799f1","user":{"login":"ogizanagi","id":2211145,"avatar_url":"https://avatars.githubusercontent.com/u/2211145?v=3","gravatar_id":"","url":"https://api.github.com/users/ogizanagi","html_url":"https://github.com/ogizanagi","followers_url":"https://api.github.com/users/ogizanagi/followers","following_url":"https://api.github.com/users/ogizanagi/following{/other_user}","gists_url":"https://api.github.com/users/ogizanagi/gists{/gist_id}","starred_url":"https://api.github.com/users/ogizanagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogizanagi/subscriptions","organizations_url":"https://api.github.com/users/ogizanagi/orgs","repos_url":"https://api.github.com/users/ogizanagi/repos","events_url":"https://api.github.com/users/ogizanagi/events{/privacy}","received_events_url":"https://api.github.com/users/ogizanagi/received_events","type":"User","site_admin":false},"body":"Should we allow to configure a value for this form option while using a custom theme ? Plus, we might only extend the useradmin one and need the `col-sm-10 col-sm-offset-2` value.","created_at":"2015-04-01T22:58:00Z","updated_at":"2015-04-01T22:58:00Z","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211#discussion_r27620223","pull_request_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/27620223"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211#discussion_r27620223"},"pull_request":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211","id":32458326,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211","diff_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211.diff","patch_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211.patch","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/211","number":211,"state":"open","locked":false,"title":"Added the new form_theme design option and simplified forms","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"This is the third PR related to #208.\r\n\r\nI'm very excited with this PR because this option is very powerful and it has allowed us to do a drastic form code simplification.","created_at":"2015-04-01T20:39:36Z","updated_at":"2015-04-01T22:58:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27d80713d63a560bfa2addccbddea156551ffe6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211/commits","review_comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211/comments","review_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/211/comments","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/c13baa68b26a40cb305ff75a617e79b0aa6799f1","head":{"label":"javiereguiluz:add_form_theme_option","ref":"add_form_theme_option","sha":"c13baa68b26a40cb305ff75a617e79b0aa6799f1","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","created_at":"2015-01-12T08:43:02Z","updated_at":"2015-04-01T09:10:47Z","pushed_at":"2015-04-01T20:40:06Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":4310,"stargazers_count":498,"watchers_count":498,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":12,"forks":47,"open_issues":12,"watchers":498,"default_branch":"master"}},"base":{"label":"javiereguiluz:master","ref":"master","sha":"58b2959ce951ed9d5d1491b93381e96bee340672","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","created_at":"2015-01-12T08:43:02Z","updated_at":"2015-04-01T09:10:47Z","pushed_at":"2015-04-01T20:40:06Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":4310,"stargazers_count":498,"watchers_count":498,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":12,"forks":47,"open_issues":12,"watchers":498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/211"},"issue":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/211"},"comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/c13baa68b26a40cb305ff75a617e79b0aa6799f1"}}}}