Hide the "configure field help" icons until user requests access

user can technically "request access" on "any page" and not just those
with configurable fields..but who cares for now i think..
This commit is contained in:
Lance Edgar 2022-12-27 22:30:25 -06:00
parent dc90abcf09
commit cfc92ac9e7
6 changed files with 117 additions and 62 deletions

View file

@ -13,16 +13,7 @@
${form_body|n}
% else:
% for field in form.fields:
% if form.readonly or (field not in dform and field in form.readonly_fields):
<b-field horizontal
label="${form.get_label(field)}">
${form.render_field_value(field) or h.HTML.tag('span')}
</b-field>
% elif field in dform:
${form.render_buefy_field(field)}
% endif
${form.render_buefy_field(field)}
% endfor
% endif
</section>
@ -116,7 +107,11 @@
template: '#${form.component}-template',
mixins: [FormPosterMixin],
components: {},
props: {},
props: {
% if can_edit_help:
configureFieldsHelp: Boolean,
% endif
},
watch: {},
computed: {},
methods: {
@ -130,6 +125,17 @@
% endif
% if can_edit_help:
configureFieldInit(fieldname) {
this.configureFieldName = fieldname
this.configureFieldLabel = this.fieldLabels[fieldname]
this.configureFieldMarkdown = this.fieldMarkdowns[fieldname]
this.configureFieldShowDialog = true
this.$nextTick(() => {
this.$refs.configureFieldMarkdown.focus()
})
},
configureFieldSave() {
this.configureFieldSaving = true
let url = '${edit_help_url}'