Commit c6a97a23 authored by Saurabh's avatar Saurabh
Browse files

Merge branch 'hotfix'

Showing with 78 additions and 6 deletions
+78 -6
......@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
__version__ = '10.1.44'
__version__ = '10.1.45'
__title__ = "Frappe Framework"
local = Local()
......
......@@ -71,6 +71,39 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"description": "Note: By default emails for failed backups are sent.",
"fieldname": "send_email_for_successful_backup",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email for Successful Backup",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
......@@ -295,7 +328,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2018-03-22 16:02:00.597029",
"modified": "2018-08-07 04:00:40.520943",
"modified_by": "Administrator",
"module": "Integrations",
"name": "Dropbox Settings",
......
......@@ -56,6 +56,9 @@ def take_backup_to_dropbox():
def send_email(success, service_name, error_status=None):
if success:
if frappe.db.get_value("Dropbox Settings", None, "send_email_for_successful_backup") == '0':
return
subject = "Backup Upload Successful"
message ="""<h3>Backup Uploaded Successfully</h3><p>Hi there, this is just to inform you
that your backup was successfully uploaded to your %s account. So relax!</p>
......
......@@ -72,6 +72,38 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "1",
"description": "Note: By default emails for failed backups are sent.",
"fieldname": "send_email_for_successful_backup",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email for Successful Backup",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
......@@ -234,7 +266,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2017-10-06 18:27:09.022674",
"modified": "2018-08-07 04:12:43.691760",
"modified_by": "Administrator",
"module": "Integrations",
"name": "S3 Backup Settings",
......
......@@ -74,6 +74,9 @@ def take_backups_s3():
def send_email(success, service_name, error_status=None):
if success:
if frappe.db.get_value("S3 Backup Settings", None, "send_email_for_successful_backup") == '0':
return
subject = "Backup Upload Successful"
message = """<h3>Backup Uploaded Successfully! </h3><p>Hi there, this is just to inform you
that your backup was successfully uploaded to your Amazon S3 bucket. So relax!</p> """
......
......@@ -634,7 +634,7 @@ frappe.views.ReportView = frappe.ui.BaseList.extend({
data.forEach(function(row, ri) {
$.each(row, function(key, value) {
if (key in field_map) {
totals_row[key] = (totals_row[key] || 0) + value;
totals_row[key] = (totals_row[key] || 0) + (value || 0);
}
});
});
......
{% extends "templates/web.html" %}
{% block page_content %}
<h1>{{ title }}</h1>
<h1>{{ title }}: "{{ query }}"</h1>
<div>
<form action='/search'>
......
......@@ -10,7 +10,8 @@ def get_context(context):
context.no_cache = 1
if frappe.form_dict.q:
query = str(utils.escape(sanitize_html(frappe.form_dict.q)))
context.title = _('Search Results for "{0}"').format(query)
context.title = _('Search Results for')
context.query = query
context.update(get_search_results(query))
else:
context.title = _('Search')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment