Users using the Tequila login are invited to migrate to gitlab.epfl.ch. This instance will close for Tequila users by May 2020.

Commit bb659d11 authored by Timothée Floure's avatar Timothée Floure

Fix register field broken due to recent redesign

parent d6808246
Pipeline #1120 passed with stages
in 22 minutes and 49 seconds
......@@ -190,20 +190,20 @@ post '/register' => sub {
for my $field (@required_fields) {
if (!defined params->{$field} || params->{$field} eq '') {
flash message => "$field is required.";
return redirect '/login';
return redirect '/register';
}
}
# Validate mail address
unless (Email::Valid->address(params->{mail})) {
flash message => "Mail address is invalid.";
return redirect '/login';
return redirect '/register';
}
# Validate phone number
unless (params->{mobile} =~ /$mobile_regex/) {
flash message => "Phone number is invalid.";
return redirect '/login';
return redirect '/register';
}
# Parse selected unipoly projects
......
......@@ -25,7 +25,7 @@
<div class="col-6">
<div class="form-group">
<label for="last_name">Last name</label>
<input type="text" name="first_name" class="form-control" value="<% last_name %>"/>
<input type="text" name="last_name" class="form-control" value="<% last_name %>"/>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment