Merge branch 'develop' into get_role_permissions-js-consistency

This commit is contained in:
Marica 2022-11-21 15:38:33 +05:30 committed by GitHub
commit 209ecd02fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View file

@ -280,10 +280,7 @@ frappe.PrintFormatBuilder = class PrintFormatBuilder {
set_section(f.label);
} else if (f.fieldtype === "Column Break") {
set_column();
} else if (
!in_list(["Section Break", "Column Break", "Tab Break", "Fold"], f.fieldtype) &&
f.label
) {
} else if (!in_list(frappe.model.layout_fields, f.fieldtype)) {
if (!column) set_column();
if (f.fieldtype === "Table") {

View file

@ -34,7 +34,7 @@
<span class="drag-handle">
<svg class="icon icon-xs"><use href="#icon-drag"></use></svg>
</span>
<span class="field-label">{{ __(field.label) }}
<span class="field-label">{{ __(field.label) || __(field.fieldname) }}
<span> ({%= __("Table") %})</span>
</span>
<a class="pull-right select-columns btn btn-default btn-xs">

View file

@ -577,6 +577,8 @@ def get_link_options(web_form_name, doctype, allow_read_on_all_link_options=Fals
if not allow_read_on_all_link_options:
limited_to_user = True
else:
frappe.throw(_("You must be logged in to use this form."), frappe.PermissionError)
else:
for field in web_form_doc.web_form_fields:
@ -607,4 +609,4 @@ def get_link_options(web_form_name, doctype, allow_read_on_all_link_options=Fals
return "\n".join([doc.value for doc in link_options])
else:
raise frappe.PermissionError(f"Not Allowed, {doctype}")
raise frappe.PermissionError(_("You don't have permission to access the {0} DocType.").format(doctype))

View file

@ -14,9 +14,10 @@ class NotPermittedPage(TemplatePage):
return True
def render(self):
action = f"/login?redirect-to={frappe.request.path}"
frappe.local.message_title = _("Not Permitted")
frappe.local.response["context"] = dict(
indicator_color="red", primary_action="/login", primary_label=_("Login"), fullpage=True
indicator_color="red", primary_action=action, primary_label=_("Login"), fullpage=True
)
self.set_standard_path("message")
return super().render()

View file

@ -161,7 +161,7 @@ frappe.ready(function() {
.text("{{ _('Invalid Password') }}");
},
200: function(r) {
if (r.message && r.message.entropy) {
if (r.message && r.message.score) {
var score = r.message.score,
feedback = r.message.feedback;