Blame progit/templates/add_user.html

Pierre-Yves Chibon 97d01f
{% extends "repo_master.html" %}
Pierre-Yves Chibon 97d01f
{% from "_formhelper.html" import render_field_in_row %}
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
{% block title %}Add user - {{ repo.name }}{% endblock %}
Pierre-Yves Chibon 97d01f
{%block tag %}home{% endblock %}
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
{% block repo %}
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f

Add user

Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
<section class="new_user"></section>
Pierre-Yves Chibon 97d01f
    
Pierre-Yves Chibon 97d01f
                     username=username, repo=repo.name) }}" method="post">
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
    
Pierre-Yves Chibon 97d01f
      {{ render_field_in_row(form.user) }}
Pierre-Yves Chibon 97d01f
    
Pierre-Yves Chibon 97d01f
    

Pierre-Yves Chibon 97d01f
      <input class="submit positive button" type="submit" value="Add">
Pierre-Yves Chibon 97d01f
      <input class="button" onclick="history.back();" type="button" value="Cancel">
Pierre-Yves Chibon 97d01f
      {{ form.csrf_token }}
Pierre-Yves Chibon 97d01f
    

Pierre-Yves Chibon 97d01f
  
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
Pierre-Yves Chibon 97d01f
{% endblock %}
Pierre-Yves Chibon 6d49b8
Pierre-Yves Chibon 6d49b8
{% block jscripts %}
Pierre-Yves Chibon 6d49b8
{{ super() }}
Pierre-Yves Chibon 6d49b8
<script type="text/javascript"></script>
Pierre-Yves Chibon 6d49b8
  $(function() {
Pierre-Yves Chibon 6d49b8
    $('#user').autocomplete({
Pierre-Yves Chibon a576cf
      source: function( request, response ) {
Pierre-Yves Chibon a576cf
        $.getJSON(
Pierre-Yves Chibon a576cf
          "{{ url_for('api_ns.api_users') }}", {
Pierre-Yves Chibon a576cf
            pattern: request.term
Pierre-Yves Chibon a576cf
          },
Pierre-Yves Chibon a576cf
          function( data ) {
Pierre-Yves Chibon a576cf
            response( data.users );
Pierre-Yves Chibon a576cf
          }
Pierre-Yves Chibon a576cf
        );
Pierre-Yves Chibon a576cf
      },
Pierre-Yves Chibon a576cf
      minLength: 2,
Pierre-Yves Chibon a576cf
      delay: 500,
Pierre-Yves Chibon 6d49b8
    });
Pierre-Yves Chibon 6d49b8
  });
Pierre-Yves Chibon 6d49b8
Pierre-Yves Chibon 6d49b8
{% endblock %}