made signup TOS configurable
This commit is contained in:
parent
297df5d12f
commit
823d00ba8e
4 changed files with 10 additions and 2 deletions
|
@ -29,6 +29,7 @@ getSignupR = do
|
||||||
case block of
|
case block of
|
||||||
False -> do
|
False -> do
|
||||||
formLayout $ do
|
formLayout $ do
|
||||||
|
master <- getYesod
|
||||||
setTitle "Eidolon :: Signup"
|
setTitle "Eidolon :: Signup"
|
||||||
$(widgetFile "signup")
|
$(widgetFile "signup")
|
||||||
True -> do
|
True -> do
|
||||||
|
|
|
@ -70,6 +70,9 @@ data AppSettings = AppSettings
|
||||||
-- ^ Google Analytics code
|
-- ^ Google Analytics code
|
||||||
, appSignupBlocked :: Bool
|
, appSignupBlocked :: Bool
|
||||||
-- ^ block signup site
|
-- ^ block signup site
|
||||||
|
, appTos1 :: Text
|
||||||
|
, appTos2 :: Text
|
||||||
|
-- ^ Terms of Service
|
||||||
}
|
}
|
||||||
|
|
||||||
instance FromJSON AppSettings where
|
instance FromJSON AppSettings where
|
||||||
|
@ -97,6 +100,8 @@ instance FromJSON AppSettings where
|
||||||
appAnalytics <- o .:? "analytics"
|
appAnalytics <- o .:? "analytics"
|
||||||
|
|
||||||
appSignupBlocked <- o .: "signupBlocked"
|
appSignupBlocked <- o .: "signupBlocked"
|
||||||
|
appTos1 <- o .: "tos1"
|
||||||
|
appTos2 <- o .: "tos2"
|
||||||
|
|
||||||
return AppSettings {..}
|
return AppSettings {..}
|
||||||
|
|
||||||
|
|
|
@ -42,3 +42,5 @@ copyright: Insert copyright statement here
|
||||||
|
|
||||||
# block signup process
|
# block signup process
|
||||||
signupBlocked: "_env:SIGNUP_BLOCK:false"
|
signupBlocked: "_env:SIGNUP_BLOCK:false"
|
||||||
|
tos1: "Terms of Service 1"
|
||||||
|
tos2: "Terms of Service 2"
|
||||||
|
|
|
@ -11,10 +11,10 @@ $newline always
|
||||||
<input id="email" name="email" type="email" required>
|
<input id="email" name="email" type="email" required>
|
||||||
<p class="tos">
|
<p class="tos">
|
||||||
<input type="checkbox" id="tos-1" name="tos-1" value="tos-1" required>
|
<input type="checkbox" id="tos-1" name="tos-1" value="tos-1" required>
|
||||||
<label for="tos-1">terms of service 1
|
<label for="tos-1">#{appTos1 $ appSettings master}
|
||||||
<p class="tos">
|
<p class="tos">
|
||||||
<input type="checkbox" id="tos-2" name="tos-2" value="tos-2" required>
|
<input type="checkbox" id="tos-2" name="tos-2" value="tos-2" required>
|
||||||
<label for="tos-2">terms of service 2
|
<label for="tos-2">#{appTos2 $ appSettings master}
|
||||||
<input id="signup" type="submit" value="Signup">
|
<input id="signup" type="submit" value="Signup">
|
||||||
<script src="/static/js/jquery.min.js" type="text/javascript">
|
<script src="/static/js/jquery.min.js" type="text/javascript">
|
||||||
<script src="/static/js/signup.js" type="text/javascript">
|
<script src="/static/js/signup.js" type="text/javascript">
|
||||||
|
|
Loading…
Reference in a new issue