fix: text editor for bio and profile redirect changes

This commit is contained in:
Jannat Patel
2021-12-14 16:46:06 +05:30
parent 682188540c
commit 8489b1d943
5 changed files with 4 additions and 71 deletions

View File

@@ -1,60 +0,0 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-12-07 14:53:35.593751",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"preferred_functions",
"preferred_location",
"column_break_3",
"preferred_industries",
"dream_companies"
],
"fields": [
{
"fieldname": "preferred_functions",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Preferred Functions",
"options": "Consulting\nData & Analytics\nDesign & Creative\nEngineering (Non Software)\nEngineering (Software & IT)\nFinance, Investment & Accounting\nHuman Resource & Recruiting\nLegal\nMarketing, Advertising & PR\nOperations & Admin\nProject Management\nProduct\nResearch, Training & Education\nSales & Customer Service\nSupply Chain, Logistics\nStrategy & Management\nOther",
"reqd": 1
},
{
"fieldname": "preferred_industries",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Preferred Industries",
"options": "Accounting\nAds, Marketing, PR & Events\nAgriculture, Fishing & Forestry\nArchitecture\nAviation & Aerospace\nBanking, Financial Services & Insurance\nBiotech & Pharmaceuticals\nConstruction & Real Estate\nConsulting & Professional Services\nEducation & Training\nEnergy & Utilities\nEngineering\nFood & Beverages\nHealth & Medical\nHospitality & Tourism\nIT / Ecommerce / Internet\nManufacturing & Production\nMedia & Entertainment\nPublic Service & NGOs\nRetail, Fashion & FMCG\nStaffing & Recruiting\nTransportation & Logistics\nSecurity & Law Enforcement\nOther",
"reqd": 1
},
{
"fieldname": "preferred_location",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Preferred Location",
"reqd": 1
},
{
"fieldname": "dream_companies",
"fieldtype": "Data",
"label": "Dream Companies"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-14 11:43:42.220244",
"modified_by": "Administrator",
"module": "LMS",
"name": "Career Preference",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@@ -1,8 +0,0 @@
# Copyright (c) 2021, Frappe and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class CareerPreference(Document):
pass

View File

@@ -21,7 +21,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-12-14 15:04:54.141518",
"modified": "2021-12-14 16:35:24.751439",
"modified_by": "Administrator",
"module": "LMS",
"name": "profile",
@@ -127,7 +127,7 @@
{
"allow_read_on_all_link_options": 0,
"fieldname": "bio",
"fieldtype": "Small Text",
"fieldtype": "Text Editor",
"hidden": 0,
"label": "Bio",
"max_length": 0,

View File

@@ -10,7 +10,8 @@ def get_context(context):
except KeyError:
username = frappe.db.get_value("User", frappe.session.user, ["username"])
if username:
frappe.local.flags.redirect_location = get_profile_url_prefix() + urlencode({"username": username})
print(urlencode({"username": username}))
frappe.local.flags.redirect_location = get_profile_url_prefix() + username
raise frappe.Redirect
try:
context.member = frappe.get_doc("User", {"username": username})