Commit a11b1acb authored by Janis Streib's avatar Janis Streib 🦉
Browse files

ADD: preselection for fqdn-type on record creation (closes #267)

parent 15f07edf
Pipeline #146761 passed with stages
in 6 minutes and 48 seconds
......@@ -180,7 +180,7 @@ export default {
createItem: function () {
this.db_editor_function = 'create'
this.db_editor_old_data = {}
this.db_editor_presets = {fqdn: this.fqdn.value}
this.db_editor_presets = {fqdn: this.fqdn.value, fqdn_type: ''}
this.$root.$emit('bv::show::modal', 'create_record')
},
editFQDN: function (item) {
......
......@@ -674,6 +674,7 @@ export default {
type: record_type,
data: data,
fqdn: fqdn,
fqdn_type: '',
target_is_singleton: recobj === null ? false : recobj.target_is_singleton_dflt,
target_is_reverse_unique: recobj === null ? false : recobj.target_is_reverse_unique_dflt
}
......@@ -706,7 +707,8 @@ export default {
}
}
}
this.create_record_reducer = {type: false}
const record_reducer = Object.assign({'': {display_name: 'Automatische Behandlung'}}, this.full_edit_fqdn_reducer.type)
this.create_record_reducer = {type: false, fqdn_type: record_reducer}
this.$root.$emit('bv::show::modal', 'create_record')
},
async fetchData() {
......@@ -941,7 +943,7 @@ export default {
setTimeout(() => window.scrollTo({
left: window.scrollX,
top: target.offsetTop + offset,
behavior: 'smooth'
behavior: 'smooth/**/'
}), 350)
}
}
......
......@@ -42,9 +42,12 @@ export default {
for (const t of response.data[3]) {
selections[t.record_type] = {display_name: t.record_type}
}
const record_fqdn_type_reducer = Object.assign({'': {display_name: 'Automatische Behandlung'}}, this.full_edit_fqdn_reducer.type)
this.create_record_reducer = {}
this.create_record_reducer = {
fqdn: false,
type: selections
type: selections,
fqdn_type: record_fqdn_type_reducer
}
this.fqdn = response.data[2][0]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment