Skip to content

Commit

Permalink
Use the forms library that ships with PTB
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Dec 5, 2016
1 parent cbccf5c commit 4d700b0
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions formly/templates/formly/design/field_confirm_delete.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}

Expand All @@ -13,7 +13,7 @@ <h1>Delete Field</h1>
<legend>{{ field }}</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-danger">Delete</button>
Expand Down
6 changes: 3 additions & 3 deletions formly/templates/formly/design/field_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "formly/design/survey_edit_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}

Expand All @@ -12,7 +12,7 @@ <h1>Modify Field</h1>
<form action="{% url "formly_dt_field_update" pk=field.pk %}" method="post" class="well">
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<input type="hidden" name="action" value="field_update" />
Expand Down Expand Up @@ -62,7 +62,7 @@ <h3>Add Field</h3>
<form action="{% url "formly_dt_field_update" pk=field.pk %}" method="post">
{% csrf_token %}
<div class="modal-body">
{{ field_choice_form|as_bootstrap }}
{{ field_choice_form|bootstrap }}
</div>
<div class="modal-footer">
<input type="hidden" name="action" value="choice_add" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}

Expand All @@ -10,7 +10,7 @@ <h2>Confirm Delete of Choice</h2>

<form action="{% url "formly_dt_choice_delete" pk=fieldchoice.pk %}" method="post">
{% csrf_token %}
{{ form|as_bootstrap }}
{{ form|bootstrap }}
<button type="submit" class="btn btn-danger">Delete</button>
<a class="btn" href="{{ fieldchoice.field.get_absolute_url }}">Cancel</a>
</form>
Expand Down
4 changes: 2 additions & 2 deletions formly/templates/formly/design/page_confirm_delete.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}

Expand All @@ -13,7 +13,7 @@ <h1>Delete Page</h1>
<legend>{{ page }}</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-danger">Delete</button>
Expand Down
6 changes: 3 additions & 3 deletions formly/templates/formly/design/page_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "formly/design/survey_edit_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}
<header class="jumbotron subhead" id="overview">
Expand All @@ -11,7 +11,7 @@ <h1>Modify Page</h1>
<form action="{% url "formly_dt_page_update" pk=page.pk %}" method="post" class="well">
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<input type="hidden" name="action" value="page_update" />
Expand Down Expand Up @@ -81,7 +81,7 @@ <h3>Add Field</h3>
{% csrf_token %}
<input type="hidden" name="action" value="field_add" />
<div class="modal-body">
{{ field_form|as_bootstrap }}
{{ field_form|bootstrap }}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Save</button>
Expand Down
4 changes: 2 additions & 2 deletions formly/templates/formly/design/survey_confirm_delete.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}
<header class="jumbotron subhead" id="overview">
Expand All @@ -12,7 +12,7 @@ <h1>Delete Survey</h1>
<legeng>{{ survey }}</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-danger">Delete</button>
Expand Down
2 changes: 1 addition & 1 deletion formly/templates/formly/design/survey_edit_base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "subnav_base.html" %}
{% extends "theme_bootstrap/subnav_base.html" %}

{% block subnav %}
<h3>{{ page.survey }}</h3>
Expand Down
4 changes: 2 additions & 2 deletions formly/templates/formly/design/survey_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block head_title %}Create Survey{% endblock %}

Expand All @@ -9,7 +9,7 @@
<legend>Create a new survey</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Create</button>
Expand Down
4 changes: 2 additions & 2 deletions formly/templates/formly/run/_question.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load bootstrap_tags %}
{% load bootstrap %}

{% if form.is_multipart %}
<form action="" method="post" enctype="multipart/form-data">
Expand All @@ -8,7 +8,7 @@
<legend>{{ page }}</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Submit</button>
Expand Down
4 changes: 2 additions & 2 deletions formly/templates/formly/run/page.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "site_base.html" %}

{% load bootstrap_tags %}
{% load bootstrap %}

{% block body %}

Expand All @@ -17,7 +17,7 @@ <h1>Take the Survey</h1>
<legend>{{ page }}</legend>
{% csrf_token %}
<fieldset>
{{ form|as_bootstrap }}
{{ form|bootstrap }}
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Submit</button>
Expand Down

0 comments on commit 4d700b0

Please sign in to comment.