forked from mirrors/bookwyrm
Updates modal
This commit is contained in:
parent
bae355e8d2
commit
bae01e1ea5
2 changed files with 13 additions and 10 deletions
|
@ -389,9 +389,14 @@
|
||||||
</div>
|
</div>
|
||||||
{% if can_edit_book %}
|
{% if can_edit_book %}
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
{% trans "Add link to copy" as button_text %}
|
|
||||||
{% url 'file-link' book.id as fallback_url %}
|
{% url 'file-link' book.id as fallback_url %}
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="edit_file_links" controls_uid=book.id focus="modal_title_edit_file_links" class="is-small" icon="plus" fallback_url=fallback_url %}
|
<button class="button is-small" type="button" data-modal-open="edit-links">
|
||||||
|
<span class="icon icon-plus">
|
||||||
|
<span class="is-sr-only">
|
||||||
|
{% trans "Add link to copy" %}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
|
@ -407,7 +412,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if can_edit_book %}
|
{% if can_edit_book %}
|
||||||
{% include 'book/file_link_modal.html' with book=book controls_text="edit_file_links" controls_uid=book.id %}
|
{% include 'book/file_link_modal.html' with book=book id="edit-links" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,11 +12,10 @@
|
||||||
{% block modal-body %}
|
{% block modal-body %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="book" value="{{ book.id }}">
|
<input type="hidden" name="book" value="{{ book.id }}">
|
||||||
<div class="field">
|
|
||||||
<label class="label" for="id_url">{% trans "Name:" %}</label>
|
<p class="notification">
|
||||||
{{ file_link_form.name }}
|
{% trans "Links from unknown domains will need to be approved by a moderator before they are added." %}
|
||||||
{% include 'snippets/form_errors.html' with errors_list=file_link_form.name.errors id="desc_name" %}
|
</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-four-fifths">
|
<div class="column is-four-fifths">
|
||||||
|
@ -36,8 +35,7 @@
|
||||||
{% block modal-footer %}
|
{% block modal-footer %}
|
||||||
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
||||||
{% if not static %}
|
{% if not static %}
|
||||||
{% trans "Cancel" as button_text %}
|
<button type="button" class="button" data-modal-close>{% trans "Cancel" %}</button>
|
||||||
{% include 'snippets/toggle/toggle_button.html' with text=button_text %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue