From 1151a6d17d1bf4a2227f0656321c589c5b7ca73d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 28 Feb 2017 18:26:12 -0800 Subject: support editing reposts --- views/new-repost.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'views') diff --git a/views/new-repost.php b/views/new-repost.php index e67ab93..4ef84db 100644 --- a/views/new-repost.php +++ b/views/new-repost.php @@ -2,21 +2,22 @@
- +
- - + +
- +
+
@@ -27,10 +28,11 @@ $(function(){ $("#btn_post").click(function(){ - $("#btn_post").addClass("loading disabled").text("Working..."); + $("#btn_post").addClass("loading disabled"); $.post("/repost", { - url: $("#note_url").val() + repost_of: $("#repost_of").val(), + edit: $("#edit_url").val() }, function(response){ if(response.location != false) { @@ -44,7 +46,10 @@ $(function(){ } else { $("#test_success").addClass('hidden'); $("#test_error").removeClass('hidden'); - $("#btn_post").removeClass("loading disabled").text("Post"); + if(response.error_details) { + $("#test_error").text(response.error_details); + } + $("#btn_post").removeClass("loading disabled"); } }); -- cgit v1.2.3