replicate.html
3.05 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
69
70
71
72
73
{% extends 'subject/index.html' %}
{% load static i18n permission_tags widget_tweaks %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'app:index' %}">{% trans 'Home' %}</a></li>
<li class="active">{% trans 'Replicate Subject' %}</li>
</ol>
{% endblock %}
{% 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>
<input class="form-control" id="id_name" maxlength="100" name="name" type="text" required="True" value="{{subject.name}}">
<span class="help-block">{% trans 'Subject name' %}</span>
</div>
<div class="form-group {% if subject.name.errors %} has-error{% endif %}">
<label for="{{ id_description }}" class="control-label label-static"> {% trans 'Description' %} </label>
<textarea class="form-control" id="id_description" name="description" type="text" required="">{{subject.description}}</textarea>
<span class="help-block">{% trans 'Subject Description' %}</span>
</div>
<div class="form-group {% if subject.name.errors %} has-error{% endif %}">
<label for="{{ id_init_date }}" class="control-label label-static"> {% trans 'Init date' %}</label>
<input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DA E_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}">
<span class="help-block">{% trans 'Subject init date' %}</span>
</div>
<div class="form-group {% if subject.name.errors %} has-error{% endif %}">
<label for="{{ id_end_date }}" class="control-label label-static"> {% trans 'End date' %}</label>
<input type="text" class="form-control date-picker" name="{{field.name}}" value="{{field.value|date:'SHORT_DA E_FORMAT'}}" min="{{now|date:'SHORT_DATE_FORMAT'}}">
<span class="help-block">{% trans 'Subject end date' %}</span>
</div>
<div class="form-group {% if subject.name.errors %} has-error{% endif %}">
<label for="{{ id_visible }}" class="control-label label-static"> {% trans 'Visible?' %} </label>
<input type="checkbox" class="form-control" id="id_visible" name="visible" required="true"/>
<span class="help-block">{% trans 'Is it visible?' %}</span>
</div>
</div>
<div class="col-lg-offset-4 col-lg-4">
<button type="submit" 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 %}