aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>';