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 6d49b8
        source: function( request, response ) {
Pierre-Yves Chibon 6d49b8
            $.getJSON(
Pierre-Yves Chibon 6d49b8
              "{{ url_for('api_ns.api_users') }}", {
Pierre-Yves Chibon 6d49b8
                pattern: request.term
Pierre-Yves Chibon 6d49b8
              },
Pierre-Yves Chibon 6d49b8
              function( data ) {
Pierre-Yves Chibon 6d49b8
                response( data.users );
Pierre-Yves Chibon 6d49b8
              }
Pierre-Yves Chibon 6d49b8
            );
Pierre-Yves Chibon 6d49b8
        },
Pierre-Yves Chibon 6d49b8
        minLength: 2,
Pierre-Yves Chibon 6d49b8
        delay: 500,
Pierre-Yves Chibon 6d49b8
    });
Pierre-Yves Chibon 6d49b8
  });
Pierre-Yves Chibon 6d49b8
Pierre-Yves Chibon 6d49b8
{% endblock %}