diff --git a/assets/static/css/main.css b/assets/static/css/main.css index 17d211b..ba70c7c 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -203,7 +203,7 @@ input, select, textarea{ border: 1px solid #ccc !important; width: 100%; font: inherit; - padding: 8px; + padding: 6px; border-radius: 4px; } diff --git a/assets/static/js/main.js b/assets/static/js/main.js index 47be81e..d07b040 100644 --- a/assets/static/js/main.js +++ b/assets/static/js/main.js @@ -182,6 +182,20 @@ function bm_item_field_undelete(sender, field_name) { document.getElementById('FieldsValues-' + field_name).classList.remove('field-opaque'); } +function bm_type_field_delete(sender, type_field_id) { + document.getElementById('Fields-' + type_field_id + '-ToRemove').value = '1'; + sender.hidden = true; + document.getElementById('Undelete-' + type_field_id).hidden = false; + document.getElementById('Field-' + type_field_id).classList.add('field-opaque'); +} + +function bm_type_field_undelete(sender, type_field_id) { + document.getElementById('Fields-' + type_field_id + '-ToRemove').value = ''; + sender.hidden = true; + document.getElementById('Delete-' + type_field_id).hidden = false; + document.getElementById('Field-' + type_field_id).classList.remove('field-opaque'); +} + function bm_showMessage() { document.getElementById('message').show(); setTimeout(() => { diff --git a/assets/templates/types/field_new.tmpl b/assets/templates/types/field_new.tmpl index 42e095a..ccd17e2 100644 --- a/assets/templates/types/field_new.tmpl +++ b/assets/templates/types/field_new.tmpl @@ -19,6 +19,7 @@ {{ widget_select (print "Fields-" .Type_field_id "-Ui_section") "Section" "general" $.uisections `class=" w3-border"` }} +
{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }} @@ -30,9 +31,8 @@ {{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }}
{{ widget_checkbox "Fields-{{.Type_field_id}}-Show_on_list" "Show on list" "1" .Show_on_list }} @@ -35,15 +36,8 @@