aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/templates/response_previewform.html
diff options
context:
space:
mode:
Diffstat (limited to 'libpathod/templates/response_previewform.html')
-rw-r--r--libpathod/templates/response_previewform.html38
1 files changed, 16 insertions, 22 deletions
diff --git a/libpathod/templates/response_previewform.html b/libpathod/templates/response_previewform.html
index d91a2a67..51e17814 100644
--- a/libpathod/templates/response_previewform.html
+++ b/libpathod/templates/response_previewform.html
@@ -1,26 +1,18 @@
<form style="margin-bottom: 0" class="form-inline" method="GET" action="/response_preview">
- <input
- style="width: 18em"
- id="spec"
- name="spec"
- class="input-medium"
- value="{{spec}}"
- placeholder="code:[features]"
- >
- <input type="submit" class="btn" value="preview">
- {% if not nocraft %}
- <a href="#" id="submitspec" class="btn">go</a>
- {% endif %}
+ <input style="width: 18em" id="spec" name="spec" class="input-medium" value="{{spec}}"
+ placeholder="code:[features]">
+ <input type="submit" class="btn" value="preview"> {% if not nocraft %}
+ <a href="#" id="submitspec" class="btn">go</a> {% endif %}
</form>
<a class="innerlink" data-toggle="collapse" data-target="#responseexamples">examples</a>
<div id="responseexamples" class="collapse">
- <p>Check out the <a href="/docs/language">complete language docs</a>. Here
- are some examples to get you started:</p>
+ <p>Check out the <a href="/docs/language">complete language docs</a>. Here are some examples
+ to get you started:</p>
<table class="table table-bordered">
- <tbody >
+ <tbody>
<tr>
<td><a href="/response_preview?spec=200">200</a></td>
<td>A basic HTTP 200 response.</td>
@@ -35,8 +27,8 @@
</tr>
<tr>
<td><a href="/response_preview?spec=200:b@100">200:b@100</a></td>
- <td>100 random bytes as the body. A Content-Lenght header is
- added, so the disconnect is no longer needed.</td>
+ <td>100 random bytes as the body. A Content-Lenght header is added, so the
+ disconnect is no longer needed.</td>
</tr>
<tr>
<td><a href='/response_preview?spec=200:b@100:h"Server"="&apos;;drop table servers;"'>200:b@100:h"Etag"="';drop table servers;"</a></td>
@@ -66,18 +58,20 @@
<td>
<a href="/response_preview?spec=200:b@100:h@1k,ascii_letters='foo'">200:b@100:h@1k,ascii_letters='foo'</a>
</td>
- <td>100 ASCII bytes as the body, randomly generated 100k header name, with the value 'foo'.</td>
+ <td>100 ASCII bytes as the body, randomly generated 100k header name, with
+ the value 'foo'.</td>
</tr>
</tbody>
</table>
</div>
+{% if not nocraft %}
<script>
- $(function(){
- {% if not nocraft %}
- $("#submitspec").click(function(){
+ $(function() {
+ $("#submitspec").click(function() {
document.location = "{{craftanchor}}" + $("#spec").val()
});
- {% endif %}
});
+
</script>
+{% endif %}