From 87f853242e5329209b34a258c0d1b17ae2582fe8 Mon Sep 17 00:00:00 2001 From: Bomrah Harry Date: Wed, 17 Oct 2018 17:21:06 +0800 Subject: [PATCH] fix for https --- app/views/admin/announcements/_form.html.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb index dec8ea1..c789e22 100644 --- a/app/views/admin/announcements/_form.html.erb +++ b/app/views/admin/announcements/_form.html.erb @@ -429,6 +429,9 @@ processData: false, contentType: false }).done(function(data){ + if(window.location.protocol === "https:"){ + data = data.replace("http:","https:"); + } $('.modal-body iframe').attr('src',data); $('#show_preview .modal').modal(); $('#show_preview .modal').height(function() {