Add custom form template

This commit is contained in:
Oliver Walters 2021-03-17 23:06:56 +11:00
parent 9a710ca28f
commit be30933bfa
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
{% extends "modal_form.html" %}
{% load inventree_extras %}
{% load i18n %}
{% block pre_form_content %}
<div class='alert alert-block alert-info'>
{% trans "Specify URL for downloading image" %}:
<ul>
<li>{% trans "Must be a valid image URL" %}</li>
<li>{% trans "Remote server must be accessible" %}</li>
<li>{% trans "Remote image must not exceed maximum allowable file size" %}</li>
</ul>
</div>
{% endblock %}

View File

@ -846,6 +846,7 @@ class PartImageDownloadFromURL(AjaxUpdateView):
model = Part
ajax_template_name = 'part/image_download.html'
form_class = part_forms.PartImageDownloadForm
ajax_form_title = _('Download Image')