Or create your own admin generator theme... That's just a second "save button"... The only thing that will differ is the rediction after the action. So you just have to know wich submit button was used and redirect to the correct page.
++ ________________________________ De : rosbif <[EMAIL PROTECTED]> À : symfony users <symfony-users@googlegroups.com> Envoyé le : Samedi, 15 Novembre 2008, 15h12mn 40s Objet : [symfony-users] Re: "save and next" action on admin generator edit page After working on this, the problem I am seeing is that if you add an action to the edit form, the button will only do a GET, so you can't post the data in the form and perform an action on it (updating the entry). this is the code I use in the generator.yml: <pre> _save_and_edit_next: name: save and edit next value: save_and_edit_next method: post type: submit action: saveNext params: class=null name=save_and_edit_next method=post type=submit </pre> and this is the code it generates : <pre> <li><input class="sf_admin_action_save_and_edit_next" name="save_and_edit_next" method="post" value="save and edit next" onclick="document.location.href='/backend_dev.php/sfTransUnit/saveNext/ msg_id/622';" type="button"></li> </pre> Compared to the code for the save and add action : <pre> <li><input name="save_and_add" value="save and add" class="sf_admin_action_save_and_add" type="submit"></li> </pre> does anyone have an idea how to force the action to post the form data ? Thanks Gareth On Nov 14, 6:32 pm, rosbif <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to add a "Save and go to next" action on the edit page of > the admin generator. > > Currently its difficult to bulk edit entries via the admin interface. > From the list page, you click on an item, edit it, save it, then have > to click back twice before clicking on the next item. > > I'd like to add a way to save an entry and go to the next entry to > edit automatically. The next page should take the user to edit the > next item in the list depending on the current filter settings. > > I guess I have to create the pager object in executeEdit(), like in > executeList() but if someone knows an easier way than doing this by > hand, or if someone else has already done this, I'd love to know. > > Thnks > Gareth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---