Changeset - d5952273ec1e
[Not reviewed]
version_5
0 2 0
Dennis Fink - 10 years ago 2015-10-11 18:54:06
dennis.fink@c3l.lu
Added country selection into donate page
2 files changed with 16 insertions and 6 deletions:
0 comments (0 inline, 0 general)
ennstatus/donate/views.py
Show inline comments
 
@@ -13,7 +13,7 @@ donate_page = Blueprint('donate', __name
 
@donate_page.route('/', methods=('GET', 'POST'))
 
def index():
 

	
 
    current_app.logger.info('Handling snailmail')
 
    current_app.logger.info('Handling index')
 
    form = BPMForm()
 
    country_choices = [choice[0] for choice in form.country.choices]
 

	
 
@@ -21,7 +21,7 @@ def index():
 
        current_app.logger.debug('Validating form')
 
        if form.validate_on_submit():
 
            country = form.country.data
 
            return redirect(url_for('donate.snailmail', country=country))
 
            return redirect(url_for('donate.index', country=country))
 
    else:
 
        if 'country' in request.args:
 
            country = request.args['country']
ennstatus/templates/donate/index.html
Show inline comments
 
@@ -63,16 +63,26 @@
 
          <h3>SnailMail</h3>
 
        </center>
 
        <div class="well well-sm">
 
          <div class="pull-right">
 
            <form class="form-inline" role="form" method="POST" action"{{ url_for('donate.index') }}">
 
              {{ form.hidden_tag() }}
 
              <div class="form-group">
 
                {{ form.country(_class="form-class") }}
 
              </div>
 
              <input type="submit" class="btn btn-primary btn-sm" value="Submit">
 
            </form>
 
          </div>
 
          <div class="clearfix"></div>
 
          <address>
 
            <strong>Frënn vun der Ënn, ASBL</strong><br>
 
                    BPM 381892<br>
 
                    34, Rue Gabriel Lippmann<br>
 
                    L-5365, Munsbach<br>
 
                    Luxembourg
 
                    {{ address['address'] }}<br>
 
                    {{ address['postal_code'] }}, {{ address['city'] }}<br>
 
                    {{ address['country'] }}
 
          </address>
 
        </div>
 
      </div>
 
      <div class="thumbnail">
 
      <div>
 
        <center>
 
          <h3>Bitcoin</h3>
 
        </center>
0 comments (0 inline, 0 general)