diff --git a/.DS_Store b/.DS_Store
index 643cb1c..fe71f83 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/app/forms.py b/app/forms.py
index 62cb3fe..211872c 100755
--- a/app/forms.py
+++ b/app/forms.py
@@ -11,13 +11,18 @@ class AuthorForm(NoCsrfForm):
# this forms is never exposed so we can user the non CSRF version
author_name = StringField('Author Name', validators=[DataRequired()])
-class UserForm(FlaskForm):
+class UploadForm(FlaskForm):
title = StringField('title', validators=[InputRequired()])
author = FieldList(FormField(AuthorForm, default=lambda: Author()), min_entries=1)
category = StringField('category', validators=[InputRequired()])
file = FileField()
+ upload = SubmitField(label='Upload')
+ wish = SubmitField(label='''I don't have the file, but wish I did.''')
-class UserForm_Edit(FlaskForm):
+class EditForm(FlaskForm):
title = StringField('title', validators=[InputRequired()])
author = FieldList(FormField(AuthorForm, default=lambda: Author()), min_entries=1)
category = StringField('category', validators=[InputRequired()])
+
+class SearchForm(FlaskForm):
+ search = StringField('', validators=[InputRequired()])
diff --git a/app/models.py b/app/models.py
index 5c63322..ea199b3 100755
--- a/app/models.py
+++ b/app/models.py
@@ -27,13 +27,12 @@ class Book(db.Model):
scapeX = db.Column(db.Numeric(10,2))
scapeY = db.Column(db.Numeric(10,2))
- def __init__(self, title, file, cover, fileformat, category, stack):
+ def __init__(self, title, file, cover, fileformat, category):
self.title = title
self.file = file
self.cover = cover
self.fileformat = fileformat
self.category = category
- self.stack = stack
self.scapeX = 0
self.scapeY = 0
diff --git a/app/static/css/style.css b/app/static/css/style.css
index f2d1914..f442e51 100755
--- a/app/static/css/style.css
+++ b/app/static/css/style.css
@@ -71,6 +71,34 @@ width: 500px;
font-size: 16px;
}
+.search input{
+margin: 0;
+float: left;
+width: 400px;
+height: 36px;
+font-size: 20px;
+font-weight: regular;
+padding: 2px;
+background:rgba(50, 50, 50, 0.2);
+border:0px;
+}
+
+.button {
+height:40px;
+font-size: 18px;
+padding:6px 15px;
+left:0px;
+border:0px solid #dbdbdb;
+background-color: grey;
+color:#fafafa;
+}
+
+.button:hover {
+background-color:red;
+color: #fafafa;
+}
+
+
.footer{
width: 100%;
diff --git a/app/templates/_formhelpers.html b/app/templates/_formhelpers.html
new file mode 100644
index 0000000..d4ad8c2
--- /dev/null
+++ b/app/templates/_formhelpers.html
@@ -0,0 +1,12 @@
+{% macro render_field(field) %}
+
{{ field.label }}
+
{{ field(**kwargs)|safe }}
+ {% if field.errors %}
+
+ {% for error in field.errors %}
+
{{ error }}
+ {% endfor %}
+
+ {% endif %}
+
+{% endmacro %}
\ No newline at end of file
diff --git a/app/templates/add_book.html b/app/templates/add_book.html
index 1fbb362..2121566 100755
--- a/app/templates/add_book.html
+++ b/app/templates/add_book.html
@@ -37,7 +37,8 @@