mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 03:53:13 -04:00
Add custom file upload component
The default browser file upload control is difficult to style, but looks totally out of place. This commit replaces it with one that has a GOV.UK style button, as a first step. Based heavily on this example: http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from flask import render_template
|
||||
from flask_wtf import Form
|
||||
from wtforms import StringField, PasswordField, TextAreaField, validators
|
||||
from wtforms import StringField, PasswordField, TextAreaField, FileField, validators
|
||||
from app.main import main
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ def styleguide():
|
||||
username = StringField(u'Username')
|
||||
password = PasswordField(u'Password', [validators.required()])
|
||||
message = TextAreaField(u'Message')
|
||||
file_upload = FileField('Upload a CSV file to add your recipients’ details')
|
||||
|
||||
form = FormExamples()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user