diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -433,10 +433,15 @@ class PullrequestsController(BaseRepoCon c.rhodecode_db_repo, self.ip_addr, self.sa) if request.POST.get('save_close'): - PullRequestModel().close_pull_request(pull_request_id) - action_logger(self.rhodecode_user, - 'user_closed_pull_request:%s' % pull_request_id, - c.rhodecode_db_repo, self.ip_addr, self.sa) + if status in ['rejected', 'approved']: + PullRequestModel().close_pull_request(pull_request_id) + action_logger(self.rhodecode_user, + 'user_closed_pull_request:%s' % pull_request_id, + c.rhodecode_db_repo, self.ip_addr, self.sa) + else: + h.flash(_('Closing pull request on other statuses than ' + 'rejected or approved forbidden'), + category='warning') Session().commit() diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -3619,6 +3619,10 @@ div.gravatar img { border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } +.ui-btn.blue.hidden{ + display: none; +} + .ui-btn.active{ font-weight: bold; } diff --git a/rhodecode/templates/changeset/changeset_file_comment.html b/rhodecode/templates/changeset/changeset_file_comment.html --- a/rhodecode/templates/changeset/changeset_file_comment.html +++ b/rhodecode/templates/changeset/changeset_file_comment.html @@ -127,7 +127,7 @@