forked from cc-d/ieddit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_post.html
81 lines (70 loc) · 3.05 KB
/
create_post.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{% extends 'base.html' %}
{% block content %}
{% if postsub == None %}
{% set postsub = '' %}
{% endif %}
<form class="needs-validation new-post-form" novalidate method='post'>
<h5>URL</h5>
<div class="form-group border-top form-input-text">
<label for="create-post-url">Remote URL</label>
{% if sppf['url'] %}
<input name='url' type="text" class="form-control" id="create-post-url" value="{{ sppf['url'] }}">
{% else %}
<input name='url' type="text" class="form-control" id="create-post-url" placeholder="Example: https://ieddit.com">
{% endif %}
</div>
<div>
<h5>Self-Text<small> (if no url)</small></h5>
<div class="form-group border-top form-input-text">
<label for="create-post-text" >Self-Post Text</label>
{% if sppf['self_post_text'] %}
<textarea name='self_post_text' class="form-control form-input-text" id="create-post-text">{{ sppf['self_post_text'] }}</textarea>
{% else %}
<textarea name='self_post_text' class="form-control form-input-text" id="create-post-text" placeholder="Example: How are you doing today?"></textarea>
{% endif %}
</div>
<div class="form-group form-input-text border-top">
<div class="form-group form-input-text">
<label for="create-post-title">Title</label>
{% if sppf['title'] %}
<input name='title' type="text" class="form-control" id="create-post-title" value="{{ sppf['title'] }}">
{% else %}
<input name='title' type="text" class="form-control" id="create-post-title" placeholder="Example: Look at this site I found." maxlength="200">
{% endif %}
<a id='suggest-title' href="javascript:suggestTitle();"></a>
</div>
<label for="create-post-sub">Sub</label>
<div class="input-group mb-3">
{% if sppf['sub'] %}
<input name='sub' type="text" class="form-control" id="create-post-sub" placeholder="Example: baseball" value="{{ sppf['sub'] }}">
{% elif request.sub %}
<input name='sub' type="text" class="form-control" id="create-post-sub" placeholder="Example: baseball" value='{{ request.sub }}'>
{% else %}
<input name='sub' type="text" class="form-control" id="create-post-sub" placeholder="Example: baseball" value='{{ postsub }}'>
{% endif %}
<div class="input-group-prepend">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">select</button>
<div class="dropdown-menu" id='sub-drop-menu'>
<div id='menu-items'>
</div>
<input type='text' id='sub-dropdown-search' placeholder='search' onload='search()'>
</div>
</div>
</div>
<div class="captcha-div">
{% if config.CAPTCHA_ENABLE %}
{{ captcha() }}
<input type="text" id='captcha' name="captcha">
</div>
<br>
{% endif %}
<button type="submit" class="btn btn-primary btn-dark">Create Post</button>
<label for="anon-checkbox">anonymous?</label>
{% if session['anonymous'] %}
<input type='checkbox' name='anonymous' value='1' id="anon-checkbox" checked>
{% else %}
<input type='checkbox' name='anonymous' value='1' id="anon-checkbox">
{% endif %}
<br><br><br>
</form>
{% endblock %}