mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
fix: Added a message to enable appointment booking if disabled (#26233)
* fix: Added a message to enable appointment booking if disabled * refactor: added translation for the message Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com> * fix: added missing import * fix: minor identation and space fix Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
committed by
GitHub
parent
8ebf32e18f
commit
86f41839fe
@@ -2,7 +2,7 @@ import frappe
|
|||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import pytz
|
import pytz
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
|
WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
|
||||||
|
|
||||||
@@ -14,7 +14,8 @@ def get_context(context):
|
|||||||
if is_enabled:
|
if is_enabled:
|
||||||
return context
|
return context
|
||||||
else:
|
else:
|
||||||
frappe.local.flags.redirect_location = '/404'
|
frappe.redirect_to_message(_("Appointment Scheduling Disabled"), _("Appointment Scheduling has been disabled for this site"),
|
||||||
|
http_status_code=302, indicator_color="red")
|
||||||
raise frappe.Redirect
|
raise frappe.Redirect
|
||||||
|
|
||||||
@frappe.whitelist(allow_guest=True)
|
@frappe.whitelist(allow_guest=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user