diff --git a/app/controllers/devices/label_controller.rb b/app/controllers/devices/label_controller.rb index 0da958b..4289d14 100644 --- a/app/controllers/devices/label_controller.rb +++ b/app/controllers/devices/label_controller.rb @@ -17,4 +17,8 @@ def set_device device = Device.find params[:device_id] @device = ConnectedDevice.new(device: device) end + + def label_configuration_params + params.fetch(:label_configuration, {}).permit(:port_orientation) + end end diff --git a/app/views/devices/label/show.html.haml b/app/views/devices/label/show.html.haml index fb29503..d80a406 100644 --- a/app/views/devices/label/show.html.haml +++ b/app/views/devices/label/show.html.haml @@ -2,6 +2,15 @@ -# -# SPDX-License-Identifier: AGPL-3.0-or-later += form_with model: @label_configuration, url: device_label_path(device_id: @device.id), builder: BulmaFormBuilder::HorizontalBulmaFormBuilder, method: :get do |form| + .field.is-horizontal + .field-label + = form.label :port_orientation, class: 'field-label' + .field-body + = form.select :port_orientation, ['left', 'right'], class: 'field-body' + = form.submit + + %table.label-table %thead %tr.device_head