newmediamonitoring/management/templates/management/group-user-create.html

119 lines
5.9 KiB
HTML

{% extends 'dashboard/base/base.html' %}
{% load static %}
{% block content %}
<body class=" ">
<!-- START TOPBAR -->
<!-- START CONTAINER -->
<div class="page-container row-fluid">
<div class="page-sidebar ">
{% include 'dashboard/base/left.html' %}
</div>
<section id="main-content" class=" ">
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
{% if messages %}
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
{% for message in messages %}
{{ message }}.<br/>
{% endfor %}
</div>
{% endif %}
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
<div class="page-title">
<div class="pull-left">
<h1 class="title">添加矩阵成员</h1></div>
</div>
</div>
<div class="clearfix"></div>
<div class="col-lg-12 col-md-12 col-xs-12 col-sm-12">
<section class="box ">
<header class="panel_header">
<h2 class="title pull-left">矩阵成员表单</h2>
</header>
<div class="content-body">
<div class="row">
<div class="col-md-8 col-sm-9 col-xs-10">
<form method="post"
action="{% url 'group-user-create' pk %}"
enctype="multipart/form-data">{% csrf_token %}
<div class="form-group">
<label class="form-label" for="name">矩阵名称</label>
<div class="controls">
<input type="text" class="form-control" name="name" disabled
value="{{ group }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="user">成员</label>
{# <div class="controls">#}
{# <select class="form-control" name="user">#}
{# {% for u in usee %}#}
{# <option value="{{ u.id }}">#}
{# {% for i in u.userprofile_set.all %}#}
{# {{ i.name }}----{{ u.username }}----{{ i.organization }}#}
{# {% endfor %}#}
{# </option>#}
{# {% endfor %}#}
{# </select>#}
{# </div>#}
<div class="input-group main-search">
<input type="text" class="form-control" placeholder="请输入关键字"
style="height: 40px;width: 550px;opacity: .9 "
name="user_name">
<div class="input-group-btn" style="display: none">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</div>
</div>
<div class="autocomplete-panel" style="z-index: 9999">
</div>
</div>
<button type="submit" class="btn btn-success">点击创建</button>
</form>
</div>
</div>
</div>
</section>
</div>
</section>
</section>
<div class="chatapi-windows "></div>
</div>
</body>
{% endblock %}
{% block add_js %}
<script>
$('.main-search input').focus(function (e) {
e.preventDefault();
$("#history_query").hide()
var width = $(this).width();
var position = $(this).position();
var val = $(this).val();
var params = {keyword: val}
if (val) {
$('.autocomplete-panel').load('/management/get/user/' + '?' + $.param(params));
}
$('.autocomplete-panel').css({
width: width + 12,
top: position.top + 34,
left: position.left + 5
}).show();
}).blur(function (e) {
e.preventDefault();
}).on('input', function (e) {
var val = $(this).val();
var params = {keyword: val}
$('.autocomplete-panel').load('/management/get/user/' + '?' + $.param(params))
});
</script>
{% endblock %}