diff --git a/app/controllers/web/admin/inquiries.js b/app/controllers/web/admin/inquiries.js
index db761bd29d..a32b04ac48 100644
--- a/app/controllers/web/admin/inquiries.js
+++ b/app/controllers/web/admin/inquiries.js
@@ -87,11 +87,13 @@ async function retrieve(ctx) {
return ctx.render('admin/inquiries/retrieve');
}
-async function remove(ctx) {
+async function resolve(ctx) {
const inquiry = await Inquiries.findById(ctx.params.id);
if (!inquiry) throw Boom.notFound(ctx.translateError('INVALID_INQUIRY'));
- await Inquiries.findById({ id: inquiry.id });
+ await Inquiries.findByIdAndUpdate(inquiry._id, {
+ $set: { is_resolved: true }
+ });
ctx.flash('custom', {
title: ctx.request.t('Success'),
@@ -213,4 +215,4 @@ async function bulkReply(ctx) {
else ctx.body = { redirectTo: '/admin/inquiries' };
}
-module.exports = { list, retrieve, remove, reply, bulkReply };
+module.exports = { list, retrieve, resolve, reply, bulkReply };
diff --git a/app/views/admin/inquiries/_table.pug b/app/views/admin/inquiries/_table.pug
index 3ca17ed31c..0e39c82871 100644
--- a/app/views/admin/inquiries/_table.pug
+++ b/app/views/admin/inquiries/_table.pug
@@ -31,14 +31,14 @@ include ../../_pagination
)
td.align-middle
a(
- href=`mailto:${inquiry.email}`,
+ href=l(`/admin/users?mongodb_query={ email: "${user.email}" }`),
target="_blank",
rel="noopener noreferrer"
)= inquiry.email
td.align-middle
= inquiry.message
td.align-middle
- = inquiry.plan
+ = titleize(humanize(inquiry.plan))
td.align-middle.dayjs(
data-time=new Date(inquiry.created_at).getTime()
)= dayjs(inquiry.created_at).format("M/D/YY h:mm A z")
@@ -47,7 +47,7 @@ include ../../_pagination
)= dayjs(inquiry.updated_at).format("M/D/YY h:mm A z")
td.align-middle
.btn-group(role="group", aria-label=t("Actions"))
- a.btn.btn-secondary(
+ a.btn.btn-primary(
href=l(`/admin/inquiries/${inquiry.id}`),
data-toggle="tooltip",
data-title=t("Edit")
@@ -57,12 +57,12 @@ include ../../_pagination
method="POST",
autocomplete="off"
)
- input(type="hidden", name="_method", value="DELETE")
- button.btn.btn-danger(
+ input(type="hidden", name="_method", value="PUT")
+ button.btn.btn-secondary(
type="submit",
data-toggle="tooltip",
- data-title=t("Remove")
- ): i.fa.fa-fw.fa-remove
+ data-title=t("Resolve")
+ ): i.fa.fa-fw.fa-regular.fa-check-circle
button#bulk-reply-button.btn.btn-secondary.float-right.mb-3 Bulk Reply
#bulk-reply-modal.modal.fade(
tabindex="-1",
diff --git a/locales/ar.json b/locales/ar.json
index ef06d4732e..fd0b215a7b 100644
--- a/locales/ar.json
+++ b/locales/ar.json
@@ -7376,5 +7376,6 @@
"Thank you,": "شكرًا لك،",
"Hi there, ": "أهلاً،",
"Inquiry does not exist.": "الاستفسار غير موجود.",
- "An error occurred while attempting to send bulk reply. Please try again.": "حدث خطأ أثناء محاولة إرسال رد مجمع. حاول مرة اخرى."
+ "An error occurred while attempting to send bulk reply. Please try again.": "حدث خطأ أثناء محاولة إرسال رد مجمع. حاول مرة اخرى.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/cs.json b/locales/cs.json
index 48b35d4a13..92ddea7157 100644
--- a/locales/cs.json
+++ b/locales/cs.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Děkuji,",
"Hi there, ": "Ahoj,",
"Inquiry does not exist.": "Dotaz neexistuje.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Při pokusu o odeslání hromadné odpovědi došlo k chybě. Prosím zkuste to znovu."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Při pokusu o odeslání hromadné odpovědi došlo k chybě. Prosím zkuste to znovu.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/da.json b/locales/da.json
index 52aa03f866..5df11b0f74 100644
--- a/locales/da.json
+++ b/locales/da.json
@@ -3849,5 +3849,7 @@
"Hi there, ": "Hej,",
"Thank you,": "Tak skal du have,",
"Inquiry does not exist.": "Forespørgsel eksisterer ikke.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Der opstod en fejl under forsøg på at sende massesvar. Prøv igen."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Der opstod en fejl under forsøg på at sende massesvar. Prøv igen.",
+ "Resolve": "Resolve",
+ "Request Time-out": "Request Time-out"
}
\ No newline at end of file
diff --git a/locales/de.json b/locales/de.json
index 2229eccafc..7cf51bb444 100644
--- a/locales/de.json
+++ b/locales/de.json
@@ -6414,5 +6414,6 @@
"Thank you,": "Danke schön,",
"Hi there, ": "Hallo, ",
"Inquiry does not exist.": "Anfrage existiert nicht.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Beim Senden einer Massenantwort ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Beim Senden einer Massenantwort ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/en.json b/locales/en.json
index 3782e0bfd7..d300b5a119 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -7137,5 +7137,6 @@
"No inquiries exist for that search.": "No inquiries exist for that search.",
"Thank you,": "Thank you,",
"Hi there, ": "Hi there, ",
- "We were unable to send your help request. We have been alerted of this problem. Please try again or directly email support@forwardemail.net.": "We were unable to send your help request. We have been alerted of this problem. Please try again or directly email support@forwardemail.net."
+ "We were unable to send your help request. We have been alerted of this problem. Please try again or directly email support@forwardemail.net.": "We were unable to send your help request. We have been alerted of this problem. Please try again or directly email support@forwardemail.net.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/es.json b/locales/es.json
index ae0d5e362b..0713d878d0 100644
--- a/locales/es.json
+++ b/locales/es.json
@@ -7374,5 +7374,6 @@
"Thank you,": "Gracias,",
"Hi there, ": "Hola,",
"Inquiry does not exist.": "La consulta no existe.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Se produjo un error al intentar enviar una respuesta masiva. Inténtalo de nuevo."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Se produjo un error al intentar enviar una respuesta masiva. Inténtalo de nuevo.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/fi.json b/locales/fi.json
index f59fd433fe..d30baada3e 100644
--- a/locales/fi.json
+++ b/locales/fi.json
@@ -7223,5 +7223,6 @@
"Thank you,": "Kiitos,",
"Hi there, ": "Hei siellä,",
"Inquiry does not exist.": "Kyselyä ei ole olemassa.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Joukkovastauksen lähettämisessä tapahtui virhe. Yritä uudelleen."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Joukkovastauksen lähettämisessä tapahtui virhe. Yritä uudelleen.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/fr.json b/locales/fr.json
index c65989885f..22b8b3ef28 100644
--- a/locales/fr.json
+++ b/locales/fr.json
@@ -4867,5 +4867,6 @@
"Hi there, ": "Salut,",
"Thank you,": "Merci,",
"Inquiry does not exist.": "L'enquête n'existe pas.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Une erreur s'est produite lors de la tentative d'envoi d'une réponse groupée. Veuillez réessayer."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Une erreur s'est produite lors de la tentative d'envoi d'une réponse groupée. Veuillez réessayer.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/he.json b/locales/he.json
index dd99385bd9..e03ae18040 100644
--- a/locales/he.json
+++ b/locales/he.json
@@ -5366,5 +5366,6 @@
"Hi there, ": "שלום שם,",
"Thank you,": "תודה,",
"Inquiry does not exist.": "חקירה לא קיימת.",
- "An error occurred while attempting to send bulk reply. Please try again.": "אירעה שגיאה בעת ניסיון לשלוח תשובה בכמות גדולה. בבקשה נסה שוב."
+ "An error occurred while attempting to send bulk reply. Please try again.": "אירעה שגיאה בעת ניסיון לשלוח תשובה בכמות גדולה. בבקשה נסה שוב.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/hu.json b/locales/hu.json
index 40c9033c97..97b039f80a 100644
--- a/locales/hu.json
+++ b/locales/hu.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Köszönöm,",
"Hi there, ": "Szia,",
"Inquiry does not exist.": "A lekérdezés nem létezik.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Hiba történt a tömeges válasz küldése közben. Kérlek próbáld újra."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Hiba történt a tömeges válasz küldése közben. Kérlek próbáld újra.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/id.json b/locales/id.json
index 9cc520af0f..c82b48ce64 100644
--- a/locales/id.json
+++ b/locales/id.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Terima kasih,",
"Hi there, ": "Hai, yang di sana,",
"Inquiry does not exist.": "Permintaan tidak ada.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Terjadi kesalahan saat mencoba mengirim balasan massal. Silakan coba lagi."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Terjadi kesalahan saat mencoba mengirim balasan massal. Silakan coba lagi.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/it.json b/locales/it.json
index e58095570d..820ddfc75a 100644
--- a/locales/it.json
+++ b/locales/it.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Grazie,",
"Hi there, ": "Ciao,",
"Inquiry does not exist.": "La richiesta non esiste.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Si è verificato un errore durante il tentativo di inviare una risposta collettiva. Per favore riprova."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Si è verificato un errore durante il tentativo di inviare una risposta collettiva. Per favore riprova.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/ja.json b/locales/ja.json
index 63c73eedef..ec1cf00ae6 100644
--- a/locales/ja.json
+++ b/locales/ja.json
@@ -7376,5 +7376,6 @@
"Thank you,": "ありがとう、",
"Hi there, ": "やあ、 ",
"Inquiry does not exist.": "問い合わせが存在しません。",
- "An error occurred while attempting to send bulk reply. Please try again.": "一括返信の送信中にエラーが発生しました。もう一度お試しください。"
+ "An error occurred while attempting to send bulk reply. Please try again.": "一括返信の送信中にエラーが発生しました。もう一度お試しください。",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/ko.json b/locales/ko.json
index 6fabae7e8d..647378f10e 100644
--- a/locales/ko.json
+++ b/locales/ko.json
@@ -7376,5 +7376,6 @@
"Thank you,": "감사합니다,",
"Hi there, ": "안녕하세요,",
"Inquiry does not exist.": "문의가 존재하지 않습니다.",
- "An error occurred while attempting to send bulk reply. Please try again.": "대량 답장을 보내는 동안 오류가 발생했습니다. 다시 시도해 주세요."
+ "An error occurred while attempting to send bulk reply. Please try again.": "대량 답장을 보내는 동안 오류가 발생했습니다. 다시 시도해 주세요.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/nl.json b/locales/nl.json
index 0b0a1d8bdf..32cb70620b 100644
--- a/locales/nl.json
+++ b/locales/nl.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Bedankt,",
"Hi there, ": "Hoi,",
"Inquiry does not exist.": "Onderzoek bestaat niet.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Er is een fout opgetreden bij het verzenden van een bulkantwoord. Probeer het opnieuw."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Er is een fout opgetreden bij het verzenden van een bulkantwoord. Probeer het opnieuw.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/no.json b/locales/no.json
index 0c009d639d..c94a480729 100644
--- a/locales/no.json
+++ b/locales/no.json
@@ -7381,5 +7381,6 @@
"Thank you,": "Takk skal du ha,",
"Hi there, ": "Hei der,",
"Inquiry does not exist.": "Forespørsel eksisterer ikke.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Det oppstod en feil under forsøk på å sende massesvar. Vær så snill, prøv på nytt."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Det oppstod en feil under forsøk på å sende massesvar. Vær så snill, prøv på nytt.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/pl.json b/locales/pl.json
index ef66427f3a..89d8cced6d 100644
--- a/locales/pl.json
+++ b/locales/pl.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Dziękuję,",
"Hi there, ": "Cześć,",
"Inquiry does not exist.": "Zapytanie nie istnieje.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Wystąpił błąd podczas próby wysłania odpowiedzi zbiorczej. Proszę spróbuj ponownie."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Wystąpił błąd podczas próby wysłania odpowiedzi zbiorczej. Proszę spróbuj ponownie.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/pt.json b/locales/pt.json
index 5738a3ba5e..fc1e763289 100644
--- a/locales/pt.json
+++ b/locales/pt.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Obrigado,",
"Hi there, ": "Olá,",
"Inquiry does not exist.": "A investigação não existe.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Ocorreu um erro ao tentar enviar uma resposta em massa. Por favor, tente novamente."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Ocorreu um erro ao tentar enviar uma resposta em massa. Por favor, tente novamente.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/ru.json b/locales/ru.json
index 8ab835eaf7..5f2221798a 100644
--- a/locales/ru.json
+++ b/locales/ru.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Спасибо,",
"Hi there, ": "Всем привет,",
"Inquiry does not exist.": "Опрос не существует.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Произошла ошибка при попытке отправить массовый ответ. Пожалуйста, попробуйте еще раз."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Произошла ошибка при попытке отправить массовый ответ. Пожалуйста, попробуйте еще раз.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/sv.json b/locales/sv.json
index 299c8570f4..8e5797def6 100644
--- a/locales/sv.json
+++ b/locales/sv.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Tack,",
"Hi there, ": "Hallå där,",
"Inquiry does not exist.": "Förfrågan finns inte.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Ett fel uppstod vid försök att skicka masssvar. Var god försök igen."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Ett fel uppstod vid försök att skicka masssvar. Var god försök igen.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/th.json b/locales/th.json
index 92d958c3c8..fc39a1b4f3 100644
--- a/locales/th.json
+++ b/locales/th.json
@@ -7376,5 +7376,6 @@
"Thank you,": "ขอบคุณ,",
"Hi there, ": "สวัสดี,",
"Inquiry does not exist.": "ไม่มีการสอบถามข้อมูล",
- "An error occurred while attempting to send bulk reply. Please try again.": "เกิดข้อผิดพลาดขณะพยายามส่งการตอบกลับจำนวนมาก กรุณาลองอีกครั้ง."
+ "An error occurred while attempting to send bulk reply. Please try again.": "เกิดข้อผิดพลาดขณะพยายามส่งการตอบกลับจำนวนมาก กรุณาลองอีกครั้ง.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/tr.json b/locales/tr.json
index 746945bf1d..034e0b0acc 100644
--- a/locales/tr.json
+++ b/locales/tr.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Teşekkür ederim,",
"Hi there, ": "Merhaba,",
"Inquiry does not exist.": "Sorgulama mevcut değil.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Toplu yanıt gönderilmeye çalışılırken bir hata oluştu. Lütfen tekrar deneyin."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Toplu yanıt gönderilmeye çalışılırken bir hata oluştu. Lütfen tekrar deneyin.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/uk.json b/locales/uk.json
index a465d049c4..869c674308 100644
--- a/locales/uk.json
+++ b/locales/uk.json
@@ -7376,5 +7376,6 @@
"Thank you,": "Дякую тобі,",
"Hi there, ": "Привіт,",
"Inquiry does not exist.": "Запит не існує.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Під час спроби надіслати масову відповідь сталася помилка. Будь ласка спробуйте ще раз."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Під час спроби надіслати масову відповідь сталася помилка. Будь ласка спробуйте ще раз.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/vi.json b/locales/vi.json
index 7355df6481..1288de6f5c 100644
--- a/locales/vi.json
+++ b/locales/vi.json
@@ -4873,5 +4873,6 @@
"Hi there, ": "Chào bạn,",
"Thank you,": "Cảm ơn,",
"Inquiry does not exist.": "Yêu cầu không tồn tại.",
- "An error occurred while attempting to send bulk reply. Please try again.": "Đã xảy ra lỗi khi cố gắng gửi thư trả lời hàng loạt. Vui lòng thử lại."
+ "An error occurred while attempting to send bulk reply. Please try again.": "Đã xảy ra lỗi khi cố gắng gửi thư trả lời hàng loạt. Vui lòng thử lại.",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/locales/zh.json b/locales/zh.json
index 5256e1ec64..ea3ca89ff8 100644
--- a/locales/zh.json
+++ b/locales/zh.json
@@ -7069,5 +7069,6 @@
"Thank you,": "谢谢你,",
"Hi there, ": "你好呀, ",
"Inquiry does not exist.": "询价不存在。",
- "An error occurred while attempting to send bulk reply. Please try again.": "尝试发送批量回复时出错。请重试。"
+ "An error occurred while attempting to send bulk reply. Please try again.": "尝试发送批量回复时出错。请重试。",
+ "Resolve": "Resolve"
}
\ No newline at end of file
diff --git a/routes/web/admin.js b/routes/web/admin.js
index fa399cd823..6c975c2dcd 100644
--- a/routes/web/admin.js
+++ b/routes/web/admin.js
@@ -57,7 +57,7 @@ router
.get('/inquiries/:id', web.admin.inquiries.retrieve)
.post('/inquiries/bulk', web.admin.inquiries.bulkReply)
.post('/inquiries/:id', web.admin.inquiries.reply)
- .delete('/inquiries/:id', web.admin.inquiries.remove)
+ .put('/inquiries/:id', web.admin.inquiries.resolve)
// domains
.get('/domains', paginate.middleware(10, 50), web.admin.domains.list)