From 29bc1b621fbc89beacb8c5f9d7a2bc40e7544800 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 3 Nov 2016 11:00:25 +0530 Subject: [PATCH] [fix] email alert message changed to Code and ignore xss filtering --- .../doctype/customize_form/customize_form.js | 3 +- .../doctype/email_alert/email_alert.json | 31 ++++++++++++++++--- frappe/www/login.html | 2 +- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/frappe/custom/doctype/customize_form/customize_form.js b/frappe/custom/doctype/customize_form/customize_form.js index 85df087668..8ad40cf11c 100644 --- a/frappe/custom/doctype/customize_form/customize_form.js +++ b/frappe/custom/doctype/customize_form/customize_form.js @@ -94,7 +94,8 @@ frappe.ui.form.on("Customize Form", { sync_on_migrate: data.sync_on_migrate } }); - }); + }, + __("Select Module")); }); } } diff --git a/frappe/email/doctype/email_alert/email_alert.json b/frappe/email/doctype/email_alert/email_alert.json index 63dc0b2815..6b34548265 100755 --- a/frappe/email/doctype/email_alert/email_alert.json +++ b/frappe/email/doctype/email_alert/email_alert.json @@ -25,6 +25,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Enabled", "length": 0, "no_copy": 0, @@ -50,6 +51,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Filters", "length": 0, "no_copy": 0, @@ -76,6 +78,7 @@ "ignore_xss_filter": 1, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Subject", "length": 0, "no_copy": 0, @@ -101,6 +104,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 1, "label": "Document Type", "length": 0, "no_copy": 0, @@ -127,6 +131,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Is Standard", "length": 0, "no_copy": 0, @@ -154,6 +159,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 1, "label": "Module", "length": 0, "no_copy": 0, @@ -181,6 +187,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -206,6 +213,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Send Alert On", "length": 0, "no_copy": 0, @@ -234,6 +242,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Trigger Method", "length": 0, "no_copy": 0, @@ -262,6 +271,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Reference Date", "length": 0, "no_copy": 0, @@ -290,6 +300,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Days Before or After", "length": 0, "no_copy": 0, @@ -317,6 +328,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Value Changed", "length": 0, "no_copy": 0, @@ -342,6 +354,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -369,6 +382,7 @@ "ignore_xss_filter": 1, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Condition", "length": 0, "no_copy": 0, @@ -394,6 +408,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -418,6 +433,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "length": 0, "no_copy": 0, "options": "

Condition Examples:

\n
doc.status==\"Open\"\ndoc.due_date==nowdate()\ndoc.total > 40000\n
\n

Hints:

\n
    \n
  1. To check for an event every day, select \"Date Change\" in Event
  2. \n
  3. To send an alert if a particular value changes, select \"Value Change\"
  4. \n
", @@ -443,6 +459,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Recipients", "length": 0, "no_copy": 0, @@ -468,6 +485,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Recipients", "length": 0, "no_copy": 0, @@ -494,6 +512,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Message", "length": 0, "no_copy": 0, @@ -513,14 +532,15 @@ "collapsible": 0, "columns": 0, "default": "Add your message here", - "depends_on": "is_standard", + "depends_on": "", "fieldname": "message", - "fieldtype": "Text", + "fieldtype": "Code", "hidden": 0, "ignore_user_permissions": 0, - "ignore_xss_filter": 0, + "ignore_xss_filter": 1, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Message", "length": 0, "no_copy": 0, @@ -546,6 +566,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Attach Print", "length": 0, "no_copy": 0, @@ -572,6 +593,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "Message Examples", "length": 0, "no_copy": 0, @@ -598,6 +620,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, + "in_standard_filter": 0, "label": "View Properties (via Customize Form)", "length": 0, "no_copy": 0, @@ -625,7 +648,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2016-10-07 01:07:17.504744", + "modified": "2016-11-03 01:29:48.678270", "modified_by": "Administrator", "module": "Email", "name": "Email Alert", diff --git a/frappe/www/login.html b/frappe/www/login.html index 4b94d9a5e3..d3b635b65d 100644 --- a/frappe/www/login.html +++ b/frappe/www/login.html @@ -60,7 +60,7 @@
{%- if not disable_signup -%}

- {{ _("Dont have an account? ") }} {{ _("Sign up.") }} + {{ _("Dont have an account? ") }} {{ _("Sign up.") }}

{%- endif -%}