# HG changeset patch # User Thierry Florac # Date 1432117499 -7200 # Node ID 6c594e84ec0598a7518f62cdd4abb2fd24fc580d # Parent 759944b2a12ddcaabdc3f3b9d5f5c294aba42faf Changed form absolute URLs diff -r 759944b2a12d -r 6c594e84ec05 src/pyams_form/form.py --- a/src/pyams_form/form.py Wed May 20 12:24:32 2015 +0200 +++ b/src/pyams_form/form.py Wed May 20 12:24:59 2015 +0200 @@ -32,10 +32,10 @@ from pyams_form.group import GroupsBasedForm from pyams_pagelet.interfaces import PageletCreatedEvent from pyams_skin.skin import apply_skin +from pyams_utils.url import absolute_url from pyramid.decorator import reify from pyramid.events import subscriber from pyramid.response import Response -from pyramid.url import resource_url from pyramid_zope_request import PyramidToPublisher, PyramidPublisherRequest from z3c.form.button import Buttons from z3c.form.form import applyChanges, \ @@ -209,13 +209,13 @@ ajax_callback = FieldProperty(IAJAXForm['ajax_callback']) def get_form_action(self): - return resource_url(self.context, self.request, self.request.view_name) + return absolute_url(self.context, self.request, self.request.view_name) def get_form_options(self): return json.dumps(self.form_options) if self.form_options else None def get_ajax_handler(self): - return resource_url(self.context, self.request, self.ajax_handler) + return absolute_url(self.context, self.request, self.ajax_handler) def get_ajax_errors(self): """Extract form errors in AJAX format"""