Skip to content

A free open source IT asset/license management system

Fixed alignment

snipe18dd40c65634
diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php
index 9ce853b814..6586967e16 100755
--- a/resources/views/hardware/edit.blade.php
+++ b/resources/views/hardware/edit.blade.php
@@ -148,7 +148,19 @@
<div id="optional_details" class="col-md-12" style="display:none">
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
@include ('partials.forms.edit.warranty')
- @include ('partials.forms.edit.datetimepicker', ['translated_name' => trans('admin/hardware/form.expected_checkin'),'fieldname' => 'expected_checkin'])
+ <x-form.row
+ :label="trans('admin/hardware/form.expected_checkin')"
+ name="expected_checkin"
+ input_div_class="input-group col-md-4"
+ >
+ <x-slot:input>
+ <x-input.datetimepicker
+ name="expected_checkin"
+ :value="old('expected_checkin', $item->expected_checkin?->format('Y-m-d H:i:s'))"
+ :required="Helper::checkIfRequired($item, 'expected_checkin')"
+ />
+ </x-slot:input>
+ </x-form.row>
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.next_audit_date'),'fieldname' => 'next_audit_date', 'help_text' => trans('general.next_audit_date_help')])
<!-- byod checkbox -->
<div class="form-group byod">
diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php
index 0cddecdc8c..3ab5720636 100644
--- a/resources/views/models/custom_fields_form.blade.php
+++ b/resources/views/models/custom_fields_form.blade.php
@@ -88,14 +88,20 @@
@elseif ($field->format=='DATETIME')
- <x-input.datetimepicker
- id="{{ $field->db_column_name() }}"
- name="{{ $field->db_column_name() }}"
- :value="old($field->db_column_name(), isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))"
- col_size_class="col-md-5"
- required="{{ ($field->pivot->required=='1') ? '1' : '' }}"
- :default_now="false"
- />
+ {{-- Outer wrapper with inline padding-left: 0 to
+ match the DATE case above. Later duplicate
+ .input-group[class*="col-"] CSS rules re-apply
+ 15px padding that would otherwise indent the
+ widget; the inline style forces it to zero. --}}
+ <div class="input-group col-md-5" style="padding-left: 0px;">
+ <x-input.datetimepicker
+ id="{{ $field->db_column_name() }}"
+ name="{{ $field->db_column_name() }}"
+ :value="old($field->db_column_name(), isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))"
+ required="{{ ($field->pivot->required=='1') ? '1' : '' }}"
+ :default_now="false"
+ />
+ </div>
@else
diff --git a/resources/views/models/custom_fields_form_bulk_edit.blade.php b/resources/views/models/custom_fields_form_bulk_edit.blade.php
index f09775adc1..4893afe4f5 100644
--- a/resources/views/models/custom_fields_form_bulk_edit.blade.php
+++ b/resources/views/models/custom_fields_form_bulk_edit.blade.php
@@ -120,13 +120,18 @@
@elseif ($field->format=='DATETIME')
- <x-input.datetimepicker
- id="{{ $field->db_column_name() }}"
- name="{{ $field->db_column_name() }}"
- :value="old($field->db_column_name(), isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : '')"
- col_size_class="col-md-5"
- :default_now="false"
- />
+ {{-- Outer wrapper with inline padding-left: 0 to match
+ the DATE case above; conflicting duplicate CSS
+ rules for .input-group[class*="col-"] otherwise
+ re-apply the 15px grid padding. --}}
+ <div class="input-group col-md-5" style="padding-left: 0px;">
+ <x-input.datetimepicker
+ id="{{ $field->db_column_name() }}"
+ name="{{ $field->db_column_name() }}"
+ :value="old($field->db_column_name(), isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : '')"
+ :default_now="false"
+ />
+ </div>
@else
diff --git a/resources/views/partials/forms/edit/datetimepicker.blade.php b/resources/views/partials/forms/edit/datetimepicker.blade.php
deleted file mode 100644
index e96fbe52c6..0000000000
--- a/resources/views/partials/forms/edit/datetimepicker.blade.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- Datetimepicker -->
-<div class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}">
- <label for="{{ $fieldname }}" class="col-md-3 control-label">{{ $translated_name }}</label>
- <div class="input-group col-md-4">
- <x-input.datetimepicker
- name="{{ $fieldname }}"
- value="{{ old($fieldname, ($item->{$fieldname}) ? date('Y-m-d H:i:s', strtotime($item->{$fieldname})) : '') }}"
- required="{{ Helper::checkIfRequired($item, $fieldname) }}"
- />
- <x-form.error :name="$fieldname" />
- </div>
- @if (isset($help_text))
- <div class="col-md-8 col-md-offset-3">
- <p class="help-block">
- {!! $help_text !!}
- </p>
- </div>
- @endif
-</div>
-
-<!-- /Datetimepicker -->