Files @ 158ef33603b8
Branch filter:

Location: kallithea/rhodecode/templates/admin/permissions/permissions_ips.html - annotation

Bradley M. Kuhn
Add mousetrap.js file from Mousetrap 1.4.5, under the Apache license.

The file was download and verified via these commands:
$ git clone https://github.com/ccampbell/mousetrap.git
$ cd mousetrap; git checkout 1.4.5

The file in that repository named mousetrap.js is exactly the same one that
appeared in RhodeCode 2.2.5 in changeset c8d3c0d61d95.

The mousetrap.js states clearly that it is licensed under Apache-2.0.
<h4>${_('Default ip whitelist for all users')}</h4>

<div class="ips_wrap">
      <table class="noborder">
      %if c.user_ip_map:
        %for ip in c.user_ip_map:
          <tr>
              <td><div class="ip">${ip.ip_addr}</div></td>
              <td><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
              <td>
                ${h.form(url('edit_user_ips', id=c.user.user_id),method='delete')}
                    ${h.hidden('del_ip_id',ip.ip_id)}
                    ${h.hidden('default_user', 'True')}
                    <i class="icon-remove-sign" style="color:#FF4444"></i> ${h.submit('remove_',_('delete'),id="remove_ip_%s" % ip.ip_id,
                    class_="action_button", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
                ${h.end_form()}
              </td>
          </tr>
        %endfor
       %else:
        <tr><td><div class="ip">${_('All IP addresses are allowed')}</div></td></tr>
       %endif
      </table>
</div>

${h.form(url('edit_user_ips', id=c.user.user_id),method='put')}
    <div class="form">
        <!-- fields -->
        <div class="fields">
             <div class="field">
                <div class="label">
                    <label for="new_ip">${_('New ip address')}:</label>
                </div>
                <div class="input">
                    ${h.hidden('default_user', 'True')}
                    ${h.text('new_ip', class_='medium')}
                </div>
             </div>
            <div class="buttons">
              ${h.submit('save',_('Add'),class_="btn")}
              ${h.reset('reset',_('Reset'),class_="btn")}
            </div>
        </div>
    </div>
${h.end_form()}