Changeset - 5572eb8d4feb
[Not reviewed]
stable
0 4 0
Mads Kiilerich - 3 years ago 2022-06-27 20:50:23
mads@kiilerich.com
html: clarify type of button elements - make it clear if we really want "submit"

This might fix some real problems.
4 files changed with 8 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -677,6 +677,7 @@ function _comment_div_append_form($comme
 
                'class': 'btn-group'
 
            }).append(
 
                $('<button>', {
 
                    'type': 'button',
 
                    'class': 'btn btn-default btn-xs',
 
                    text: _TM['Retry']
 
                }).click(function() {
 
@@ -685,6 +686,7 @@ function _comment_div_append_form($comme
 
                    ajaxPOST(AJAX_COMMENT_URL, postData, success, failure);
 
                }),
 
                $('<button>', {
 
                    'type': 'button',
 
                    'class': 'btn btn-default btn-xs',
 
                    text: _TM['Cancel']
 
                }).click(function() {
kallithea/templates/admin/user_groups/user_group_edit_perms.html
Show inline comments
 
@@ -67,7 +67,7 @@ ${h.form(url('edit_user_group_perms_upda
 
                            %endif
 
                        </td>
 
                        <td>
 
                            <button class="btn btn-default btn-xs" onclick="ajaxActionRevoke(${g2p.user_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.user_group.users_group_name)}', '${g2p.user_group.users_group_name}')">
 
                            <button type="button" class="btn btn-default btn-xs" onclick="ajaxActionRevoke(${g2p.user_group.users_group_id}, 'user_group', '${'id%s'%id(g2p.user_group.users_group_name)}', '${g2p.user_group.users_group_name}')">
 
                            <i class="icon-minus-circled"></i>${_('Revoke')}
 
                            </button>
 
                        </td>
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -4,7 +4,7 @@
 
                       cs_repo_name, cs_ref_name, cs_ref_type, cs_rev,
 
                       file_diff_data)">
 
<div class="diff-collapse">
 
    <button data-target="${'diff-container-%s' % (id(file_diff_data))}" class="diff-collapse-button btn btn-link btn-sm">&uarr; ${_('Collapse Diff')} &uarr;</button>
 
    <button type='button', data-target="${'diff-container-%s' % (id(file_diff_data))}" class="diff-collapse-button btn btn-link btn-sm">&uarr; ${_('Collapse Diff')} &uarr;</button>
 
</div>
 
%for id_fid, url_fid, op, a_filename, cs_filename, diff, stats in file_diff_data:
 
    ${diff_block_diffblock(id_fid, url_fid, op, diff,
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -70,7 +70,7 @@
 
        <i class="icon-pencil"></i>${_('Edit')}
 
      </a>
 
      ${webutils.form(webutils.url('delete_repo', repo_name=repo_name))}
 
        <button name="${'remove_%s' % repo_name}" class="btn btn-default btn-xs"
 
        <button type="submit" name="${'remove_%s' % repo_name}" class="btn btn-default btn-xs"
 
            onclick="return confirm('${_('Confirm to delete this repository: %s') % repo_name}');">
 
          <i class="icon-trashcan"></i>${_('Delete')}
 
        </button>
 
@@ -92,7 +92,7 @@
 
     <i class="icon-pencil"></i>${_('Edit')}
 
   </a>
 
  ${webutils.form(webutils.url('delete_user', id=user_id))}
 
    <button id="${'remove_user_%s' % user_id}" name="${'remove_user_%s' % repo_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
    <button type="submit" id="${'remove_user_%s' % user_id}" name="${'remove_user_%s' % repo_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
        onclick="return confirm('${_('Confirm to delete this user: %s') % username}');">
 
      <i class="icon-trashcan"></i>${_('Delete')}
 
    </button>
 
@@ -104,7 +104,7 @@
 
      <i class="icon-pencil"></i>${_('Edit')}
 
    </a>
 
    ${webutils.form(webutils.url('delete_users_group', id=user_group_id))}
 
      <button id="${'remove_group_%s' % user_group_id}" name="${'remove_user_%s' % repo_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
      <button type="submit" id="${'remove_group_%s' % user_group_id}" name="${'remove_user_%s' % repo_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
          onclick="return confirm('${_('Confirm to delete this user group: %s') % user_group_name}');">
 
        <i class="icon-trashcan"></i>${_('Delete')}
 
      </button>
 
@@ -123,7 +123,7 @@
 
      <i class="icon-pencil"></i>${_('Edit')}
 
    </a>
 
    ${webutils.form(webutils.url('delete_repo_group', group_name=repo_group_name))}
 
      <button id="${'remove_%s' % repo_group_name}" name="${'remove_%s' % repo_group_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
      <button type="submit" id="${'remove_%s' % repo_group_name}" name="${'remove_%s' % repo_group_name}" class="btn btn-default btn-xs" title="${_('Delete')}"
 
          onclick="return confirm('${ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)}')">
 
        <i class="icon-trashcan"></i>${_('Delete')}
 
      </button>
0 comments (0 inline, 0 general)