2021-09-28 23:37:24 +00:00
|
|
|
{% load i18n %}
|
2021-09-29 00:36:50 +00:00
|
|
|
{% load utilities %}
|
|
|
|
{% with 0|uuid as uuid %}
|
2021-09-28 23:37:24 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
|
|
|
|
|
|
|
{% if editable %}
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" for="id_name">{% trans "Name:" %}</label>
|
2021-09-29 00:36:50 +00:00
|
|
|
<input type="text" name="name" value="{{ form.name.value|default:'' }}" maxlength="100" class="input" required="" id="id_name">
|
2021-09-28 23:37:24 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<input type="hidden" name="name" required="true" value="{{ shelf.name }}">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="field">
|
2021-09-29 00:36:50 +00:00
|
|
|
<label class="label" for="id_description_{{ uuid }}">{% trans "Description:" %}</label>
|
|
|
|
<textarea name="description" cols="40" rows="5" maxlength="500" class="textarea" id="id_description_{{ uuid }}">{{ form.description.value|default:'' }}</textarea>
|
2021-09-28 23:37:24 +00:00
|
|
|
</div>
|
2022-03-10 18:49:33 +00:00
|
|
|
<div class="field has-addons is-justify-content-end">
|
2021-09-28 23:37:24 +00:00
|
|
|
<div class="control">
|
|
|
|
{% include 'snippets/privacy_select.html' with current=privacy %}
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-29 00:36:50 +00:00
|
|
|
{% endwith %}
|