forked from crunk/distribusi-verse
crunk
3 years ago
10 changed files with 125 additions and 8 deletions
@ -0,0 +1,15 @@ |
|||
from flask_wtf import FlaskForm |
|||
from wtforms import SubmitField, SelectField |
|||
from distribusimodel import Distribusis |
|||
from usermodel import User |
|||
from flask_login import current_user |
|||
|
|||
|
|||
class SelectorForm(FlaskForm): |
|||
distribusis = SelectField(u'Your existing distribusi:') |
|||
|
|||
new = SubmitField("new") |
|||
|
|||
update = SubmitField("update") |
|||
|
|||
delete = SubmitField("delete") |
@ -0,0 +1,43 @@ |
|||
.selector-style { |
|||
padding: 0; |
|||
margin: 0; |
|||
border: 1px solid #ccc; |
|||
width: 120px; |
|||
border-radius: 3px; |
|||
overflow: hidden; |
|||
background-color: #fff; |
|||
background: #fff; |
|||
position: relative; |
|||
} |
|||
|
|||
.selector-style select { |
|||
padding: 5px 8px; |
|||
width: 130%; |
|||
border: none; |
|||
box-shadow: none; |
|||
background-color: transparent; |
|||
background-image: none; |
|||
-webkit-appearance: none; |
|||
-moz-appearance: none; |
|||
appearance: none; |
|||
} |
|||
|
|||
.selector-style:after { |
|||
top: 50%; |
|||
left: 85%; |
|||
border: solid transparent; |
|||
content: " "; |
|||
height: 0; |
|||
width: 0; |
|||
position: absolute; |
|||
pointer-events: none; |
|||
border-color: rgba(0, 0, 0, 0); |
|||
border-top-color: #000000; |
|||
border-width: 5px; |
|||
margin-top: -2px; |
|||
z-index: 100; |
|||
} |
|||
|
|||
.selector-style select:focus { |
|||
outline: none; |
|||
} |
@ -0,0 +1,21 @@ |
|||
<div id="distribusi" class="workflow"> |
|||
<h3>Welcome back to your Distribusi</h3> |
|||
<p>You have already uploaded a distribusi website, do you want to make a new one, update or delete?</p> |
|||
<form method="POST" enctype="multipart/form-data" action="{{ url_for('distribusi') }}"> |
|||
{{ selectorform.csrf_token }} |
|||
<select class="selector-style"> |
|||
{% for subfield in selectorform.distribusis %} |
|||
{{ subfield }} |
|||
{% endfor %} |
|||
</select> |
|||
<fieldset class="button required multiselect"> |
|||
{{ selectorform.new }} |
|||
</fieldset> |
|||
<fieldset class="button required multiselect"> |
|||
{{ selectorform.update }} |
|||
</fieldset> |
|||
<fieldset class="button required multiselect warning"> |
|||
{{ selectorform.delete }} |
|||
</fieldset> |
|||
</form> |
|||
</div> |
Loading…
Reference in new issue