diff --git a/tailbone/forms/core.py b/tailbone/forms/core.py index f4fa79e4..beae42a4 100644 --- a/tailbone/forms/core.py +++ b/tailbone/forms/core.py @@ -1043,9 +1043,17 @@ class Form(object): if field_type: attrs['type'] = field_type if messages: - attrs[':message'] = '[{}]'.format(', '.join([ - "'{}'".format(msg.replace("'", r"\'")) - for msg in messages])) + if len(messages) == 1: + msg = messages[0] + if msg.startswith('`') and msg.endswith('`'): + attrs[':message'] = msg + else: + attrs['message'] = msg + else: + # nb. must pass an array as JSON string + attrs[':message'] = '[{}]'.format(', '.join([ + "'{}'".format(msg.replace("'", r"\'")) + for msg in messages])) # merge anything caller provided attrs.update(bfield_attrs) diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 41d75fc2..b428aaa6 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -1374,6 +1374,7 @@ class Grid(object): """ context = dict(kwargs) context['grid'] = self + context['request'] = self.request context['data_prop'] = data_prop context['empty_labels'] = empty_labels if 'grid_columns' not in context: diff --git a/tailbone/static/css/layout.css b/tailbone/static/css/layout.css index 0761d001..ef5c5352 100644 --- a/tailbone/static/css/layout.css +++ b/tailbone/static/css/layout.css @@ -90,6 +90,11 @@ header span.header-text { * "object helper" panel ******************************/ +.object-helpers .panel { + margin: 1rem; + margin-bottom: 1.5rem; +} + .object-helpers .panel-heading { white-space: nowrap; } diff --git a/tailbone/templates/forms/deform.mako b/tailbone/templates/forms/deform.mako index db63a424..8a940347 100644 --- a/tailbone/templates/forms/deform.mako +++ b/tailbone/templates/forms/deform.mako @@ -55,12 +55,16 @@ % if form.auto_disable_save or form.auto_disable: + :disabled="${form.component_studly}Submitting" + icon-pack="fas" + icon-left="save"> {{ ${form.component_studly}ButtonText }} % else: + native-type="submit" + icon-pack="fas" + icon-left="save"> ${getattr(form, 'submit_label', getattr(form, 'save_label', "Submit"))} % endif diff --git a/tailbone/templates/generate_feature.mako b/tailbone/templates/generate_feature.mako index 18c9a7a2..6b0d781f 100644 --- a/tailbone/templates/generate_feature.mako +++ b/tailbone/templates/generate_feature.mako @@ -87,7 +87,7 @@
New Column @@ -97,7 +97,7 @@
Delete All @@ -164,11 +164,13 @@ diff --git a/tailbone/templates/generated-projects/create.mako b/tailbone/templates/generated-projects/create.mako index 32d205a0..6c3af299 100644 --- a/tailbone/templates/generated-projects/create.mako +++ b/tailbone/templates/generated-projects/create.mako @@ -8,7 +8,8 @@ <%def name="page_content()"> % if project_type: - + ${project_type} % endif -