diff --git a/src/components/PatchActionForm.vue b/src/components/PatchActionForm.vue index 35bbb977354ca355515e744a0b5ba1c9a7f44a69..f7a46dce48519ae168797211f25770cda6eef1e2 100644 --- a/src/components/PatchActionForm.vue +++ b/src/components/PatchActionForm.vue @@ -113,7 +113,7 @@ <b-form-group :description="$t('components.patch_request_form.lacp_hint')" v-if="['patch'].includes(selected_action)"> <b-checkbox switch v-if="['patch'].includes(selected_action)" v-model="use_lacp" - class="mb-3" id="bcd-tagged">{{ $t('components.patch_request_form.lacp') }} + class="mb-3" id="use-lacp">{{ $t('components.patch_request_form.lacp') }} </b-checkbox> </b-form-group> <!-- INSERT TYPES --> @@ -136,7 +136,7 @@ </template> </template> <!-- COMMENT --> - <b-form-group :label="$t('components.patch_request_form.comment')" label-for="comment-input"> + <b-form-group :label="$t('components.patch_request_form.comment') + ((this.use_lacp || this.add_tagged) ? (' (' + $t('components.patch_request_form.required') + ')') : '')" label-for="comment-input"> <b-form-textarea :placeholder="$t('components.patch_request_form.comment_placeholder')" :disabled="loading_edit_action" @@ -452,7 +452,8 @@ export default { this.selected_room && this.selected_module && this.selected_action && - (this.selected_p_port || (['change_insert'].includes(this.selected_action) && this.selected_insert_type !== null)) + (this.selected_p_port || (['change_insert'].includes(this.selected_action) && this.selected_insert_type !== null)) && + ((!this.add_tagged && !this.use_lacp) || this.comment.length > 0) }, insert_type_options() { return Object.keys(this.insert_types).map(name => { diff --git a/src/locales/de.json b/src/locales/de.json index cc01ba36f80f3dbea593c70fb6ab62deceb6a81b..a4c96ed64aa04e3a600292a905b2a6138df8ea4c 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -328,7 +328,8 @@ "tagged_hint": "BCD wird zusätzlich als tagged VLAN aufgelegt. Andernfalls wird sie untagged aufgelegt und ersetzt damit das bereits ggf. untagged aufliegende VLAN.", "title": "Patch-Antrag erstellen", "lacp_hint": "Es soll eine Link-Aggregation-Group erzeugt werden (mehrere Switchports werden als virtueller Port zusammengefasst)", - "lacp": "Benutze LACP" + "lacp": "Benutze LACP", + "required": "Pflichtfeld" }, "record_delete_button": { "delete_note": "Falls FQDN gelöscht wird: Alle den FQDN referenzierende Records mitlöschen", diff --git a/src/locales/en.json b/src/locales/en.json index 29dc6c571f9e6af4412acefc169001ceaa38df83..68eb39416ed6d0fa0521e5402fe31532b17bf64e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -327,7 +327,8 @@ "tagged_hint": "BCD is additionally added as tagged VLAN to the port. Otherwise it will be added untagged and thus replaces the existing VLAN.", "title": "Make a new patch request", "lacp_hint": "Create a link aggregation group (multiple switchports will be grouped as a virtual port with higher bandwith)", - "lacp": "Use LACP for the link" + "lacp": "Use LACP for the link", + "required": "Required" }, "record_delete_button": { "delete_note": "If FQDN is deleted: All records referencing the FQDN are also deleted.",