Skip to content

Commit

Permalink
updated form submission function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach-Richardson committed Sep 26, 2018
1 parent bf4fe1c commit 1872e27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ window.jQuery || (function() {

function addFormListener() {
jQuery('#forsta-form').submit(event => {
event.preventDefault();

var data = {
firstName: event.target[0].value,
lastName: event.target[1].value,
Expand Down
2 changes: 2 additions & 0 deletions client/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

function addFormListener() {
$('#forsta-form').submit(event => {
event.preventDefault();

data.firstName = event.target[0].value;
data.lastName = event.target[1].value;
data.email = event.target[2].value;
Expand Down
4 changes: 2 additions & 2 deletions server/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const root = `${__dirname}/..`;

let app = express();
app.get('/*', (req, res) => {
// if(req.headers["x-forwarded-proto"] !== "https")
// res.redirect('https://'+req.hostname+req.url);
if(req.headers["x-forwarded-proto"] !== "https")
res.redirect('https://'+req.hostname+req.url);
res.sendFile(req.params[0] || './client/index.html', {root})
});

Expand Down

0 comments on commit 1872e27

Please sign in to comment.