Commit f0155466a956480ea8520987a15357b00df5e234
1 parent
f1b41749
Exists in
master
and in
5 other branches
[Issue #361]
Showing
1 changed file
with
41 additions
and
12 deletions
Show diff stats
courses/templates/subject/replicate.html
... | ... | @@ -14,20 +14,46 @@ |
14 | 14 | <div class="panel-body"> |
15 | 15 | <form class="form-group " method="post" action=""> |
16 | 16 | {% csrf_token %} |
17 | - {% for field in form %} | |
18 | - <div class="form-group {% if field.errors %} has-error{% endif %}"> | |
19 | - <label for="{{ field.auto_id }}" class="control-label label-static"> {{ field.label }}</label> | |
20 | - | |
21 | - {% if field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%} | |
22 | - <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'}}"> | |
23 | - {% else %} | |
24 | - {% render_field field class='form-control' placeholder=field.label%} | |
25 | - {% endif %} | |
26 | - <span class="help-block">{{ field.help_text }}</span> | |
17 | + | |
18 | + <div class="form-group {% if subject.name.errors %} has-error{% endif %}"> | |
19 | + <label for="{{ id_name }}" class="control-label label-static"> {% trans 'Name' %}</label> | |
20 | + <input class="form-control" id="id_name" maxlength="100" name="name" type="text" required="True" value="{{subject.name}}"> | |
21 | + <span class="help-block">{% trans 'Subject name' %}</span> | |
22 | + | |
23 | + </div> | |
24 | + | |
25 | + <div class="form-group {% if subject.name.errors %} has-error{% endif %}"> | |
26 | + <label for="{{ id_description }}" class="control-label label-static"> {% trans 'Description' %} </label> | |
27 | + <textarea class="form-control" id="id_description" name="description" type="text" required="">{{subject.description}}</textarea> | |
28 | + <span class="help-block">{% trans 'Subject Description' %}</span> | |
29 | + | |
30 | + </div> | |
31 | + | |
32 | + <div class="form-group {% if subject.name.errors %} has-error{% endif %}"> | |
33 | + <label for="{{ id_init_date }}" class="control-label label-static"> {% trans 'Init date' %}</label> | |
34 | + <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'}}"> | |
35 | + <span class="help-block">{% trans 'Subject init date' %}</span> | |
36 | + | |
37 | + </div> | |
38 | + | |
39 | + <div class="form-group {% if subject.name.errors %} has-error{% endif %}"> | |
40 | + <label for="{{ id_end_date }}" class="control-label label-static"> {% trans 'End date' %}</label> | |
41 | + <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'}}"> | |
42 | + <span class="help-block">{% trans 'Subject end date' %}</span> | |
43 | + | |
44 | + </div> | |
45 | + <div class="form-group {% if subject.name.errors %} has-error{% endif %}"> | |
46 | + <label for="{{ id_visible }}" class="control-label label-static"> {% trans 'Visible?' %} </label> | |
47 | + <input type="checkbox" class="form-control" id="id_visible" name="visible" required="true"/> | |
48 | + <span class="help-block">{% trans 'Is it visible?' %}</span> | |
49 | + | |
27 | 50 | </div> |
28 | - {% endfor %} | |
51 | + | |
52 | + | |
53 | + </div> | |
54 | + | |
29 | 55 | <div class="col-lg-offset-4 col-lg-4"> |
30 | - <button type="submite" class="btn btn-raised btn-primary btn-lg btn-block">{% trans 'Update' %}</button> | |
56 | + <button type="submit" class="btn btn-raised btn-primary btn-lg btn-block">{% trans 'Replicate' %}</button> | |
31 | 57 | </div> |
32 | 58 | </form> |
33 | 59 | |
... | ... | @@ -40,5 +66,8 @@ |
40 | 66 | $('.date-picker').datepicker({ |
41 | 67 | language: locale, |
42 | 68 | }); |
69 | + $(document).ready(function() { | |
70 | + $('#id_description').summernote({height: 300}); | |
71 | + }); | |
43 | 72 | </script> |
44 | 73 | {% endblock %} |
45 | 74 | \ No newline at end of file | ... | ... |