From a28adb0ba380cdfe915e90d470241ed8df32f6c0 Mon Sep 17 00:00:00 2001 From: Yashashvi Dave Date: Mon, 30 Apr 2018 13:25:35 +0530 Subject: [PATCH] stream settings: Reset stream description on error. Reset old value of stream description on error. This commit also update the error message on updating stream name and description. --- static/js/stream_edit.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 4b9fd61627..3dcb5725f4 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -420,7 +420,8 @@ exports.change_stream_name = function (e) { }, error: function (xhr) { new_name_box.text(stream_data.maybe_get_stream_name(stream_id)); - ui_report.error(i18n.t("Error renaming stream"), xhr, $(".stream_change_property_info")); + ui_report.error(i18n.t("Error"), xhr, $(".stream_change_property_info")); + ui.update_scrollbar($("#subscription_overlay .settings")); }, }); }; @@ -451,8 +452,9 @@ exports.change_stream_description = function (e) { $(".stream_change_property_info")); }, error: function (xhr) { - ui_report.error(i18n.t("Error updating the stream description"), xhr, - $(".stream_change_property_info")); + sub_settings.find('.stream-description-editable').html(sub.rendered_description); + ui_report.error(i18n.t("Error"), xhr, $(".stream_change_property_info")); + ui.update_scrollbar($("#subscription_overlay .settings")); }, }); };