summaryrefslogtreecommitdiffstats
path: root/askbot/templates/widgets/ask_form.html
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/templates/widgets/ask_form.html')
-rw-r--r--askbot/templates/widgets/ask_form.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/askbot/templates/widgets/ask_form.html b/askbot/templates/widgets/ask_form.html
new file mode 100644
index 00000000..d528609f
--- /dev/null
+++ b/askbot/templates/widgets/ask_form.html
@@ -0,0 +1,52 @@
+{% import "macros.html" as macros %}
+<form id="fmask" action="" method="post" >{% csrf_token %}
+ <div class="form-item">
+ <div id="askFormBar">
+ {% if not request.user.is_authenticated() %}
+<p>{% trans %}<span class=\"strong big\">You are welcome to start submitting your question anonymously</span>. When you submit the post, you will be redirected to the login/signup page. Your question will be saved in the current session and will be published after you log in. Login/signup process is very simple. Login takes about 30 seconds, initial signup takes a minute or less.{% endtrans %}</p>
+ {% else %}
+ {% if settings.EMAIL_VALIDATION %}
+ {% if not request.user.email_isvalid %}
+ {% trans email=request.user.email %}<span class='strong big'>Looks like your email address, %(email)s has not yet been validated.</span> To post messages you must verify your email, please see <a href='%(email_validation_faq_url)s'>more details here</a>.<br>You can submit your question now and validate email after that. Your question will saved as pending meanwhile.{% endtrans %}
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ <input id="id_title" class="questionTitleInput" name="title" autocomplete="off"
+ value="{% if form.initial.title %}{{form.initial.title|escape}}{% endif %}"/>
+ <span class="form-error">{{ form.title.errors }}</span>
+ </div>
+ <div class="title-desc">
+ {{ form.title.help_text }}
+ </div>
+ </div>
+ <div id='question-list'></div>
+ {{
+ macros.edit_post(
+ form,
+ post_type = 'question',
+ edit_title = False,
+ mandatory_tags = mandatory_tags,
+ use_category_selector = (settings.TAG_SOURCE == 'category-tree'),
+ editor_type = settings.EDITOR_TYPE,
+ user = request.user
+ )
+ }}
+ {{ form.group_id }}
+ <div class="question-options">
+ {% if settings.WIKI_ON %}
+ {{ macros.checkbox_in_div(form.wiki) }}
+ {% endif %}
+ {% if settings.ALLOW_ASK_ANONYMOUSLY %}
+ {{ macros.checkbox_in_div(form.ask_anonymously) }}
+ {% endif %}
+ {% if request.user.is_authenticated() and request.user.can_make_group_private_posts() %}
+ {{ macros.checkbox_in_div(form.post_privately) }}
+ {% endif %}
+ </div>
+ {% if not request.user.is_authenticated() %}
+ <input type="submit" name="post_anon" value="{% trans %}Login/Signup to Post{% endtrans %}" class="submit" />
+ {% else %}
+ <input type="submit" name="post" value="{% trans %}Ask Your Question{% endtrans %}" class="submit" />
+ {% endif %}
+ <div class="clean"></div>
+</form>