Commit 337b87f0 authored by VM develop's avatar VM develop
Browse files

Issue #2581123 by itamair: Corrects form action paths for the rest.html test page

parent 9723d7e7
Loading
Loading
Loading
Loading
+2 −1
Changes for rest.html: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -227,7 +227,8 @@
				$('form').submit(function() {
					// Get action
					var $form = $(this);
					var action = '/drupal-rest-json/rest/'+$form.attr('action');
					var context = window.location.pathname.match(/(.*)\/sites\/(all|default)\/modules\/rest_json/)[1];
					var action = context+'/rest/'+$form.attr('action');
					action = action.replace(/:type/, $form.find('[name="type"]').val());
					action = action.replace(/:nid/, $form.find('[name="nid"]').val());