Thomas De Schampheleire <[email protected]> schrieb am Di., 30. Jan. 2018 um 15:21 Uhr:
> Hi Dominik, > > 2018-01-29 20:42 GMT+01:00 Dominik Ruf <[email protected]>: > > There are a few things left. > > > https://kallithea-scm.org/repos/kallithea/pull-request/126/_/remaining_bootstrap_related_stuff_v2_v4 > > > > Namely: > > - fix for 2way diff you mentioned > > - grid system for changeset graph > > - override some bootstrap variables > > - watch:less for developers > > - theme.less > > - some cleanup > > Thanks for clarifying. > > I found another issue related to bootstrap changes, caused by commit > > # HG changeset patch > # User domruf <[email protected]> > # Date 1498592973 -7200 > # Tue Jun 27 21:49:33 2017 +0200 > # Node ID 3fca87aa2b15e3267d6ec08d35e6aafced6f9027 > # Parent 91182a358fb3b3e913e9d3f7e207474e5f8511ab > templates: don't use ordinary elements as links or buttons by adding btn > styling > > > In these changes, there seems to be one problematic one: > > diff --git a/kallithea/templates/pullrequests/pullrequest_data.html > b/kallithea/templates/pullrequests/pullrequest_data.html > --- a/kallithea/templates/pullrequests/pullrequest_data.html > +++ b/kallithea/templates/pullrequests/pullrequest_data.html > @@ -61,7 +61,7 @@ > <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))} > - <div class="btn btn-default btn-xs" > + <button type="button" class="btn btn-default btn-xs" > id="remove_${pr.pull_request_id}" > name="remove_${pr.pull_request_id}" > title="${_('Delete Pull Request')}" > @@ -69,8 +69,8 @@ > && ((${len(pr.comments)} == 0) || > confirm('${_('Confirm again to delete this > pull request with %s comments') % len(pr.comments)}')) > "> > - <i class="icon-minus-circled"></i> > - </div> > + <i class="icon-minus-circled text-danger"></i> > + </button> > ${h.end_form()} > %endif > </td> > > The special thing about this button, in contrast to the other buttons > in Kallithea with 'type="button"' is that it serves as a real submit > button. There is no JavaScript actually doing some action when > clicking the button. The JavaScript only shows the confirm boxes. > > The intention is that after confirming, the form is submitted, but > this is not the case. Nothing happens after confirming. > > Previously, there was no 'type' attribute, and it seems that the > button also served as submit button (perhaps in forms the first button > is treated as submit button anyway?). > > Following is the proper fix according to me (tested, it works): > > diff --git a/kallithea/templates/pullrequests/pullrequest_data.html > b/kallithea/templates/pullrequests/pullrequest_data.html > --- a/kallithea/templates/pullrequests/pullrequest_data.html > +++ b/kallithea/templates/pullrequests/pullrequest_data.html > @@ -61,7 +61,7 @@ > <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')}" > > Best regards, > Thomas > Thanks again. You are right, the type should be submit in this case. I'll create an additional changeset.
_______________________________________________ kallithea-general mailing list [email protected] https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
