Add name field i beta program

This commit is contained in:
HenryGBC 2017-03-30 20:21:15 -04:30
parent 9c2c0e9a73
commit 80ecb963b3
6 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-03-31 00:38
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('datacenterlight', '0004_betaaccessvm'),
]
operations = [
migrations.AddField(
model_name='betaaccess',
name='name',
field=models.CharField(default='name', max_length=250),
preserve_default=False,
),
]

View File

@ -14,6 +14,7 @@ class BetaAccessVMType(models.Model):
class BetaAccess(models.Model): class BetaAccess(models.Model):
email = models.CharField(max_length=250) email = models.CharField(max_length=250)
name = models.CharField(max_length=250)
# vm = models.ForeignKey(BetaAccessVM) # vm = models.ForeignKey(BetaAccessVM)
def __str__(self): def __str__(self):

View File

@ -227,4 +227,7 @@ a#forgotpassword {
.btn-buynow { .btn-buynow {
background-color: #607D8B; background-color: #607D8B;
border-color: #607D8B; border-color: #607D8B;
}
.form-300{
width: 300px;
} }

File diff suppressed because one or more lines are too long

View File

@ -46,10 +46,15 @@
</div> </div>
{% endfor %} {% endfor %}
<p class="total">At a monthly total of <span id="valueTotal">0</span>chf per day</p> <p class="total">At a monthly total of <span id="valueTotal">0</span>chf per day</p>
<div class="form-group row email align-items-center"> <div class="form-group">
<label for="example-email-input" class="col-form-label">You can reach me at</label> <label for="example-email-input" class="col-form-label">You can reach me at</label>
<div> <div class="form-group form-300">
<input class="form-control" name="email" type="email" placeholder="email" id="example-email-input"> <label for="email" class="col-form-label">Email</label>
<input class="form-control" name="email" type="email" placeholder="Your email" id="example-email-input">
</div>
<div class="form-group form-300">
<label for="name" class="col-form-label">Name</label>
<input class="form-control" name="name" type="text" placeholder="Your name" id="name">
</div> </div>
</div> </div>
<div class="notice"> <div class="notice">

View File

@ -40,6 +40,7 @@ class BetaProgramView(CreateView):
context = { context = {
'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()),
'email': data.get('email'), 'email': data.get('email'),
'name': data.get('name'),
'vms': vms 'vms': vms
} }