diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 07:12:12 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 07:12:12 -0400 |
commit | d7a5c24dd7c31318cf2e4405337919b7fd5ec304 (patch) | |
tree | 68d6c4f31fccc15c0041bfec6dbaeeab9cdb306c /mod | |
parent | 901cb69ba0b40d247bea5b0e1b4e4588a86800c1 (diff) | |
download | elgg-d7a5c24dd7c31318cf2e4405337919b7fd5ec304.tar.gz elgg-d7a5c24dd7c31318cf2e4405337919b7fd5ec304.tar.bz2 |
Fixes #4691 not passing name to the form since not valid
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/lib/blog.php | 1 | ||||
-rw-r--r-- | mod/blog/views/default/js/blog/save_draft.php | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 9a02a8cc3..4622a9e7e 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -272,7 +272,6 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { $vars = array(); $vars['id'] = 'blog-post-edit'; - $vars['name'] = 'blog_post'; $vars['class'] = 'elgg-form-alt'; if ($page == 'edit') { diff --git a/mod/blog/views/default/js/blog/save_draft.php b/mod/blog/views/default/js/blog/save_draft.php index 8a994ffb0..8cd07ff5d 100644 --- a/mod/blog/views/default/js/blog/save_draft.php +++ b/mod/blog/views/default/js/blog/save_draft.php @@ -12,7 +12,7 @@ elgg.provide('elgg.blog'); */ elgg.blog.saveDraftCallback = function(data, textStatus, XHR) { if (textStatus == 'success' && data.success == true) { - var form = $('form[name=blog_post]'); + var form = $('form[id=blog-post-edit]'); // update the guid input element for new posts that now have a guid form.find('input[name=guid]').val(data.guid); @@ -36,7 +36,7 @@ elgg.blog.saveDraft = function() { } // only save on changed content - var form = $('form[name=blog_post]'); + var form = $('form[id=blog-post-edit]'); var description = form.find('textarea[name=description]').val(); var title = form.find('input[name=title]').val(); @@ -59,7 +59,7 @@ elgg.blog.saveDraft = function() { elgg.blog.init = function() { // get a copy of the body to compare for auto save - oldDescription = $('form[name=blog_post]').find('textarea[name=description]').val(); + oldDescription = $('form[id=blog-post-edit]').find('textarea[name=description]').val(); setInterval(elgg.blog.saveDraft, 60000); }; |