teppo Posted December 29, 2012 Share Posted December 29, 2012 (edited) This may have been discussed already in the AdminBar thread, but I simply couldn't find it there. Problem seems to be that buildForm method of ProcessPageEdit preserves GET parameter modal by default, while it's otherwise similar cousin in ProcessPageAdd doesn't. I'm just wondering if it would be possible to make these two methods work the same way in this little detail - unless, of course, there's actually a logical reason for this minor inconsistency? Edit: Went ahead and checked what kind of changes this would require. Seems to me that these would be enough: @@ -160,7 +160,7 @@ $form = $this->modules->get('InputfieldForm'); $form->attr('id', 'ProcessPageAdd'); - $form->attr('action', './'); + $form->attr('action', './' . ($this->input->get->modal ? "?modal=1" : '')); $form->attr('method', 'post'); if(is_null($this->template) || !$this->template->noGlobal) { @@ -309,7 +309,7 @@ $this->pages->save($this->page); $this->session->message(sprintf($this->_('Created page %1$s using template: %2$s'), $this->parent->url . $this->page->name, $template->name)); - $this->session->redirect("../edit/?id={$this->page->id}"); + $this->session->redirect("../edit/?id={$this->page->id}" . ($this->input->get->modal ? "&modal=1" : '')); } Edited December 30, 2012 by teppo 1 Link to comment Share on other sites More sharing options...
ryan Posted December 31, 2012 Share Posted December 31, 2012 No problem, I have added this and it should appear on the dev branch on the next commit. 1 Link to comment Share on other sites More sharing options...
teppo Posted January 8, 2013 Author Share Posted January 8, 2013 Thanks, Ryan! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now