Changes style to better fit in with bootstrap

EmailTemplateFixes
Denis Krienbühl 2011-12-15 16:21:45 +01:00
parent b7f997dc10
commit 2eed37c0d6
5 changed files with 79 additions and 25 deletions

View File

@ -67,11 +67,13 @@
</div>
<div class="row">
<div class="span16">
<div class="span1">&nbsp;</div>
<div class="span14">
{% block content %}
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud execitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
{% endblock %}
</div>
<div class="span1">&nbsp;</div>
</div>
</div>
</div>

View File

@ -18,7 +18,7 @@
{% if not forloop.last or not forloop.first %}
<b>{{ forloop.counter }}.</b>
{% endif %}
<input type="input" name="{{ key }}" size="50" value="{{ value }}">
<input type="text" name="{{ key }}" size="50" value="{{ value }}">
</li>
{% endfor %}
{% endif %}

View File

@ -32,7 +32,7 @@
<!-- comment -->
{% if qdict.hascomment %}
<li>
<input type="input" id="{{ question.number }}_comment" name="question_{{ question.number }}_comment" value="{{ qdict.comment }}" size="50" {{ qdict.checks|safe }} placeholder="{% trans 'comment' %}">
<input type="text" id="{{ question.number }}_comment" name="question_{{ question.number }}_comment" value="{{ qdict.comment }}" size="50" {{ qdict.checks|safe }} placeholder="{% trans 'comment' %}">
<span class="help-block">{{ question.extra }}</span>
</li>
{% endif %}

View File

@ -19,16 +19,65 @@
{% endblock %}
{% block styleextra %}
.required .qnumber {
.required {
font-weight: bold;
}
.qnumber {
font-weight: bold;
}
.question-text {
font-size: 1.3em;
}
.answer label {
font-size: 14px !important;
}
div.input {
margin-left: 35px;
}
.answer {
margin: 5px 0 25px 0;
padding: 0;
border-top: 1px solid #dadada;
}
div.input input[type="text"], div.input textarea, div.input select {
margin: 8px 0 0 0;
}
ul.inputs-list input[type="text"] {
margin: 5px 0;
}
.questionset-title {
margin: 0 0 25px 0;
}
img.percentImage {
background: white url(/static/progress/percentImage_back4.png) top left no-repeat;
padding: 0;
margin: 5px 0 0 0;
background-position: 1px 0;
}
.error {
margin: 10px 0;
}
.back-link {
margin-top: -68px;
margin-left: 25px;
position: absolute;
}
.questionset-submit {
margin-top: 60px;
}
{% endblock %}
{% block content %}
@ -40,7 +89,9 @@
</p>
{% endif %}
<div class="questionset-title">
{{ questionset.text|textile }}
</div>
<form name="qform" id="qform" action="{{ request.path }}" method="POST">
@ -49,11 +100,7 @@
{% for question, qdict in qlist %}
{% with errors|dictget:question.number as error %}
<div class="question type_{{ qdict.qtype }} container{% if error %} error prepend-top{% endif %}{{ qdict.qnum_class }}{{ qdict.qalpha_class }}" id="qc_{{ question.number }}" {{qdict.checkstring|safe}}>
{% if error %}<b>* {{ error }}</b><br />{% endif %}
<div class="question type_{{ qdict.qtype }} {% if error %} error prepend-top{% endif %}{{ qdict.qnum_class }}{{ qdict.qalpha_class }}" id="qc_{{ question.number }}" {{qdict.checkstring|safe}}>
{% if request.user.is_staff %}
<span class="pull-right">
<a href="/admin/questionnaire/question/{{ question.id }}/">
@ -63,32 +110,37 @@
{% endif %}
{% if qdict.custom %}
{% if error %}
<div class="error">
{{ error }}
</div>
{% endif %}
{% include qdict.template %}
{% else %}
<div class="question-text {% if qdict.required %}required{% endif %}">
<span class="qnumber">{{ question.display_number }}.</span>
{{ question.text }}
</div>
<div> <!-- container -->
{% include qdict.template %}
</div> <!-- /container -->
<div class="answer">
{% if error %}
<div class="alert-message block-message error input"><strong>{{ error }}</strong></div>
{% endif %}
{% include qdict.template %}
</div>
{% endif %}
</div> <!-- /question container -->
{% endwith %}
{% endfor %}
<br />
<div style="text-align:center; margin-bottom: 0.5em;">
<input name="submit" type="submit" value="{% trans "Continue" %}">
<div style="text-align: center;" class="well questionset-submit">
<input class="btn large primary" name="submit" type="submit" value="{% trans "Continue" %}">
</div>
{% if questionset.prev %}
<a href="javascript:history.back();" title="">
Return to previous page
</a>
<a class="back-link pull-left" href="javascript:history.back();">{% trans "return to previous page" %}</a>
{% endif %}
</form>

View File

@ -1,6 +1,6 @@
<div class="clearfix">
<div class="input">
<select onchange="valchanged('{{ question.number }}', this.options[this.selectedIndex].value);" name="question_{{ question.number }}" style="margin-top: 1em">
<select onchange="valchanged('{{ question.number }}', this.options[this.selectedIndex].value);" name="question_{{ question.number }}">
{% for x in qdict.range %}
<option value="{{ x }}" {% ifequal qdict.selected x %}selected{% endifequal %}>&nbsp;&nbsp;{{ x }}&nbsp;&nbsp;</option>
{% endfor %}