Merge pull request #8921 from netchampfaris/website-route-meta-fixes

fix: Website Route Meta fixes
This commit is contained in:
mergify[bot] 2019-12-01 16:49:19 +00:00 committed by GitHub
commit d847233f02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 62 deletions

View file

@ -4,5 +4,12 @@
frappe.ui.form.on('Website Route Meta', {
refresh: function(frm) {
frm.get_field('__newname').set_label('Route');
frm.add_custom_button(__('Visit Web Page'), () => {
let route = frm.doc.name;
if (!route.startsWith('/')) {
route = '/' + route;
}
window.open(route, '_blank');
});
}
});

View file

@ -1,97 +1,43 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"allow_rename": 1,
"autoname": "Prompt",
"beta": 0,
"creation": "2019-02-16 17:37:27.918909",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"meta_tags"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "meta_tags",
"fieldtype": "Table",
"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": "Meta Tags",
"length": 0,
"no_copy": 0,
"options": "Website Meta Tag",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"reqd": 1
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-02-16 17:37:27.918909",
"modified": "2019-11-28 17:26:49.068372",
"modified_by": "Administrator",
"module": "Website",
"name": "Website Route Meta",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
"track_changes": 1
}