Merge pull request #190 from fossunited/web-form-changes
fix: web form issues
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Speaker', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
onload: function (frm) {
|
||||
frm.set_query('user', function (doc) {
|
||||
return {
|
||||
filters: {
|
||||
"ignore_user_type": 1,
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class Talk(Document):
|
||||
def before_save(self):
|
||||
if not self.speaker:
|
||||
@@ -25,5 +24,6 @@ class Talk(Document):
|
||||
"doctype": "Speaker",
|
||||
"event": self.event,
|
||||
"user": frappe.session.user
|
||||
}).save(ignore_permissions=True)
|
||||
self.speaker = speaker
|
||||
})
|
||||
speaker.save(ignore_permissions=True)
|
||||
self.speaker = speaker.name
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"is_standard": 1,
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2021-08-23 10:13:19.224367",
|
||||
"modified": "2021-08-24 19:57:25.516319",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Event Management",
|
||||
"name": "attendee-registration",
|
||||
@@ -37,6 +37,7 @@
|
||||
"web_form_fields": [
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"default": "",
|
||||
"fieldname": "user",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
@@ -73,4 +74,4 @@
|
||||
"show_in_filter": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
frappe.ready(function () {
|
||||
frappe.web_form.after_save = () => {
|
||||
setTimeout(function () {
|
||||
window.location.href = '/about';
|
||||
}, 2000);
|
||||
}
|
||||
})
|
||||
|
||||
frappe.web_form.after_load = () => {
|
||||
frappe.web_form.set_value("user", frappe.session.user);
|
||||
}
|
||||
|
||||
frappe.web_form.after_save = () => {
|
||||
setTimeout(function () {
|
||||
window.location.href = '/about';
|
||||
}, 2000);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"is_standard": 1,
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2021-08-23 10:18:17.486228",
|
||||
"modified": "2021-08-24 19:57:06.806994",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Event Management",
|
||||
"name": "purpose-a-talk",
|
||||
@@ -74,6 +74,18 @@
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "thumbnail",
|
||||
"fieldtype": "Attach",
|
||||
"hidden": 0,
|
||||
"label": "Preview Image",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "about",
|
||||
@@ -85,18 +97,6 @@
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "attachment",
|
||||
"fieldtype": "Attach",
|
||||
"hidden": 0,
|
||||
"label": "Attachment",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user