-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ #1795 - feat: implement drag-and-drop enabled file input.
- Loading branch information
1 parent
bc2b406
commit 8bcc307
Showing
20 changed files
with
330 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 12 additions & 17 deletions
29
src/open_inwoner/components/templates/components/Form/FileInput.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
{% load i18n form_tags icon_tags %} | ||
|
||
<div class="form__control {{ extra_classes|default:"upload" }}"> | ||
<div class="inputfile-group"> | ||
<label class="label"> | ||
<span class="input-file"> | ||
<p>{% icon icon="upload" icon_position="before" outlined=True %}</p> | ||
{% load i18n button_tags card_tags form_tags icon_tags %} | ||
|
||
{{ field|addclass:"inputfile" }} | ||
{# appended HTML #} | ||
{# <input type="file" name="file" class="inputfile" required="" id="id_file" data-max-size="13000">#} | ||
<div class="form__control file-input"> | ||
{% render_card direction="vertical" %} | ||
{% icon icon="upload" icon_position="before" outlined=True %} | ||
<input class="file-input__input" id="{{ field.auto_id }}" name="file" type="file"> | ||
{% button primary=True tag='label' text=text|default:_('Sleep of selecteer bestand') extra_attributes='for='|add:field.auto_id %} | ||
{% endrender_card %} | ||
|
||
<span class="label__label cloud" for="{{ field.auto_id }}"> | ||
{{ text }} | ||
</span> | ||
</span> | ||
{% if field.help_text %}<p class="p p--muted p--small">{{ field.help_text }}</p>{% endif %} | ||
{% if field.errors %}{% errors errors=field.errors %}{% endif %} | ||
|
||
{% if field.errors %} | ||
{% errors errors=field.errors %} | ||
{% endif %} | ||
</label> | ||
<div class="file-list" aria-live="polite"> | ||
<h4 class="h4">{% trans 'Geselecteerd bestand'%}</h4> | ||
<ul class="file-list__list" aria-live="polite" data-label-delete="{% trans 'Verwijderen' %}"></ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.