mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
36 lines
1.3 KiB
HTML
36 lines
1.3 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
|
|
{% block main %}
|
|
<ol class="breadcrumb">
|
|
<li><a href="{% url 'questions' %}">{% trans 'Questions' %}</a></li>
|
|
<li class="active">{% trans 'Ask Question' %}</li>
|
|
</ol>
|
|
<form action="{% url 'ask' %}" method="post" class="form-horizontal" role="form">
|
|
{% csrf_token %}
|
|
{% for field in form.visible_fields %}
|
|
<div class="form-group{% if field.errors %} has-error{% endif %}">
|
|
<label for="{{ field.label }}" class="col-sm-2 control-label">{{ field.label }}</label>
|
|
<div class="col-sm-10">
|
|
{% if field.label == 'Description' %}
|
|
{% include 'markdown_editor.html' with textarea='id_description' %}
|
|
{% endif %}
|
|
{{ field }}
|
|
{% if field.help_text %}
|
|
<span class="help-block">{{ field.help_text }}</span>
|
|
{% endif %}
|
|
{% for error in field.errors %}
|
|
<label class="control-label">{{ error }}</label>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<button type="submit" class="btn btn-primary">{% trans 'Post Your Question' %}</button>
|
|
<a href="{% url 'questions' %}" class="btn btn-default">{% trans 'Cancel' %}</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock main %}
|