From 8ce3001ef9dbcfeb03383eddbea091a737c340c7 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 14:25:40 +0100 Subject: [PATCH 01/32] First stab --- .github/ISSUE_TEMPLATE/Bug-Report.yml | 25 ++++++ resources/views/blade/example.blade.php | 3 - resources/views/blade/filestable.blade.php | 6 +- resources/views/blade/form-row.blade.php | 39 +++++++++ resources/views/blade/input/text.blade.php | 7 ++ resources/views/manufacturers/edit.blade.php | 91 +++++++++++--------- 6 files changed, 122 insertions(+), 49 deletions(-) delete mode 100644 resources/views/blade/example.blade.php create mode 100644 resources/views/blade/form-row.blade.php create mode 100644 resources/views/blade/input/text.blade.php diff --git a/.github/ISSUE_TEMPLATE/Bug-Report.yml b/.github/ISSUE_TEMPLATE/Bug-Report.yml index 523ebc5e2602..badb94e95aff 100644 --- a/.github/ISSUE_TEMPLATE/Bug-Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug-Report.yml @@ -67,6 +67,31 @@ body: - Safari - Microsoft Edge - Other + - type: dropdown + id: on-demo + attributes: + label: Can you reproduce this on the demo at https://demo.snipeitapp.com? + options: + - 'Yes' + - 'No' + - N/A + - type: dropdown + id: fmcs + attributes: + label: Do you have full multiple company support enabled? + description: You can check this in Admin Settings > General Settings > Scoping. + options: + - 'Yes' + - 'No' + - type: dropdown + id: fmcs-location + attributes: + label: If you have full multiple company support enabled, do you have location scoping to company enabled? + description: You can check this in Admin Settings > General Settings > Scoping. + options: + - 'Yes' + - 'No' + - I do not have full multiple company support enabled - type: textarea id: server-logs attributes: diff --git a/resources/views/blade/example.blade.php b/resources/views/blade/example.blade.php deleted file mode 100644 index d1cbb4dee142..000000000000 --- a/resources/views/blade/example.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -

- Hi. -

diff --git a/resources/views/blade/filestable.blade.php b/resources/views/blade/filestable.blade.php index c4b105d6bbc9..8b20ec067b53 100644 --- a/resources/views/blade/filestable.blade.php +++ b/resources/views/blade/filestable.blade.php @@ -4,7 +4,7 @@ 'object_type' => '', ]) - +
- - - \ No newline at end of file + \ No newline at end of file diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php new file mode 100644 index 000000000000..fdb5777d2b15 --- /dev/null +++ b/resources/views/blade/form-row.blade.php @@ -0,0 +1,39 @@ + +@props([ + 'errors', + 'label', + 'field_name', + 'help_text' => null, + 'label_style' => null, + 'label_class' => 'control-label col-md-3 col-sm-12 col-xs-12', + 'div_style' => null, + 'input_style' => null, + 'item' => null, + 'type' => null, +]) + +
+ +
merge(['class' => 'col-md-8 col-sm-12', 'style' => $div_style]) }}> + + + {!! $errors->first($field_name, ' :message') !!} + + @if ($help_text) +

+ {!! $help_text !!} +

+ @endif +
+
diff --git a/resources/views/blade/input/text.blade.php b/resources/views/blade/input/text.blade.php new file mode 100644 index 000000000000..572d61a0a43c --- /dev/null +++ b/resources/views/blade/input/text.blade.php @@ -0,0 +1,7 @@ +@props([ + 'item' => null, + 'field_name' => null, + 'input_style' => null, +]) + +merge(['class' => 'form-control']) }} /> diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 1c9b80777608..fe1fa963817a 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -9,57 +9,64 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/manufacturers/table.name')]) + + + + -
- -
- - {!! $errors->first('url', '') !!} -
-
+ -
- -
- - {!! $errors->first('support_url', '') !!} -
-
+ -
- -
- -

{!! trans('admin/manufacturers/message.support_url_help') !!}

- {!! $errors->first('warranty_lookup_url', '') !!} -
-
+ -
- -
- - {!! $errors->first('support_phone', '') !!} -
-
+ -
- -
- - {!! $errors->first('support_email', '') !!} -
-
+ + @include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')]) From 9023eda66f4abbd4c676f6423bc1a3593277ce96 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 14:25:52 +0100 Subject: [PATCH 02/32] Changed class --- resources/views/manufacturers/edit.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index fe1fa963817a..35352ee27fa9 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -17,7 +17,7 @@ :errors="$errors ?? null" field_name="name" input_style="width: 50%" - class="farts" + class="test" label_style="color: red" /> From 514711ddbb53a9a006c29557b32bdc9b0a590b1c Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:18:00 +0100 Subject: [PATCH 03/32] Label blade component --- resources/views/blade/form-label.blade.php | 9 ++++ resources/views/blade/form-row.blade.php | 55 +++++++++++++------- resources/views/blade/input/text.blade.php | 3 +- resources/views/manufacturers/edit.blade.php | 55 ++++++++------------ 4 files changed, 71 insertions(+), 51 deletions(-) create mode 100644 resources/views/blade/form-label.blade.php diff --git a/resources/views/blade/form-label.blade.php b/resources/views/blade/form-label.blade.php new file mode 100644 index 000000000000..7c638f43d642 --- /dev/null +++ b/resources/views/blade/form-label.blade.php @@ -0,0 +1,9 @@ + +@props([ + 'label', +]) + + + diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index fdb5777d2b15..1fefbe364025 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -2,33 +2,52 @@ @props([ 'errors', 'label', - 'field_name', + 'name' => null, 'help_text' => null, 'label_style' => null, - 'label_class' => 'control-label col-md-3 col-sm-12 col-xs-12', + 'label_class' => 'col-md-3 col-sm-12 col-xs-12', 'div_style' => null, + 'input_div_class' => 'col-md-8 col-sm-12', 'input_style' => null, 'item' => null, - 'type' => null, + 'type' => 'text', + 'placeholder' => null, ]) -
- -
merge(['class' => 'col-md-8 col-sm-12', 'style' => $div_style]) }}> - merge(['class' => 'form-group']) }}> + + + +
merge(['class' => $input_div_class]) }} {{ ($div_style) ? $attributes->merge(['style' => $div_style]):'' }}> + + @php + $type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type; + @endphp + + - {!! $errors->first($field_name, ' :message') !!} + @error($name) + + + {{ $message }} + + @enderror @if ($help_text)

diff --git a/resources/views/blade/input/text.blade.php b/resources/views/blade/input/text.blade.php index 572d61a0a43c..86661c2ad649 100644 --- a/resources/views/blade/input/text.blade.php +++ b/resources/views/blade/input/text.blade.php @@ -2,6 +2,7 @@ 'item' => null, 'field_name' => null, 'input_style' => null, + 'required' => null, ]) -merge(['class' => 'form-control']) }} /> +merge(['class' => 'form-control']) }} {{ ($input_style) ? $attributes->merge(['style' => $input_style]): '' }} {{ ($required ?? false) ? 'required' : '' }} /> diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 35352ee27fa9..b476150ccf90 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -13,78 +13,69 @@ -@include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')]) - -

- -
- - {!! $errors->first('notes', '') !!} -
-
+ @include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')]) + + @stop From 7c0c3b2bb86f09d64807581e946c47589e3bd176 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:26:28 +0100 Subject: [PATCH 04/32] Use shorthand for errors --- resources/views/manufacturers/edit.blade.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index b476150ccf90..b7abacce69dc 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -14,7 +14,7 @@ @@ -22,7 +22,7 @@ @@ -31,7 +31,7 @@ @@ -40,7 +40,7 @@ @@ -59,7 +59,7 @@ From e138c9307eef4353d6218f3734badd1e547efd47 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:30:18 +0100 Subject: [PATCH 05/32] Added maxlength default for text --- resources/views/blade/form-row.blade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index 1fefbe364025..1d1fe3450e48 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -12,6 +12,7 @@ 'item' => null, 'type' => 'text', 'placeholder' => null, + 'maxlength' => 191, ])
merge(['class' => 'form-group']) }}> @@ -40,6 +41,8 @@ class="{{ $label_class }}" :required="Helper::checkIfRequired($item, $name)" :value="old($name, $item->{$name})" :$type + :$maxlength + /> @error($name) From 5c716c3f242dfc7e61febc7d4e1bbede5391926a Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:31:20 +0100 Subject: [PATCH 06/32] Updated notes maxlength --- resources/views/manufacturers/edit.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index b7abacce69dc..64c246d77b6a 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -75,6 +75,7 @@ :$errors name="notes" type="textarea" + maxlength="65000" /> From 671e79f01b8160eb42baf84ec84f30def5e5d9d7 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:35:04 +0100 Subject: [PATCH 07/32] =?UTF-8?q?Sorry,=20this=20shouldn=E2=80=99t=20have?= =?UTF-8?q?=20been=20in=20there=20:(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/Bug-Report.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug-Report.yml b/.github/ISSUE_TEMPLATE/Bug-Report.yml index badb94e95aff..8e7aa1599ae2 100644 --- a/.github/ISSUE_TEMPLATE/Bug-Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug-Report.yml @@ -70,28 +70,35 @@ body: - type: dropdown id: on-demo attributes: - label: Can you reproduce this on the demo at https://demo.snipeitapp.com? + label: Can you reproduce this on the public demo? + description: You can check this at https://demo.snipeitapp.com. options: - 'Yes' - 'No' - N/A + validations: + required: true - type: dropdown id: fmcs attributes: label: Do you have full multiple company support enabled? - description: You can check this in Admin Settings > General Settings > Scoping. + description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`. options: - 'Yes' - 'No' + validations: + required: true - type: dropdown id: fmcs-location attributes: label: If you have full multiple company support enabled, do you have location scoping to company enabled? - description: You can check this in Admin Settings > General Settings > Scoping. + description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`. options: - 'Yes' - 'No' - I do not have full multiple company support enabled + validations: + required: true - type: textarea id: server-logs attributes: @@ -127,4 +134,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md). options: - label: I agree to follow this project's Code of Conduct - required: true + required: true \ No newline at end of file From a59914e9f99f04e1dd5c785aa466183ccd301f94 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:38:12 +0100 Subject: [PATCH 08/32] Added placeholder back in --- resources/views/manufacturers/edit.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index 64c246d77b6a..a778048a665e 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -76,6 +76,7 @@ name="notes" type="textarea" maxlength="65000" + placeholder="{{ trans('general.placeholders.notes') }}" /> From 253026de5db883795eeb6a1f52f41f05cc180209 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:51:55 +0100 Subject: [PATCH 09/32] Updated locations edit --- resources/views/locations/edit.blade.php | 77 ++++++++++++++---------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/resources/views/locations/edit.blade.php b/resources/views/locations/edit.blade.php index 5b83b36ad5fd..e99d11f6c57b 100755 --- a/resources/views/locations/edit.blade.php +++ b/resources/views/locations/edit.blade.php @@ -9,7 +9,14 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')]) + + + @include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/locations/table.parent'), 'fieldname' => 'parent_id']) @@ -20,25 +27,33 @@ @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) -@include ('partials.forms.edit.phone') -@include ('partials.forms.edit.fax') + + - -
- -
- - @error('currency') - - - {{ $message }} - - @enderror + + -
-
+ + @include ('partials.forms.edit.address') @@ -61,22 +76,18 @@ @endif -@include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')]) + @include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')]) -
- -
- - {!! $errors->first('notes', '') !!} -
-
+ + @stop From c4923fa9716971b6bc5653a62dfe411dd779457b Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:53:52 +0100 Subject: [PATCH 10/32] Updated address --- .../partials/forms/edit/address.blade.php | 69 +++++++++---------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/resources/views/partials/forms/edit/address.blade.php b/resources/views/partials/forms/edit/address.blade.php index 12214b956b26..556f44cdcf3b 100644 --- a/resources/views/partials/forms/edit/address.blade.php +++ b/resources/views/partials/forms/edit/address.blade.php @@ -1,35 +1,31 @@ -
- -
- - {!! $errors->first('address', '') !!} -
-
+ -
- -
- - {!! $errors->first('address2', '') !!} -
-
+ -
- -
- - {!! $errors->first('city', '') !!} -
-
+ -
- -
- - {!! $errors->first('state', '') !!} - -
-
+
@@ -40,10 +36,11 @@
-
- -
- - {!! $errors->first('zip', '') !!} -
-
+ From d2e3a13043a5357267a9f3e57d299feb36b84bcd Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:58:53 +0100 Subject: [PATCH 11/32] Added ability to mark fields as disabled --- resources/views/blade/form-row.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index 1d1fe3450e48..a459d58cd4ee 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -13,6 +13,7 @@ 'type' => 'text', 'placeholder' => null, 'maxlength' => 191, + 'disabled' => false, ])
merge(['class' => 'form-group']) }}> @@ -42,6 +43,7 @@ class="{{ $label_class }}" :value="old($name, $item->{$name})" :$type :$maxlength + :$disabled /> From c3efdd0c8de0d3cc182b33d2fd3f9d7af38304d2 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 16:59:09 +0100 Subject: [PATCH 12/32] Updated company --- resources/views/companies/edit.blade.php | 65 +++++++++++++++++------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/resources/views/companies/edit.blade.php b/resources/views/companies/edit.blade.php index d6b9cf9afdac..8167a8d075c9 100644 --- a/resources/views/companies/edit.blade.php +++ b/resources/views/companies/edit.blade.php @@ -8,26 +8,53 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')]) -@include ('partials.forms.edit.phone') -@include ('partials.forms.edit.fax') -@include ('partials.forms.edit.email') + + + + + + + + + + + + + @include ('partials.forms.edit.image-upload', ['image_path' => app('companies_upload_path')]) -
- -
- - - -
-
+ + @stop From 433a3e11fd7bc34ed3bb938293db7136501132b9 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 17:00:03 +0100 Subject: [PATCH 13/32] Fixed field type --- resources/views/companies/edit.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/companies/edit.blade.php b/resources/views/companies/edit.blade.php index 8167a8d075c9..1c68fbe0f781 100644 --- a/resources/views/companies/edit.blade.php +++ b/resources/views/companies/edit.blade.php @@ -40,7 +40,7 @@ :$item :$errors name="fax" - type="tel" + type="email" /> From 2554b50b383cbbafbd59de2bacc2f76fec900698 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 17:04:49 +0100 Subject: [PATCH 14/32] Updated suppliers --- resources/views/suppliers/edit.blade.php | 93 +++++++++++++++++------- 1 file changed, 68 insertions(+), 25 deletions(-) diff --git a/resources/views/suppliers/edit.blade.php b/resources/views/suppliers/edit.blade.php index 9fc21a37f8e3..e664e5cfdd0c 100755 --- a/resources/views/suppliers/edit.blade.php +++ b/resources/views/suppliers/edit.blade.php @@ -10,30 +10,73 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/suppliers/table.name')]) -@include ('partials.forms.edit.address') - -
- -
- - {!! $errors->first('contact', '') !!} -
-
- -@include ('partials.forms.edit.phone') -@include ('partials.forms.edit.fax') -@include ('partials.forms.edit.email') - -
- -
- - {!! $errors->first('url', '') !!} -
-
- -@include ('partials.forms.edit.notes') -@include ('partials.forms.edit.image-upload', ['image_path' => app('suppliers_upload_path')]) + + + + @include ('partials.forms.edit.address') + + + + + + + + + + + + + + + + + + @include ('partials.forms.edit.image-upload', ['image_path' => app('suppliers_upload_path')]) + + + + @stop From 33e7425dee352744d8302d8ac45ec612ff04f5c6 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:42:46 +0100 Subject: [PATCH 15/32] Account for tooltips --- resources/views/blade/form-row.blade.php | 51 ++++++++++++++++++------ 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index a459d58cd4ee..982e796ce0ca 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -13,7 +13,13 @@ 'type' => 'text', 'placeholder' => null, 'maxlength' => 191, + 'minlength' => null, + 'min' => null, + 'max' => null, + 'step' => null, 'disabled' => false, + 'error_offset_class' => 'col-md-7 col-md-offset-3', + 'info_tooltip_text' => null, ])
merge(['class' => 'form-group']) }}> @@ -28,11 +34,11 @@ class="{{ $label_class }}"
merge(['class' => $input_div_class]) }} {{ ($div_style) ? $attributes->merge(['style' => $div_style]):'' }}> @php - $type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type; + $blade_type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type; @endphp +
+ + + @if ($info_tooltip_text) + +
+ + {{ $info_tooltip_text }} + +
+ @endif + @error($name) - - - {{ $message }} - + +
merge(['class' => $error_offset_class]) }}> + + + {{ $message }} + +
@enderror @if ($help_text) -

- {!! $help_text !!} -

- @endif -
+ +
merge(['class' => $error_offset_class]) }}> +

+ {!! $help_text !!} +

+
+ @endif +
From a3bad98096b9df586d8d47207e817df8795bd0b2 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:43:02 +0100 Subject: [PATCH 16/32] Added date and tooltip components --- resources/views/blade/input/date.blade.php | 12 ++++++++++++ resources/views/blade/input/info-tooltip.blade.php | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 resources/views/blade/input/date.blade.php create mode 100644 resources/views/blade/input/info-tooltip.blade.php diff --git a/resources/views/blade/input/date.blade.php b/resources/views/blade/input/date.blade.php new file mode 100644 index 000000000000..5e7db2146175 --- /dev/null +++ b/resources/views/blade/input/date.blade.php @@ -0,0 +1,12 @@ +@props([ + 'item' => null, + 'input_style' => null, + 'end_date' => null, +]) + + +
merge(['class' => 'input-group date']) }} data-provide="datepicker" data-date-today-highlight="true" data-date-language="{{ auth()->user()->locale }}" data-date-locale="{{ auth()->user()->locale }}" data-date-format="yyyy-mm-dd" data-date-autoclose="true" data-date-clear-btn="true"{{ $end_date ? ' data-date-end-date=' . $end_date : '' }}> + merge(['class' => 'form-control']) }}> + + +
\ No newline at end of file diff --git a/resources/views/blade/input/info-tooltip.blade.php b/resources/views/blade/input/info-tooltip.blade.php new file mode 100644 index 000000000000..c8a45dcc84f7 --- /dev/null +++ b/resources/views/blade/input/info-tooltip.blade.php @@ -0,0 +1,4 @@ + + + {{ $slot }} + \ No newline at end of file From b766f6e2b546bfe39e206632aa2b1046950e6af6 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:43:14 +0100 Subject: [PATCH 17/32] Made edit screen narrower on wide screens --- resources/views/layouts/edit-form.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/edit-form.blade.php b/resources/views/layouts/edit-form.blade.php index 4f1ffc002e12..954c779e7fb1 100644 --- a/resources/views/layouts/edit-form.blade.php +++ b/resources/views/layouts/edit-form.blade.php @@ -23,8 +23,8 @@
- -
+ +
From 3863e82dcc6b58997864905270e00c1dd565f787 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:43:39 +0100 Subject: [PATCH 18/32] Handle text and date fields on license edit --- resources/views/licenses/edit.blade.php | 216 +++++++++++++++--------- 1 file changed, 138 insertions(+), 78 deletions(-) diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index 87b018021606..9f01ec654c01 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -13,54 +13,76 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/licenses/form.name')]) -@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license']) + + + + @include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license']) + + + + + + + + + + @can('viewKeys', $item) + + @endcan - -
- -
-
- -
-
- {!! $errors->first('seats', '
') !!} -
-@include ('partials.forms.edit.minimum_quantity') - - -@can('viewKeys', $item) -
- -
- - {!! $errors->first('serial', '') !!} -
-
-@endcan @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) @include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id',]) - -
- -
- - {!! $errors->first('license_name', '') !!} -
-
- - -
- -
- - {!! $errors->first('license_email', '') !!} -
-
+ + + + +
@@ -77,46 +99,75 @@ @include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id']) -@include ('partials.forms.edit.order_number') -@include ('partials.forms.edit.purchase_cost') -@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date']) - - -
- - -
-
- - -
- {!! $errors->first('expiration_date', '') !!} -
-
+ + + + + + + + + + + + + + + + + -
- - -
-
- - -
- {!! $errors->first('termination_date', '') !!} -
-
+ -{{-- @TODO How does this differ from Order #? --}} - -
- -
- - {!! $errors->first('purchase_order', '') !!} -
-
@include ('partials.forms.edit.depreciation') @@ -131,6 +182,15 @@
-@include ('partials.forms.edit.notes') + + @stop From 682c1a8fa772f2950fc52ef62763a7b77d660ea8 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:43:50 +0100 Subject: [PATCH 19/32] Make required false --- resources/views/blade/input/text.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/blade/input/text.blade.php b/resources/views/blade/input/text.blade.php index 86661c2ad649..cad74d80b312 100644 --- a/resources/views/blade/input/text.blade.php +++ b/resources/views/blade/input/text.blade.php @@ -2,7 +2,7 @@ 'item' => null, 'field_name' => null, 'input_style' => null, - 'required' => null, + 'required' => false, ]) merge(['class' => 'form-control']) }} {{ ($input_style) ? $attributes->merge(['style' => $input_style]): '' }} {{ ($required ?? false) ? 'required' : '' }} /> From f8362f4a45fe927aac2a293953082bcde518e9fb Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 18:44:06 +0100 Subject: [PATCH 20/32] handled text fields in status labels --- resources/views/statuslabels/edit.blade.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.php index 138f0cb7b5ad..35c009cc1e5a 100755 --- a/resources/views/statuslabels/edit.blade.php +++ b/resources/views/statuslabels/edit.blade.php @@ -19,7 +19,13 @@ @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')]) + +
@@ -27,6 +33,7 @@ {{ trans('admin/statuslabels/table.status_type') }}
+
-@include ('partials.forms.edit.notes') + +
From 02a4268180e16f5442d9901641f513168272e8aa Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 Sep 2025 19:52:58 +0100 Subject: [PATCH 21/32] Switched more fields to blade compaonents --- resources/views/accessories/edit.blade.php | 90 ++++++++++++++-- resources/views/components/edit.blade.php | 108 ++++++++++++++++++-- resources/views/consumables/edit.blade.php | 106 +++++++++++++++++-- resources/views/hardware/edit.blade.php | 21 +++- resources/views/layouts/edit-form.blade.php | 2 +- resources/views/models/edit.blade.php | 46 ++++++++- 6 files changed, 338 insertions(+), 35 deletions(-) diff --git a/resources/views/accessories/edit.blade.php b/resources/views/accessories/edit.blade.php index a327df5fa9a8..4bce82feb93c 100644 --- a/resources/views/accessories/edit.blade.php +++ b/resources/views/accessories/edit.blade.php @@ -16,18 +16,92 @@ @section('inputFields') @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')]) + + @include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true','category_type' => 'accessory']) @include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id']) @include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) -@include ('partials.forms.edit.model_number') -@include ('partials.forms.edit.order_number') -@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date']) -@include ('partials.forms.edit.purchase_cost', ['currency_type' => $item->location->currency ?? null, 'unit_cost' => trans('general.unit_cost')]) -@include ('partials.forms.edit.quantity') -@include ('partials.forms.edit.minimum_quantity') -@include ('partials.forms.edit.notes') + + + + + + + + + + + + + + + + + + + + + @include ('partials.forms.edit.image-upload', ['image_path' => app('accessories_upload_path')]) diff --git a/resources/views/components/edit.blade.php b/resources/views/components/edit.blade.php index c6445cf1e0be..61e5871e7826 100644 --- a/resources/views/components/edit.blade.php +++ b/resources/views/components/edit.blade.php @@ -16,20 +16,108 @@ {{-- Page content --}} @section('inputFields') -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')]) + + + @include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id','category_type' => 'component']) -@include ('partials.forms.edit.quantity') -@include ('partials.forms.edit.minimum_quantity') -@include ('partials.forms.edit.serial', ['fieldname' => 'serial']) -@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id']) -@include ('partials.forms.edit.model_number') + + + + + + + + + + @include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id']) + + + + @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) @include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id']) -@include ('partials.forms.edit.order_number') -@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date']) -@include ('partials.forms.edit.purchase_cost', ['unit_cost' => trans('general.unit_cost')]) -@include ('partials.forms.edit.notes') + + + + + + + + + + + + @include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')]) diff --git a/resources/views/consumables/edit.blade.php b/resources/views/consumables/edit.blade.php index 4ce6de9d7833..b7e4cc69cdbd 100644 --- a/resources/views/consumables/edit.blade.php +++ b/resources/views/consumables/edit.blade.php @@ -15,19 +15,107 @@ @section('inputFields') @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) -@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')]) + + + + @include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'consumable']) @include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id']) @include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id']) -@include ('partials.forms.edit.model_number') -@include ('partials.forms.edit.item_number') -@include ('partials.forms.edit.order_number') -@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date']) -@include ('partials.forms.edit.purchase_cost', [ 'unit_cost' => trans('general.unit_cost')]) -@include ('partials.forms.edit.quantity') -@include ('partials.forms.edit.minimum_quantity') -@include ('partials.forms.edit.notes') + + + + + + + + + + + + + + + + + + + + + + + + + + + @include ('partials.forms.edit.image-upload', ['image_path' => app('consumables_upload_path')]) @stop diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 58f920e5b624..9d324619aa9a 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -70,7 +70,16 @@ @include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.checkout_to'), 'fieldname' => 'assigned_location', 'style' => 'display:none;', 'required' => 'false']) @endif - @include ('partials.forms.edit.notes') + + @include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'rtd_location_id', 'help_text' => trans('general.rtd_location_help')]) @include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')]) @@ -111,8 +120,14 @@
@@ -30,7 +29,6 @@ @@ -79,7 +74,6 @@ @@ -88,7 +82,6 @@ @@ -109,7 +101,6 @@ @@ -118,7 +109,6 @@ @@ -31,7 +30,6 @@ @@ -40,7 +38,6 @@ @@ -49,7 +46,6 @@ - @include ('partials.forms.edit.name', ['translated_name' => trans('general.name'), 'required' => 'true']) + + @if (!$item->id) diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php index a778048a665e..1de00c8a916e 100755 --- a/resources/views/manufacturers/edit.blade.php +++ b/resources/views/manufacturers/edit.blade.php @@ -14,7 +14,6 @@ @@ -22,7 +21,6 @@ @@ -31,7 +29,6 @@ @@ -40,7 +37,6 @@ @@ -59,7 +54,6 @@ @@ -25,7 +24,6 @@ @@ -35,7 +33,6 @@ @@ -61,7 +60,6 @@ @@ -24,7 +23,6 @@ @@ -33,7 +31,6 @@ @@ -42,7 +39,6 @@ @@ -51,7 +47,6 @@ @@ -60,7 +55,6 @@ @@ -71,7 +65,6 @@ Date: Wed, 24 Sep 2025 17:08:00 +0100 Subject: [PATCH 28/32] Update resources/views/blade/form-row.blade.php Co-authored-by: Marcus Moore --- resources/views/blade/form-row.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index f4e5e92f7fc6..0a7f2b5cd684 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -33,7 +33,7 @@ class="{{ $label_class }}" -
merge(['class' => $input_div_class]) }} {{ ($div_style) ? $attributes->merge(['style' => $div_style]):'' }}> +
merge(['class' => $input_div_class, 'style' => $div_style]) }} > @php $blade_type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type; From eea1922841b830a1af1e2b4b4393dae2c8c7d387 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 25 Sep 2025 13:22:52 +0100 Subject: [PATCH 29/32] Added checkbox and radios --- .../views/blade/form-row-checkbox.blade.php | 70 ------ resources/views/blade/form-row.blade.php | 63 +++-- .../views/blade/input/checkbox.blade.php | 16 ++ resources/views/blade/input/radio.blade.php | 15 ++ resources/views/blade/input/text.blade.php | 7 +- resources/views/licenses/edit.blade.php | 6 +- resources/views/settings/alerts.blade.php | 216 ++++++++++-------- resources/views/statuslabels/edit.blade.php | 6 +- 8 files changed, 198 insertions(+), 201 deletions(-) delete mode 100644 resources/views/blade/form-row-checkbox.blade.php create mode 100644 resources/views/blade/input/checkbox.blade.php create mode 100644 resources/views/blade/input/radio.blade.php diff --git a/resources/views/blade/form-row-checkbox.blade.php b/resources/views/blade/form-row-checkbox.blade.php deleted file mode 100644 index f46abec918c1..000000000000 --- a/resources/views/blade/form-row-checkbox.blade.php +++ /dev/null @@ -1,70 +0,0 @@ - -@props([ - 'errors', - 'label' => null, - 'name' => null, - 'help_text' => null, - 'label_style' => null, - 'label_class' => 'col-md-3 col-sm-12 col-xs-12', - 'input_div_class' => 'col-md-8 col-sm-12', - 'type' => 'checkbox', - 'item' => null, - 'disabled' => false, - 'error_offset_class' => 'col-md-7 col-md-offset-3', - 'info_tooltip_text' => null, - 'value_text' => null, - 'checkbox_value' => null, -]) - -
merge(['class' => 'form-group']) }}> - - - {{ $label ?? $value_text }} - - -
merge(['class' => $input_div_class]) }}> - - - -
- - - - - @if ($info_tooltip_text) - -
- - {{ $info_tooltip_text }} - -
- @endif - - - @error($name) - -
merge(['class' => $error_offset_class]) }}> - - - {{ $message }} - -
- @enderror - - @if ($help_text) - -
merge(['class' => $error_offset_class]) }}> -

- {!! $help_text !!} -

-
- @endif - -
diff --git a/resources/views/blade/form-row.blade.php b/resources/views/blade/form-row.blade.php index 0a7f2b5cd684..377c357f145f 100644 --- a/resources/views/blade/form-row.blade.php +++ b/resources/views/blade/form-row.blade.php @@ -1,29 +1,35 @@ @props([ + 'checkbox_value' => null, + 'disabled' => false, + 'div_style' => null, + 'error_offset_class' => 'col-md-7 col-md-offset-3', 'errors', - 'label', - 'name' => null, 'help_text' => null, - 'label_style' => null, - 'label_class' => 'col-md-3 col-sm-12 col-xs-12', - 'div_style' => null, + 'info_tooltip_text' => null, + 'input_class' => null, 'input_div_class' => 'col-md-8 col-sm-12', + 'input_group_addon' => null, 'input_style' => null, 'item' => null, - 'type' => 'text', - 'placeholder' => null, + 'label' => null, + 'label_class' => 'col-md-3 col-sm-12 col-xs-12', + 'label_style' => null, + 'max' => null, 'maxlength' => 191, - 'minlength' => null, 'min' => null, - 'max' => null, + 'minlength' => null, + 'name' => null, + 'placeholder' => null, 'step' => null, - 'disabled' => false, - 'error_offset_class' => 'col-md-7 col-md-offset-3', - 'info_tooltip_text' => null, + 'type' => 'text', + 'value' => null, + 'value_text' => null, ])
merge(['class' => 'form-group']) }}> + @if (isset($label)) {{ $label }} + @else + @php + $input_div_class = $input_div_class . ' ' . $error_offset_class; + @endphp + @endif -
merge(['class' => $input_div_class, 'style' => $div_style]) }} > +
merge(['class' => $input_div_class, 'style' => $div_style]) }}> @php $blade_type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type; @endphp
diff --git a/resources/views/blade/input/checkbox.blade.php b/resources/views/blade/input/checkbox.blade.php new file mode 100644 index 000000000000..6e86cee32596 --- /dev/null +++ b/resources/views/blade/input/checkbox.blade.php @@ -0,0 +1,16 @@ +@props([ + 'item' => null, + 'field_name' => null, + 'input_style' => null, + 'required' => false, + 'disabled' => false, + 'checkbox_value' => null, + 'name' => null, + 'label' => null, + 'value_text' => null, +]) + + \ No newline at end of file diff --git a/resources/views/blade/input/radio.blade.php b/resources/views/blade/input/radio.blade.php new file mode 100644 index 000000000000..2bb3ea2185a6 --- /dev/null +++ b/resources/views/blade/input/radio.blade.php @@ -0,0 +1,15 @@ +@props([ + 'item' => null, + 'field_name' => null, + 'input_style' => null, + 'required' => false, + 'disabled' => false, + 'name' => null, + 'label' => null, + 'value_text' => null, +]) + + \ No newline at end of file diff --git a/resources/views/blade/input/text.blade.php b/resources/views/blade/input/text.blade.php index 0d13581fd3b6..29b52c546807 100644 --- a/resources/views/blade/input/text.blade.php +++ b/resources/views/blade/input/text.blade.php @@ -1,7 +1,6 @@ @props([ - 'item' => null, - 'field_name' => null, 'input_style' => null, + 'input_group_addon' => null, 'required' => false, ]) @@ -9,3 +8,7 @@ {{ $attributes->merge(['class' => 'form-control', 'style' => $input_style]) }} @required($required) /> + +@if ($input_group_addon) + {{ $input_group_addon }} +@endif diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index de4a1db6b614..710d13afca27 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -79,10 +79,11 @@ /> - @@ -155,11 +156,12 @@ @include ('partials.forms.edit.depreciation') - diff --git a/resources/views/settings/alerts.blade.php b/resources/views/settings/alerts.blade.php index c861cc63bf7b..9800fb29ec43 100644 --- a/resources/views/settings/alerts.blade.php +++ b/resources/views/settings/alerts.blade.php @@ -47,24 +47,22 @@ -
-
- -
-
+ -
-
- -
-
+ @@ -74,30 +72,41 @@ -
-
- -
-
- - {!! $errors->first('alert_email', '
') !!} -

{{ trans('admin/settings/general.alert_email_help') }}

- -
-
- + -
-
- -
-
- - {!! $errors->first('admin_cc_email', '
') !!} -

{{ trans('admin/settings/general.admin_cc_email_help') }}

-
-
+ + + + + + + +
diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.php index 6ad2d286e94f..454b7ace5709 100755 --- a/resources/views/statuslabels/edit.blade.php +++ b/resources/views/statuslabels/edit.blade.php @@ -67,20 +67,22 @@ /> - - From dc6ee342c5a154df5852143d8087152c419023a0 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 29 Sep 2025 10:42:40 +0100 Subject: [PATCH 30/32] Revert custom field name text box for now --- .../views/custom_fields/fields/edit.blade.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.php index b7b039927e22..ec5ca0048392 100644 --- a/resources/views/custom_fields/fields/edit.blade.php +++ b/resources/views/custom_fields/fields/edit.blade.php @@ -41,11 +41,15 @@
- +
+ +
+ + {!! $errors->first('name', '') !!} +
+
From 08630d948fdeee2919f2e9d4b929c02a84b95a52 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 29 Sep 2025 12:43:19 +0100 Subject: [PATCH 31/32] =?UTF-8?q?Remove=20radio=20buttons=20-=20they=20don?= =?UTF-8?q?=E2=80=99t=20work=20correctly=20yet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/settings/alerts.blade.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/resources/views/settings/alerts.blade.php b/resources/views/settings/alerts.blade.php index 9800fb29ec43..86d93a4c77ea 100644 --- a/resources/views/settings/alerts.blade.php +++ b/resources/views/settings/alerts.blade.php @@ -90,23 +90,6 @@ /> - - - - -