Added CKEditor minimal input to application form

Still needs some tweaks with the tooltip.
This commit is contained in:
2014-07-15 20:27:08 +02:00
parent b0da77a020
commit e1ff6687ae
2 changed files with 20 additions and 8 deletions

View File

@@ -5,7 +5,7 @@
<div class="col-md-8"> <div class="col-md-8">
<h1>{{application.user.first_name}} {{application.user.last_name}}</h1> <h1>{{application.user.first_name}} {{application.user.last_name}}</h1>
<h4><i class="fa fa-map-marker"></i> {{application.city_country}}</h4> <h4><i class="fa fa-map-marker"></i> {{application.city_country}}</h4>
<p>{{application.bio_message}}</p> <p>{{application.bio_message|safe}}</p>
<div class="box"> <div class="box">
<i class="backicon fa fa-info-circle"></i> <i class="backicon fa fa-info-circle"></i>
<p> <p>

View File

@@ -8,23 +8,23 @@
<form class="form-horizontal" method="POST" action="{{url_for('apply')}}"> <form class="form-horizontal" method="POST" action="{{url_for('apply')}}">
<fieldset> <fieldset>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-group input-group-lg width-full"> <div class="input-group input-group-lg width-full">
<span class="input-group-addon"><i class="bf-network"></i></span> <span class="input-group-addon"><i class="bf-network"></i></span>
{{ form.network_profile(class='form-control', placeholder='e.g. http://blendernetwork.org/<name-surname>') }} {{ form.network_profile(class='form-control', placeholder='e.g. http://blendernetwork.org/<name-surname>') }}
<label class="control-label">Blender Network Profile (optional)</label> <label class="control-label">Blender Network Profile (optional)</label>
</div> </div>
<div class="input-group input-group-lg width-full"> <div class="input-group input-group-lg width-full">
<span class="input-group-addon"><i class="fa fa-globe"></i></span> <span class="input-group-addon"><i class="fa fa-globe"></i></span>
{{ form.website(class='form-control', placeholder='e.g. http://www.yourname.me') }} {{ form.website(class='form-control', placeholder='e.g. http://www.yourname.me') }}
<label class="control-label">Website</label> <label class="control-label">Website</label>
</div> </div>
<div class="input-group input-group-lg width-full"> <div class="input-group input-group-lg width-full">
<span class="input-group-addon"><i class="fa fa-map-marker"></i></span> <span class="input-group-addon"><i class="fa fa-map-marker"></i></span>
{{ form.city_country(class='form-control', placeholder='Where do you currently live/teach?') }} {{ form.city_country(class='form-control', placeholder='Where do you currently live/teach?') }}
<label class="control-label">City and Country</label> <label class="control-label">City and Country</label>
</div> </div>
<hr/> <hr/>
@@ -108,7 +108,7 @@
<hr/> <hr/>
<div class="input-group input-group-lg width-full"> <div class="input-group input-group-lg width-full">
{{ form.bio_message(class='form-control', placeholder='Tell us a bit about yourself and why you want to be a BFCT') }} {{ form.bio_message(class='form-control', id='editor1', placeholder='Tell us a bit about yourself and why you want to be a BFCT') }}
<label class="control-label">Biography or Personal Message</label> <label class="control-label">Biography or Personal Message</label>
</div> </div>
@@ -138,4 +138,16 @@
</div> </div>
</div> </div>
{% endblock %}
{% block footer_scripts %}
<script src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.0.1/ckeditor.js"></script>
<script type="text/javascript">
CKEDITOR.replace( 'editor1', {
removePlugins: 'toolbar, elementspath',
allowedContent: 'p h1 h2 strong em; a[!href];',
});
</script>
{% endblock %} {% endblock %}