Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #191 from poupotte/development
Browse files Browse the repository at this point in the history
Don't submit register request multiple times, refs #174
  • Loading branch information
Frank Rousseau committed Oct 16, 2015
2 parents cb02a9d + 29d91af commit cb0370a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion client/app/views/register/preset.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ module.exports = class RegisterPresetView extends FormView
@initForm()
@initErrors()

# Step valve
@onStep = @model.get('step').sampledBy(@form).map (step) ->
step is 'preset'
.toProperty()


# Set the next button enable state when all required fields are filled
@model.nextEnabled.plug @required.changes()

# Create a new stream from the submit one that is filtered onto the step
# (e.g. the form will not be submitted if we're already not in the step)
submit = @form.filter => @model.get('step').map (cur) -> cur is 'preset'
submit = @form.filter @onStep
# We plug it to the signup stream and to the next button busy state (e.g
# the busy state is enable when the form is submitted)
@model.signup.plug submit
Expand Down
2 changes: 1 addition & 1 deletion server/views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends layouts/_base

block title
title Cozy - Your Private Personal Cloud
meta(name="description", content="Cozy is an app-based personal cloud you can host at home. It allows you to own and connect your data. It turns a low-cost piece of hardware like a Raspberry Pi 2 or an online VPS into a powerful app platform. It comes with common applications like a contacts manager, calendar, webmail and filebox."
meta(name="description", content="Cozy is an app-based personal cloud you can host at home. It allows you to own and connect your data. It turns a low-cost piece of hardware like a Raspberry Pi 2 or an online VPS into a powerful app platform. It comes with common applications like a contacts manager, calendar, webmail and filebox.")


block content
Expand Down

0 comments on commit cb0370a

Please sign in to comment.