fix: UX for Website Route Meta
This commit is contained in:
parent
70266d0919
commit
caaa0fd1e6
3 changed files with 11 additions and 3 deletions
|
|
@ -28,6 +28,11 @@ def get_data():
|
|||
"name": "Website Slideshow",
|
||||
"description": _("Embed image slideshows in website pages."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Website Route Meta",
|
||||
"description": _("Add meta tags to your web pages"),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Website Route Meta', {
|
||||
refresh: function() {
|
||||
|
||||
refresh: function(frm) {
|
||||
frm.get_field('__newname').set_label('Route');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,4 +6,7 @@ from __future__ import unicode_literals
|
|||
from frappe.model.document import Document
|
||||
|
||||
class WebsiteRouteMeta(Document):
|
||||
pass
|
||||
def validate(self):
|
||||
if self.name and self.name.startswith('/'):
|
||||
self.name = self.name[1:]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue