newmediamonitoring/management/templates/management/newmedia-management-update-...

177 lines
11 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 'newmedia-management-update-toutiao' toutiao.id %}"
enctype="multipart/form-data">{% csrf_token %}
<div class="form-group">
<label class="form-label" for="code">头条号</label>
<div class="controls">
<input type="text" class="form-control" name="code"
value="{{ toutiao.code }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="toutiaoid">ID</label>
<div class="controls">
<input type="text" class="form-control" name="toutiaoid"
value="{{ toutiao.toutiaoid }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="alias">别名</label>
<div class="controls">
<input type="text" class="form-control" name="alias"
value="{{ toutiao.alias }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="organization">单位</label>
{# <div class="controls">#}
{# <select class="form-control" name="organization">#}
{# <option value="{{ toutiao.organization.id }}">{{ toutiao.organization.name }}</option>#}
{# {% for o in organization %}#}
{# <option value="{{ o.id }}">{{ o.name }}</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="organization" value="{{ toutiao.organization.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>
<div class="form-group">
<label class="form-label" for="image">图标
<div class="controls">
<input type="file" name="image"><img
src="{{ toutiao.image.url }}"
style="width: 80px;height: 80px;"
class="img-circle">
</div>
</label>
</div>
<div class="form-group">
<label class="form-label" for="status">状态</label>
<div class="controls">
<select class="form-control" name="status">
<option value="{{ toutiao.status }}">{{ toutiao.status }}</option>
{% for w in toutiao_status_choices_list %}
<option value="{{ w }}">{{ w }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="identificationcode">新媒体标识码</label>
<div class="controls">
<input type="text" class="form-control" name="identificationcode"
value="{{ toutiao.identificationcode }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="function">功能</label>
<div class="controls">
<input type="text" class="form-control" name="function"
value="{{ toutiao.function }}">
</div>
</div>
<div class="form-group">
<label class="form-label" for="articleurl">文章url</label>
<div class="controls">
<input type="text" class="form-control" name="articleurl"
value="{{ toutiao.articleurl }}">
</div>
</div>
<button type="submit" class="btn btn-success" style="margin-top: 50px">提交修改
</button>
</form>
</div>
</div>
</div>
</section>
</div>
</section>
</section>
<div class="chatapi-windows "></div>
</div>
</body>
{% endblock %}
{% block add_js %}
<script>
$(function () {
$('.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('/get/organization/' + '?' + $.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('/get/organization/' + '?' + $.param(params))
});
})
</script>
{% endblock %}