aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-07-14 07:12:12 -0400
committerCash Costello <cash.costello@gmail.com>2012-07-14 07:12:12 -0400
commitd7a5c24dd7c31318cf2e4405337919b7fd5ec304 (patch)
tree68d6c4f31fccc15c0041bfec6dbaeeab9cdb306c
parent901cb69ba0b40d247bea5b0e1b4e4588a86800c1 (diff)
downloadelgg-d7a5c24dd7c31318cf2e4405337919b7fd5ec304.tar.gz
elgg-d7a5c24dd7c31318cf2e4405337919b7fd5ec304.tar.bz2
Fixes #4691 not passing name to the form since not valid
-rw-r--r--mod/blog/lib/blog.php1
-rw-r--r--mod/blog/views/default/js/blog/save_draft.php6
-rw-r--r--views/default/page/elements/comments.php3
3 files changed, 4 insertions, 6 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);
};
diff --git a/views/default/page/elements/comments.php b/views/default/page/elements/comments.php
index cf9b5f08b..97cb9574e 100644
--- a/views/default/page/elements/comments.php
+++ b/views/default/page/elements/comments.php
@@ -36,8 +36,7 @@ if ($html) {
}
if ($show_add_form) {
- $form_vars = array('name' => 'elgg_add_comment');
- echo elgg_view_form('comments/add', $form_vars, $vars);
+ echo elgg_view_form('comments/add', array(), $vars);
}
echo '</div>';