Variable names in templates fixing

This commit is contained in:
roberto 2025-03-08 09:28:07 +01:00
parent 44c76fcefe
commit da4b023aa7
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@
{{ range $counter, $value := $values}}
<input type="hidden" id="FieldsValuesToRemove-{{$field.TypeFieldId}}-{{$counter}}" name="FieldsValuesToRemove-{{$field.TypeFieldId}}-{{$counter}}" value="0"/>
<div class="field">
<div id="FieldsValues-{{$field.TypeFieldId}}-{{$counter}}" class="field-value">{{ field_widget $field.Widget $field.TypeFieldId $counter "" $value $field.Valid_values ""}}</div>
<div id="FieldsValues-{{$field.TypeFieldId}}-{{$counter}}" class="field-value">{{ field_widget $field.Widget $field.TypeFieldId $counter "" $value $field.ValidValues ""}}</div>
<div class="field-buttons">
<button onclick="bm_item_field_delete(this, '{{$field.TypeFieldId}}-{{$counter}}')" id="Delete-{{$field.TypeFieldId}}-{{$counter}}" class="delete" type="button"><i class="bi bi-dash-square" title="Remove"></i></button>
<button onclick="bm_item_field_undelete(this, '{{$field.TypeFieldId}}-{{$counter}}')" id="Undelete-{{$field.TypeFieldId}}-{{$counter}}" hidden class="main" type="button"><i class="bi bi-arrow-counterclockwise" title="Undo"></i></button>

View file

@ -585,7 +585,7 @@ func (app *application) itemCreate(w http.ResponseWriter, r *http.Request) {
Shares: shares,
}
err = response.HXFragment(fullBuf, []string{"items/form.tmpl", "items/fields.tmpl", "items/relations.tmpl"}, "page:content", data)
err = response.HXFragment(fullBuf, []string{"items/form.tmpl", "items/fields.tmpl", "items/relations.tmpl", "items/shares.tmpl"}, "page:content", data)
if err != nil {
app.serverError(w, r, err)
}