replicate.html
2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{% extends 'subject/index.html' %}
{% load static i18n permission_tags widget_tweaks django_bootstrap_breadcrumbs %}
{% block breadcrumbs %}
{{ block.super }}
{% breadcrumb 'Replicate subject' 'course:replicate_subject' %}
{% endblock breadcrumbs %}
{% block content %}
<div class="panel panel-default">
<div class="panel-body">
<form class="form-group " method="post" action="">
{% csrf_token %}
<div class="form-group {% if subject.name.errors %} has-error{% endif %}">
<label for="id_name" class="control-label label-static"> {% trans 'Name'%}</label>
<textarea class="form-control" id="id_name" maxlength="100" rows="1" name="name" placeholder="Name" type="text" required >{{subject.name}}</textarea>
<span class="help-block">{% trans 'Subject name'%}</span>
</div>
<div class="form-group">
<label for="id_description" class="control-label label-static"> {% trans 'Description'%}</label>
<textarea class="form-control" id="id_description" name="description" placeholder="Description" type="text" >{{subject.description}}</textarea>
<span class="help-block">{% trans 'Subject description'%}</span>
</div>
<div class="form-group">
<label for="id_init_date" class="control-label label-static"> {% trans 'Init date'%}</label>
<input type="text" class="form-control date-picker" name="init_date" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}">
<span class="help-block">{% trans 'Init date'%}</span>
</div>
<div class="form-group">
<label for="id_end_date" class="control-label label-static"> {% trans 'End date'%}</label>
<input type="text" class="form-control date-picker" name="end_date" value="{{field.value|date:'SHORT_DATE_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}">
<span class="help-block">{% trans 'End date'%}</span>
</div>
<div class="form-group">
<label for="id_visible" class="control-label label-static"> {% trans 'Visible'%}</label>
<input class="form-control" id="id_visible" name="visible" type="checkbox"/>
<span class="help-block">{% trans 'Is it visible?'%}</span>
</div>
<div class="col-lg-offset-4 col-lg-4">
<button type="submite" class="btn btn-raised btn-primary btn-lg btn-block">{% trans 'Replicate' %}</button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var locale = navigator.language || navigator.userLanguage;
$('.date-picker').datepicker({
language: locale,
});
$(document).ready(function() {
$('#id_description').summernote({height: 300});
});
</script>
{% endblock content %}