Skip to content

Commit

Permalink
Updating the functionality and fixed the layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtdb committed Mar 24, 2016
1 parent 437fe60 commit 8093eb0
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 83 deletions.
37 changes: 28 additions & 9 deletions src/main/java/be/boks/domain/Runner.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package be.boks.domain;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

Expand All @@ -23,7 +22,7 @@ public class Runner extends CouchDbDocument {

private String lastName;

private Integer age;
private LocalDate birthday;

private LocalDate entryDate;

Expand All @@ -49,6 +48,10 @@ public class Runner extends CouchDbDocument {

private boolean stofwisselingsZiekte;

private boolean bedrijvenKlassement;

private String bedrijf;

public String getFirstName() {
return firstName;
}
Expand All @@ -65,12 +68,12 @@ public void setLastName(String lastName) {
this.lastName = lastName;
}

public Integer getAge() {
return age;
public LocalDate getBirthday() {
return birthday;
}

public void setAge(Integer age) {
this.age = age;
public void setBirthday(LocalDate birthday) {
this.birthday = birthday;
}

public LocalDate getEntryDate() {
Expand Down Expand Up @@ -169,13 +172,29 @@ public void setStofwisselingsZiekte(boolean stofwisselingsZiekte) {
this.stofwisselingsZiekte = stofwisselingsZiekte;
}

public boolean isBedrijvenKlassement() {
return bedrijvenKlassement;
}

public void setBedrijvenKlassement(boolean bedrijvenKlassement) {
this.bedrijvenKlassement = bedrijvenKlassement;
}

public String getBedrijf() {
return bedrijf;
}

public void setBedrijf(String bedrijf) {
this.bedrijf = bedrijf;
}

@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
builder.append(this.address);
builder.append(this.categories);
builder.append(this.city);
builder.append(this.age);
builder.append(this.birthday);
builder.append(this.emailAddress);
builder.append(this.entryDate);
builder.append(this.firstName);
Expand All @@ -195,7 +214,7 @@ public boolean equals(Object obj) {
builder.append(this.address, runner.address);
builder.append(this.categories, runner.categories);
builder.append(this.city, runner.city);
builder.append(this.age, runner.age);
builder.append(this.birthday, runner.birthday);
builder.append(this.emailAddress, runner.emailAddress);
builder.append(this.entryDate, runner.entryDate);
builder.append(this.firstName, runner.firstName);
Expand All @@ -215,7 +234,7 @@ public String toString() {
builder.append("address", this.address);
builder.append("category", this.categories);
builder.append("city", this.city);
builder.append("dateOfBirth", this.age);
builder.append("dateOfBirth", this.birthday);
builder.append("emailAddress", this.emailAddress);
builder.append("entryDate", this.entryDate);
builder.append("firstName", this.firstName);
Expand Down
29 changes: 16 additions & 13 deletions src/main/resources/static/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
}

.runs {
border-bottom: 2px solid #365c44;
text-decoration:underline;
/*border-bottom: 2px solid #365c44;*/
width: 350px;
padding-bottom: 1px;
height: 150px;
margin-bottom: 20px;
}

.text-center {
Expand Down Expand Up @@ -70,13 +69,17 @@
overflow-x: hidden;
}

.full button span {
background-color: limegreen;
border-radius: 32px;
color: black;
}
.partially button span {
background-color: orange;
border-radius: 32px;
color: black;
}
.full button span {
background-color: limegreen;
border-radius: 32px;
color: black;
}
.partially button span {
background-color: orange;
border-radius: 32px;
color: black;
}

.error {
color: red !important;
}
Binary file added src/main/resources/static/img/beveren-leeft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ <h1><img src="img/runner.png"> Runs</h1>
<span class="extrainfo bedrijvenklassement">(incl. bedrijvenklassement)</span>
</div>
<div class="opbrengst">
<img src="img/profit.png" />Opbrengst gaat integraal naar BOKS<img src="img/profit.png" />
<img src="img/profit.png" />Opbrengst gaat integraal naar BOKS vzw<img src="img/profit.png" />
</div>
<div class="sponsor">
<img src="img/beveren-leeft.png" />
<img src="img/sport-vlaanderen.png" />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/js/RunnerController.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$scope.openDialog = $uibModal.open({
templateUrl : 'templates/form.html',
controller: 'RegistrationController',
size : 'lg'
size : 'md'
});
}

Expand Down
147 changes: 88 additions & 59 deletions src/main/resources/static/templates/form.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,95 @@
<div>
<h1>Registreer.</h1>

<form class="form-horizontal">
<span>
<input class="form-control input-md" id="firstname" data-ng-model="firstname" placeholder="Voornaam" />
</span>
<span>
<input class="form-control input-md" id="name" data-ng-model="name" placeholder="Naam" />
</span>
<span>
<input class="form-control input-md" id="street" data-ng-model="street" placeholder="Straatnaam en huisnummer" />
</span>
<span>
<input class="form-control input-md" id="town" data-ng-model="town" placeholder="Gemeente" />
</span>
<span>
<select class="form-control input-md" id="gender" data-ng-model="gender">
<option value="" disabled selected>Geslacht</option>
<option value="MAN">Man</option>
<option value="VROUW">Vrouw</option>
</select>
</span>
<span>
<select class="form-control input-md" id="category" data-ng-model="category" multiple="multiple">
<option value="" disabled selected>Categorie</option>
<option value="kids_run_1">Kids run 1</option>
<option value="kids_run_2">Kids run 2</option>
<option value="rolstoelrace">Rolstoelrace</option>
<option value="handbikerace">Handbike race</option>
<option value="5km">5km</option>
<option value="10km">10km</option>
</select>
</span>
<span>
<input class="form-control input-md" id="club" data-ng-model="club" placeholder="Loopclub" />
</span>
<span>
<input type="text" class="form-control" placeholder="Leeftijd" uib-datepicker-popup="dd-MM-yyyy" ng-model="age" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" ng-click="open1()" />
</span>
<span>
<input class="form-control input-md" id="email" data-ng-model="email" placeholder="E-mail adres" />
</span>
<div class="checkbox form-checkbox">
<label><input id="boksLid" data-ng-model="boksLid" type="checkbox">Boks lid</label>
</div>
<div class="checkbox form-checkbox">
<label><input id="stofwisselingsZiekte" data-ng-model="stofwisselingsZiekte" type="checkbox">Stofwisselingsziekte</label>
<div>
<div class="modal-header">
<h1>Registreer.</h1>
</div>
<form name="registrationForm" novalidate>
<div class="modal-body">
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.firstname.$touched">
<span class="error" ng-show="registrationForm.firstname.$error.required">Voornaam is vereist!</span>
</p>
<input class="form-control input-md" id="firstname" name="firstname" data-ng-model="firstname" placeholder="Voornaam" required />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.name.$touched">
<span class="error" ng-show="registrationForm.name.$error.required">Familienaam is vereist!</span>
</p>
<input class="form-control input-md" id="name" data-ng-model="name" name="name" placeholder="Naam" required />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.street.$touched">
<span class="error" ng-show="registrationForm.street.$error.required">Straat en huisnummer zijn vereist!</span>
</p>
<input class="form-control input-md" id="street" data-ng-model="street" name="street" placeholder="Straatnaam en huisnummer" required />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.town.$touched">
<span class="error" ng-show="registrationForm.town.$error.required">Gemeente is vereist!</span>
</p>
<input class="form-control input-md" id="town" data-ng-model="town" name="town" placeholder="Gemeente" required />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.gender.$touched">
<span class="error" ng-show="registrationForm.gender.$error.required">Geslacht is vereist!</span>
</p>
<select class="form-control input-md" id="gender" data-ng-model="gender" name="gender" required>
<option value="" disabled selected>Geslacht</option>
<option value="MAN">Man</option>
<option value="VROUW">Vrouw</option>
</select>
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.category.$touched">
<span class="error" ng-show="registrationForm.category.$error.required">Categorie is vereist!</span>
</p>
<select class="form-control input-md" id="category" data-ng-model="category" name="category" multiple="multiple" required>
<option value="" disabled selected>Categorie</option>
<option value="kids_run_1">Kids run 1</option>
<option value="kids_run_2">Kids run 2</option>
<option value="rolstoelrace">Rolstoelrace</option>
<option value="handbikerace">Handbike race</option>
<option value="5km">5km</option>
<option value="10km">10km</option>
</select>
</p>
<p>
<input class="form-control input-md" id="club" data-ng-model="club" placeholder="Loopclub" />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.birthday.$touched">
<span class="error" ng-show="registrationForm.birthday.$error.required">Geboortedatum is vereist!</span>
</p>
<input type="text" class="form-control input-md" placeholder="Geboortedatum" name="birthday" id="birthday" data-ng-model="birthday" required />
</p>
<p>
<p role="alert" ng-show="registrationForm.$submitted || registrationForm.email.$touched">
<span class="error" ng-show="registrationForm.email.$error.required">E-mail adres is vereist!</span>
</p>
<input class="form-control input-md" id="email" data-ng-model="email" name="email" type="email" placeholder="E-mail adres" required />
</p>
<div class="checkbox form-checkbox">
<label><input id="boksLid" data-ng-model="boksLid" type="checkbox">Boks lid</label>
</div>
<div class="checkbox form-checkbox">
<label><input id="stofwisselingsZiekte" data-ng-model="stofwisselingsZiekte" type="checkbox">Stofwisselingsziekte</label>
</div>
</div>

<div class="button-center">
<button class="btn btn-primary btn-md form-button"
data-ng-click="create(firstname, name, street, town, gender, club, age, email, category, boksLid, stofwisselingsZiekte)">
<span data-ng-hide="saving">Registreren</span> <i
class="fa fa-spinner fa-spin" data-ng-show="saving"></i>
</button>
<button class="btn btn-primary btn-md form-button" data-ng-click="annuleer();">
<span>Annuleren</span>
</button>
<div class="modal-footer">
<div class="button-center">
<button class="btn btn-primary btn-md form-button"
data-ng-click="create(firstname, name, street, town, gender, club, age, email, category, boksLid, stofwisselingsZiekte)">
<span data-ng-hide="saving">Registreren</span> <i
class="fa fa-spinner fa-spin" data-ng-show="saving"></i>
</button>
<button class="btn btn-primary btn-md form-button" data-ng-click="annuleer();">
<span>Annuleren</span>
</button>
</div>
</div>
</form>

<div class="{{class}}" data-ng-cloak="" data-ng-show="result">
{{result}}
</div>
</div>
</div>
</div>

0 comments on commit 8093eb0

Please sign in to comment.