diff --git a/app/templates/macros/forms.html b/app/templates/macros/forms.html index b8a213a0..985f9720 100644 --- a/app/templates/macros/forms.html +++ b/app/templates/macros/forms.html @@ -4,13 +4,16 @@ {% endfor %} {% endmacro %} -{% macro render_field(field, label=None, label_visible=true, right_url=None, right_label=None, fieldclass=None) -%} +{% macro render_field(field, label=None, label_visible=true, right_url=None, right_label=None, fieldclass=None, hint=None) -%}
{% if field.type != 'HiddenField' and label_visible %} {% if not label and label != "" %}{% set label=field.label.text %}{% endif %} {% if label %}{% endif %} {% endif %} {{ field(class_=fieldclass or 'form-control', **kwargs) }} + {% if hint %} + {{ hint | safe }} + {% endif %} {{ render_errors(field) }}
{%- endmacro %} diff --git a/app/templates/packages/update_config.html b/app/templates/packages/update_config.html index 2b2331dd..e04c2210 100644 --- a/app/templates/packages/update_config.html +++ b/app/templates/packages/update_config.html @@ -22,21 +22,13 @@
{{ form.hidden_tag() }} - {{ render_field(form.trigger, class_="mt-5") }} + {{ render_field(form.trigger, class_="mt-5", hint=_("The event which triggers the action to occur.")) }} - {{ render_field(form.ref, placeholder="Leave blank to use default branch", - pattern="[A-Za-z0-9/._-]+") }} + {{ render_field(form.ref, placeholder=_("Leave blank to use default branch"), + pattern="[A-Za-z0-9/._-]+", + hint=_("Currently, the branch name field is only used by the New Commit trigger.")) }} -

- - - - {{ _("Currently, the branch name field is only used by the New Commit trigger.") }} - -

- - - {{ render_field(form.action) }} + {{ render_field(form.action, hint=_("The action to perform.")) }}

{{ render_submit_field(form.submit) }}