Commit 996bf0e7898d7b5e5efc8052e50019285fd04ddc

Authored by filipecmedeiros
1 parent 78a15e90

Adding summernote on replicate course [Issue #232]

core/migrations/0004_auto_20161110_1215.py 0 → 100644
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-11-10 15:15
  3 +from __future__ import unicode_literals
  4 +
  5 +import django.contrib.postgres.fields.jsonb
  6 +from django.db import migrations
  7 +
  8 +
  9 +class Migration(migrations.Migration):
  10 +
  11 + dependencies = [
  12 + ('core', '0003_auto_20161101_1457'),
  13 + ]
  14 +
  15 + operations = [
  16 + migrations.AlterField(
  17 + model_name='log',
  18 + name='context',
  19 + field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, verbose_name='Context'),
  20 + ),
  21 + ]
courses/templates/course/replicate.html
@@ -13,9 +13,10 @@ @@ -13,9 +13,10 @@
13 {% block content %} 13 {% block content %}
14 <div class="card card-content"> 14 <div class="card card-content">
15 <div class="card-body"> 15 <div class="card-body">
16 - <form method="post" action="" enctype="multipart/form-data">{% csrf_token %} 16 + <form method="post" action="" enctype="multipart/form-data">
  17 + {% csrf_token %}
17 <div class="form-group is-fileinput"> 18 <div class="form-group is-fileinput">
18 - <label for="id_name">{% trans 'Name' %}</label> 19 + <label for="id_name">{% trans 'Name' %}</label>
19 20
20 21
21 <input class="form-control" id="id_name" maxlength="100" name="name" type="text" required="" value="{{course.name}}"> 22 <input class="form-control" id="id_name" maxlength="100" name="name" type="text" required="" value="{{course.name}}">
@@ -27,7 +28,7 @@ @@ -27,7 +28,7 @@
27 <div class="form-group is-fileinput"> 28 <div class="form-group is-fileinput">
28 <label for="id_objectivies">{% trans 'Objectives' %}</label> 29 <label for="id_objectivies">{% trans 'Objectives' %}</label>
29 30
30 - <textarea class="form-control" cols="80" id="id_objectivies" name="objectivies" rows="5">{{course.objectivies}}</textarea> 31 + <textarea class="form-control" cols="80" id="id_objectivies" name="objectivies" rows="5">{{ course.objectivies }}</textarea>
31 32
32 <span class="help-block">{% trans 'Course objective' %}</span> 33 <span class="help-block">{% trans 'Course objective' %}</span>
33 34
@@ -123,7 +124,7 @@ @@ -123,7 +124,7 @@
123 124
124 <span class="help-block">{% trans 'CourseCategory which the course belongs' %}</span> 125 <span class="help-block">{% trans 'CourseCategory which the course belongs' %}</span>
125 126
126 - </div> 127 + </div>
127 128
128 <div class="row text-center"> 129 <div class="row text-center">
129 <input type="submit" value="Create" class="btn btn-primary btn-raised"> 130 <input type="submit" value="Create" class="btn btn-primary btn-raised">
@@ -131,5 +132,11 @@ @@ -131,5 +132,11 @@
131 </form> 132 </form>
132 </div> 133 </div>
133 </div> 134 </div>
  135 + <script>
  136 + $(document).ready(function() {
  137 + $('#id_objectivies').summernote();
  138 + $('#id_content').summernote();
  139 + });
  140 + </script>
134 </br></br></br> 141 </br></br></br>
135 {% endblock %} 142 {% endblock %}