Skip to content

Commit

Permalink
Migrate templates to Bootstrap 3 markup. Use Kotti's default means fo…
Browse files Browse the repository at this point in the history
…r success / error messages.
  • Loading branch information
disko committed Nov 11, 2014
1 parent 1c51a3d commit 4b02d09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
9 changes: 2 additions & 7 deletions kotti_contactform/templates/contactform-view-one-column.pt
Expand Up @@ -7,15 +7,10 @@
metal:use-macro="api.macro('kotti:templates/view/master.pt')">
<article metal:fill-slot="content" class="contactform-view content">
<h1>${api.context.title}</h1>
<p class="description">
<p class="lead">
${api.context.description}
</p>
${structure: api.context.body}
<div tal:condition="form">
${structure: form}
</div>
<div tal:condition="appstruct">
<p class="alert alert-success" i18n:translate="">Thanks for your submission!</p>
</div>
<div tal:condition="form" tal:content="structure form"></div>
</article>
</html>
15 changes: 5 additions & 10 deletions kotti_contactform/templates/contactform-view-two-columns.pt
Expand Up @@ -7,20 +7,15 @@
metal:use-macro="api.macro('kotti:templates/view/master.pt')">
<article metal:fill-slot="content" class="contactform-view content">
<h1>${api.context.title}</h1>
<p class="description">
<p class="lead">
${api.context.description}
</p>
<div class="row-fluid">
<div class="span5">
<div class="row">
<div class="col-md-6">
${structure: api.context.body}
</div>
<div class="span7">
<div tal:condition="form">
${structure: form}
</div>
<div tal:condition="appstruct">
<p class="alert alert-success" i18n:translate="">Thanks for your submission!</p>
</div>
<div class="col-md-6">
<div tal:condition="form" tal:content="structure form"></div>
</div>
</div>
</article>
Expand Down
1 change: 1 addition & 0 deletions kotti_contactform/views.py
Expand Up @@ -166,6 +166,7 @@ class SubmissionSchema(colander.MappingSchema):
try:
appstruct = form.validate(controls)
mail_submission(context, request, appstruct)
request.session.flash(_('Thanks for your submission!'), 'success')
except ValidationFailure, e:
appstruct = None
rendered_form = e.render()
Expand Down

0 comments on commit 4b02d09

Please sign in to comment.