diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index 4f25e70794b75d81dd9bb36c58793a39a17f87c7..73661094ea015182ad04530d468fa4d3373a2143 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -94,7 +94,7 @@ function refreshCommentList(recordId, recordSource) { function registerAjaxCommentRecord() { // Form submission - $('form[name="commentRecord"]').unbind('submit').submit(function(){ + $('form.comment').unbind('submit').submit(function(){ var form = this; var id = form.id.value; var recordSource = form.source.value; @@ -110,7 +110,6 @@ function registerAjaxCommentRecord() { data: data, dataType: 'json', success: function(response) { - var form = 'form[name="commentRecord"]'; if (response.status == 'OK') { refreshCommentList(id, recordSource); $(form).find('textarea[name="comment"]').val(''); diff --git a/themes/bootstrap3/templates/RecordTab/usercomments.phtml b/themes/bootstrap3/templates/RecordTab/usercomments.phtml index 9d88babf62c509f520031ccdbc361fb0f4c3aa16..4ec13a48f4a99a6866867df707f3573e6a9da1b7 100644 --- a/themes/bootstrap3/templates/RecordTab/usercomments.phtml +++ b/themes/bootstrap3/templates/RecordTab/usercomments.phtml @@ -6,7 +6,7 @@ <div id="commentList"> <?=$this->render('record/comments-list.phtml')?> </div> -<form class="comment" name="commentRecord" id="commentRecord" action="<?=$this->recordLink()->getActionUrl($this->driver, 'AddComment')?>" method="post"> +<form class="comment" action="<?=$this->recordLink()->getActionUrl($this->driver, 'AddComment')?>" method="post"> <div class="row"> <div class="col-sm-3 name"> <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>"/> diff --git a/themes/jquerymobile/templates/RecordTab/usercomments.phtml b/themes/jquerymobile/templates/RecordTab/usercomments.phtml index fe56781c83d58d0b573d51d3ce74199ceca82ff6..bfb324de331fae7c70f3499d42517c5eea02d8f7 100644 --- a/themes/jquerymobile/templates/RecordTab/usercomments.phtml +++ b/themes/jquerymobile/templates/RecordTab/usercomments.phtml @@ -6,7 +6,7 @@ <?=$this->render('record/comments-list.phtml')?> </ul> -<form name="commentRecord" id="commentRecord" action="<?=$this->recordLink()->getActionUrl($this->driver, 'AddComment')?>" method="post" data-ajax="false"> +<form action="<?=$this->recordLink()->getActionUrl($this->driver, 'AddComment')?>" method="post" data-ajax="false"> <input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>"/> <input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>"/> <div data-role="fieldcontain">