Ticket #14428: csrf_patch.diff

File csrf_patch.diff, 8.6 KB (added by Mark Jones, 14 years ago)

Patched template files

  • graphics/templates/goflow/graphics/graph.html

     
    1010{{ v.image.graphic|safe }}
    1111{% endfor %}
    1212
    13 <form method=get action=save>
     13<form method=get action=save>{% csrf_token %}
    1414<input type=hidden name=image1_x><input type=hidden name=image1_y>
    1515<input type=submit name=action value=Save>
    1616</form>
  • apptools/templates/admin/workflow/application/change_form.html

     
    2929  </ul>
    3030{% endif %}{% endif %}
    3131{% endblock %}
    32 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     32<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
    3333<div>
    3434{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    3535{% if save_on_top %}{% submit_row %}{% endif %}
  • apptools/templates/admin/workflow/pushapplication/change_form.html

     
    2929  </ul>
    3030{% endif %}{% endif %}
    3131{% endblock %}
    32 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     32<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
    3333<div>
    3434{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    3535{% if save_on_top %}{% submit_row %}{% endif %}
  • apptools/templates/goflow/test_start.html

     
    22
    33{% block content %}
    44<h1>Create test workflow instances</h1>
    5 <form method="post">
     5<form method="post">{% csrf_token %}
    66<table>
    77{{ form }}
    88</table>
  • apptools/templates/goflow/view_application.html

     
    3333
    3434
    3535{% block content_form %}
    36 <form method="post">
     36<form method="post">{% csrf_token %}
    3737
    3838        {% block buttons_form %}
    3939        {% for value in ok_values %}
  • apptools/templates/goflow/start_proto.html

     
    1919<li> a text field that you should use to enter comments; these will be logged in the history.
    2020<li> as many submit buttons as outer transitions with conditions.
    2121</ul>
    22 <form method="post">
     22<form method="post">{% csrf_token %}
    2323<table>
    2424{{ form }}
    2525</table>
  • apptools/templates/goflow/start_application.html

     
    3434        {% else %}
    3535                <form method="post">
    3636        {% endif %}
    37        
     37        {% csrf_token %}
    3838        {% load apptools_lib %}
    3939        {% form_ext form %}
    4040       
  • apptools/templates/goflow/default_app.html

     
    1616(The instance history allows to test and debug the workflow)
    1717<pre>{{history}}</pre>
    1818<h3>Add comments in history</h3>
    19 <form method="post">
     19<form method="post">{% csrf_token %}
    2020<table>
    2121{{ form }}
    2222</table>
  • apptools/templates/goflow/edit_model.html

     
    4444                {% else %}
    4545                <form method="post">
    4646                {% endif %}
    47                        
     47                        {% csrf_token %}
    4848                        {% load apptools_lib %}
    4949                        {% form_ext form %}
    5050               
  • graphics2/templates/admin/graphics2/processimage/change_form.html

     
    2222  </ul>
    2323{% endif %}{% endif %}
    2424{% endblock %}
    25 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     25<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
    2626<div>
    2727{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    2828{% if opts.admin.save_on_top %}{% submit_row %}{% endif %}
     
    7171<div id="content-main" class=module>
    7272<h2>Positioning activities in the process graph image</h2>
    7373
    74 <form method=get action="pos_activity">
     74<form method='get' action="pos_activity">
    7575<table>
    7676<tr>
    7777<td>
    7878Select an activity then click on its symbol in the image.
    7979<br>
    80 <select name=activity>
     80<select name='activity'>{% csrf_token %}
    8181{% for a in original.list_activities %}
    8282<option value="{{ a.id }}">{{ a.title }}</option>
    8383{% endfor %}
  • workflow/templates/admin/workflow/application/change_form.html

     
    2929  </ul>
    3030{% endif %}{% endif %}
    3131{% endblock %}
    32 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     32<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
    3333<div>
    3434{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    3535{% if save_on_top %}{% submit_row %}{% endif %}
  • workflow/templates/admin/workflow/pushapplication/change_form.html

     
    2929  </ul>
    3030{% endif %}{% endif %}
    3131{% endblock %}
    32 <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
     32<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
    3333<div>
    3434{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
    3535{% if save_on_top %}{% submit_row %}{% endif %}
  • workflow/templates/goflow/login.html

     
    1717<p class="errornote">{{ error_message }}</p>
    1818{% endif %}
    1919<div id="content-main">
    20 <form action="{{ app_path }}" method="post" id="login-form">
     20<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
    2121  <div class="form-row">
    2222    <label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
    2323  </div>
Back to Top