Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
symfony/symfony#17799 bug example
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Feb 15, 2016
1 parent e3c86c9 commit af2529b
Show file tree
Hide file tree
Showing 8 changed files with 199 additions and 145 deletions.
13 changes: 0 additions & 13 deletions app/Resources/views/base.html.twig

This file was deleted.

76 changes: 0 additions & 76 deletions app/Resources/views/default/index.html.twig

This file was deleted.

31 changes: 31 additions & 0 deletions app/Resources/views/index.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
</head>
<body>
{{ form_start(form, {method: 'PATCH'}) }}
<input type="submit">
{{ form_end(form) }}
<script>
$('form').submit(function() {
var el = $('input:checked');
$.ajax({
type: "PATCH",
url: $(this).attr('action'),
data: [
{name: el.attr('name'), value: el.val()}
],
success: function (data) {
// window.location.reload();
}
});
return false;
});
</script>
</body>
</html>
74 changes: 38 additions & 36 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit af2529b

Please sign in to comment.