gitpad/templates/pages/gists/new/index.html

94 lines
2.6 KiB
HTML
Raw Normal View History

{% extends 'gistbase' %}
{% block gist_main %}
<form class="gist__new" action={{ page.gist.new }} method="POST" accept-charset="utf-8">
{% include "error_comp" %}
<label class="form__label" for="description">
Gist description
<input
class="form__input"
name="description"
autofocus
id="description"
type="text"
{% if payload.description %}
value={{ payload.description }}
{% endif %}
/>
</label>
{% for fieldname in fieldnames%}
{% set content = payload | nth(n=(loop.index - 1)) %}
<legend class="gist__file">
<label class="form__label" for={{ fieldname.filename }}>
File name with extension
<input
required
class="form__input"
name={{ fieldname.filename }}
autofocus
id={{ fieldname.filename }}
type="text"
value="{{ content.filename }}"
/>
</label>
<label class="form__label" for={{ fieldname.content }}>
<textarea
required
class="gist__file-content"
name={{ fieldname.content }}
id={{ fieldname.content }}
type="text"
>{{ content.content }}</textarea>
</label>
</legend>
{% endfor %}
<div class="gist__radio-group">
<label class="gist__radio-label" for={{ visibility_public }}>
<input
required
class="gist__radio-btn"
name="visibility"
id={{ visibility_public }}
type="radio"
value={{ visibility_public }}
/>
Public
</label>
<label class="gist__radio-label" for={{ visibility_unlisted }}>
<input
class="gist__radio-btn"
name="visibility"
id={{ visibility_unlisted }}
type="radio"
value={{ visibility_unlisted }}
/>
Unlisted
</label>
<label class="gist__radio-label" for={{ visibility_private }}>
<input
class="gist__radio-btn"
name="visibility"
id={{ visibility_private }}
type="radio"
value={{ visibility_private }}
/>
Private
</label>
</div>
<div class="gist__button-group">
<div class="gist__button-container">
<button
class="form__submit--secondary"
name="add_file"
value="true"
type="submit"
>Add File</button>
</div>
<div class="gist__button-container">
<button class="form__submit" type="submit">Create Gist</button>
</div>
</div>
</form>
{% endblock %}