Skip to content

Commit

Permalink
Fix double template application problem in the default project template.
Browse files Browse the repository at this point in the history
  • Loading branch information
mightybyte committed Jul 19, 2012
1 parent 2caefe7 commit f41a4c2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
9 changes: 9 additions & 0 deletions project_template/default/snaplets/heist/templates/_login.tpl
@@ -0,0 +1,9 @@
<h1>Snap Example App Login</h1>

<p><loginError/></p>

<bind tag="postAction">/login</bind>
<bind tag="submitText">Login</bind>
<apply template="userform"/>

<p>Don't have a login yet? <a href="/new_user">Create a new user</a></p>
@@ -0,0 +1,5 @@
<h1>Register a new user</h1>

<bind tag="postAction">/new_user</bind>
<bind tag="submitText">Add User</bind>
<apply template="userform"/>
Expand Up @@ -13,7 +13,7 @@
</ifLoggedIn>

<ifLoggedOut>
<apply template="login"/>
<apply template="_login"/>
</ifLoggedOut>

</apply>
10 changes: 1 addition & 9 deletions project_template/default/snaplets/heist/templates/login.tpl
@@ -1,11 +1,3 @@
<apply template="base">
<h1>Snap Example App Login</h1>

<p><loginError/></p>

<bind tag="postAction">/login</bind>
<bind tag="submitText">Login</bind>
<apply template="userform"/>

<p>Don't have a login yet? <a href="/new_user">Create a new user</a></p>
<apply template="_login"/>
</apply>
@@ -1,9 +1,3 @@
<apply template="base">

<h1>Register a new user</h1>

<bind tag="postAction">/new_user</bind>
<bind tag="submitText">Add User</bind>
<apply template="userform"/>

<apply template="_new_user" />
</apply>
2 changes: 2 additions & 0 deletions snap.cabal
Expand Up @@ -27,7 +27,9 @@ extra-source-files:
project_template/default/static/screen.css,
project_template/default/snaplets/heist/templates/base.tpl,
project_template/default/snaplets/heist/templates/index.tpl,
project_template/default/snaplets/heist/templates/_login.tpl,
project_template/default/snaplets/heist/templates/login.tpl,
project_template/default/snaplets/heist/templates/_new_user.tpl,
project_template/default/snaplets/heist/templates/new_user.tpl,
project_template/default/snaplets/heist/templates/userform.tpl,
project_template/default/src/Application.hs,
Expand Down

0 comments on commit f41a4c2

Please sign in to comment.