Changeset - 17c999c48ab6
[Not reviewed]
default
0 1 0
domruf - 8 years ago 2018-01-30 18:44:25
dominikruf@gmail.com
Grafted from: 4f16ce43e77a
pullrequests: fix broken delete button on overview list

428c1193ee40 changed the "Delete" button on the pull request overview page to
no longer be a "submit" button. That broke the functionality: In order for the
form to be submitted, the button needs to be of type submit.

Change it back to "submit".
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
@@ -52,25 +52,25 @@
 
          ${pr.org_repo.repo_name}#${org_ref_name}
 
        </a>
 
      </td>
 
      <td>
 
        <% other_ref_name=pr.other_ref.rsplit(':', 2)[-2] %>
 
        <a href="${h.url('summary_home', repo_name=pr.other_repo.repo_name, anchor=other_ref_name)}">
 
          ${pr.other_repo.repo_name}#${other_ref_name}
 
        </a>
 
      </td>
 
      <td>
 
        %if pr.owner_id == request.authuser.user_id:
 
          ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id))}
 
          <button type="button" class="btn btn-link btn-xs"
 
          <button type="submit" class="btn btn-link btn-xs"
 
                  id="remove_${pr.pull_request_id}"
 
                  name="remove_${pr.pull_request_id}"
 
                  title="${_('Delete Pull Request')}"
 
                  onclick="return confirm('${_('Confirm to delete this pull request')}')
 
                      && ((${len(pr.comments)} == 0) ||
 
                          confirm('${_('Confirm again to delete this pull request with %s comments') % len(pr.comments)}'))
 
                      ">
 
            <i class="icon-trashcan"></i>
 
          </button>
 
          ${h.end_form()}
 
        %endif
 
      </td>
0 comments (0 inline, 0 general)