Compare commits

...

32 Commits

Author SHA1 Message Date
snipe
750c376725 Set item to null so it doesn’t get merged automatically 2025-09-29 13:29:00 +01:00
snipe
08630d948f Remove radio buttons - they don’t work correctly yet 2025-09-29 12:43:19 +01:00
snipe
dc6ee342c5 Revert custom field name text box for now 2025-09-29 10:42:40 +01:00
snipe
eea1922841 Added checkbox and radios 2025-09-25 13:22:52 +01:00
snipe
57824848e9 Update resources/views/blade/form-row.blade.php
Co-authored-by: Marcus Moore <mmoore@grokability.com>
2025-09-24 17:08:00 +01:00
snipe
235dcbc7d9 Updated more views 2025-09-24 16:58:35 +01:00
snipe
f0561475cc Update resources/views/blade/input/text.blade.php
Co-authored-by: Marcus Moore <mmoore@grokability.com>
2025-09-24 16:41:56 +01:00
snipe
3b4c51bab6 Use slot instead of label 2025-09-24 14:52:29 +01:00
snipe
150c205615 Added checkboxes to status labels page 2025-09-23 21:37:17 +01:00
snipe
cde22977b0 More checkbox changes 2025-09-23 21:23:03 +01:00
snipe
1c09657631 Handle checkboxes 2025-09-23 20:57:33 +01:00
snipe
02a4268180 Switched more fields to blade compaonents 2025-09-23 19:52:58 +01:00
snipe
f8362f4a45 handled text fields in status labels 2025-09-23 18:44:06 +01:00
snipe
682c1a8fa7 Make required false 2025-09-23 18:43:50 +01:00
snipe
3863e82dcc Handle text and date fields on license edit 2025-09-23 18:43:39 +01:00
snipe
b766f6e2b5 Made edit screen narrower on wide screens 2025-09-23 18:43:14 +01:00
snipe
a3bad98096 Added date and tooltip components 2025-09-23 18:43:02 +01:00
snipe
33e7425dee Account for tooltips 2025-09-23 18:42:46 +01:00
snipe
2554b50b38 Updated suppliers 2025-09-23 17:04:49 +01:00
snipe
433a3e11fd Fixed field type 2025-09-23 17:00:03 +01:00
snipe
c3efdd0c8d Updated company 2025-09-23 16:59:09 +01:00
snipe
d2e3a13043 Added ability to mark fields as disabled 2025-09-23 16:58:53 +01:00
snipe
c4923fa971 Updated address 2025-09-23 16:53:52 +01:00
snipe
253026de5d Updated locations edit 2025-09-23 16:51:55 +01:00
snipe
a59914e9f9 Added placeholder back in 2025-09-23 16:38:12 +01:00
snipe
671e79f01b Sorry, this shouldn’t have been in there :( 2025-09-23 16:35:04 +01:00
snipe
5c716c3f24 Updated notes maxlength 2025-09-23 16:31:20 +01:00
snipe
e138c9307e Added maxlength default for text 2025-09-23 16:30:18 +01:00
snipe
7c0c3b2bb8 Use shorthand for errors 2025-09-23 16:26:28 +01:00
snipe
514711ddbb Label blade component 2025-09-23 16:18:00 +01:00
snipe
9023eda66f Changed class 2025-09-23 14:25:52 +01:00
snipe
8ce3001ef9 First stab 2025-09-23 14:25:40 +01:00
32 changed files with 1089 additions and 473 deletions

View File

@@ -67,6 +67,38 @@ body:
- Safari
- Microsoft Edge
- Other
- type: dropdown
id: on-demo
attributes:
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 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 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:
@@ -102,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

View File

@@ -16,19 +16,85 @@
@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')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
:$errors
name="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')
<!-- Model Number -->
<x-form-row
:label="trans('general.model_no')"
:$item
name="model_number"
/>
<!-- Order number -->
<x-form-row
:label="trans('general.order_number')"
:$item
name="order_number"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Purchase date -->
<x-form-row
:label="trans('general.purchase_date')"
:$item
name="purchase_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
/>
<!-- Purchase cost -->
<x-form-row
:label="trans('general.unit_cost')"
:$item
name="purchase_cost"
type="number"
maxlength="25"
min="0.00"
max="99999999999999999.000"
step="0.001"
input_div_class="col-md-4 col-sm-12"
/>
<!-- QTY -->
<x-form-row
:label="trans('general.quantity')"
:$item
input_div_class="col-md-2"
name="qty"
/>
<!-- Min Amount -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="min_amt"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
:info_tooltip_text="trans('general.min_amt_help')"
/>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('accessories_upload_path')])
@stop

View File

@@ -1,3 +0,0 @@
<p>
Hi.
</p>

View File

@@ -4,7 +4,7 @@
'object_type' => '',
])
<!-- begin non-ajaxed file listing table -->
<!-- begin ajaxed file listing table -->
<div class="table-responsive">
<table
data-columns="{{ \App\Presenters\UploadedFilesPresenter::dataTableLayout() }}"
@@ -30,6 +30,4 @@
</div>
<!-- end non-ajaxed file listing table -->
<!-- end ajaxed file listing table -->

View File

@@ -0,0 +1,5 @@
<!-- form-label blade component -->
<label {{ $attributes->merge(['class' => 'control-label']) }}>
{{ $slot }}
</label>

View File

@@ -0,0 +1,107 @@
<!-- form-row blade component -->
@props([
'checkbox_value' => null,
'disabled' => false,
'div_style' => null,
'error_offset_class' => 'col-md-7 col-md-offset-3',
'errors',
'help_text' => 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,
'label' => null,
'label_class' => 'col-md-3 col-sm-12 col-xs-12',
'label_style' => null,
'max' => null,
'maxlength' => 191,
'min' => null,
'minlength' => null,
'name' => null,
'placeholder' => null,
'step' => null,
'type' => 'text',
'value' => null,
'value_text' => null,
])
<div {{ $attributes->merge(['class' => 'form-group']) }}>
@if (isset($label))
<x-form-label
:for="$name"
:style="$label_style ?? null"
class="{{ $label_class }}"
>
{{ $label }}
</x-form-label>
@else
@php
$input_div_class = $input_div_class . ' ' . $error_offset_class;
@endphp
@endif
<div {{ $attributes->merge(['class' => $input_div_class, 'style' => $div_style]) }}>
@php
$blade_type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type;
@endphp
<x-dynamic-component
:$checkbox_value
:$disabled
:$input_group_addon
:$input_style
:$item
:$max
:$maxlength
:$min
:$minlength
:$name
:$placeholder
:$step
:$type
:$value_text
:aria-label="$name"
:class="$input_class"
:component="'input.'.$blade_type"
:id="$name"
:required="Helper::checkIfRequired($item, $name)"
:value="old($name, $item->{$name})"
/>
</div>
@if ($info_tooltip_text)
<!-- Info Tooltip -->
<div class="col-md-1 text-left" style="padding-left:0; margin-top: 5px;">
<x-input.info-tooltip>
{{ $info_tooltip_text }}
</x-input.info-tooltip>
</div>
@endif
@error($name)
<!-- Form Error -->
<div {{ $attributes->merge(['class' => $error_offset_class]) }}>
<span class="alert-msg" role="alert">
<i class="fas fa-times" aria-hidden="true"></i>
{{ $message }}
</span>
</div>
@enderror
@if ($help_text)
<!-- Help Text -->
<div {{ $attributes->merge(['class' => $error_offset_class]) }}>
<p class="help-block">
{!! $help_text !!}
</p>
</div>
@endif
</div>

View File

@@ -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,
])
<label class="form-control{{ $disabled ? ' form-control--disabled' : '' }}">
<input type="checkbox" name="{{ $name }}" aria-label="{{ $name }}" value="{{ $checkbox_value }}" @checked(old($name, $item->$name)) {!! $disabled ? 'class="disabled" disabled' : '' !!}>
{{ $value_text ?? $label }}
</label>

View File

@@ -0,0 +1,12 @@
@props([
'item' => null,
'input_style' => null,
'end_date' => null,
])
<!-- Datepicker -->
<div {{ $attributes->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 : '' }}>
<input type="text" {{ $attributes->merge(['class' => 'form-control']) }}>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>

View File

@@ -0,0 +1,4 @@
<a href="#" data-tooltip="true" title="{{ $slot }}" style="padding-left: 0px;">
<x-icon type="more-info" style="font-size: 20px;" />
<span class="sr-only">{{ $slot }}</span>
</a>

View File

@@ -0,0 +1,15 @@
@props([
'item' => null,
'field_name' => null,
'input_style' => null,
'required' => false,
'disabled' => false,
'name' => null,
'label' => null,
'value_text' => null,
])
<label class="form-control{{ $disabled ? ' form-control--disabled' : '' }}">
<input type="radio" name="{{ $name }}" aria-label="{{ $name }}" @checked(old($name)) {!! $disabled ? 'class="disabled" disabled' : '' !!}>
{{ $value_text ?? $label }}
</label>

View File

@@ -0,0 +1,15 @@
@props([
'input_style' => null,
'input_group_addon' => null,
'required' => false,
'item' => null,
])
<!-- input-text blade component -->
<input
{{ $attributes->merge(['class' => 'form-control', 'style' => $input_style]) }}
@required($required)
/>
@if ($input_group_addon)
<span class="input-group-addon">{{ $input_group_addon }}</span>
@endif

View File

@@ -9,7 +9,12 @@
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Type -->
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">

View File

@@ -8,26 +8,48 @@
{{-- 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')
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Phone -->
<x-form-row
:label="trans('general.phone')"
:$item
name="phone"
type="tel"
/>
<!-- Fax -->
<x-form-row
:label="trans('general.fax')"
:$item
name="fax"
type="tel"
/>
<!-- Email -->
<x-form-row
:label="trans('general.email')"
:$item
name="fax"
type="email"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('companies_upload_path')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
</div>
</div>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -16,20 +16,100 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@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')
<!-- QTY -->
<x-form-row
:label="trans('general.quantity')"
:$item
name="qty"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
/>
<!-- Min Amount -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="min_amt"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
:info_tooltip_text="trans('general.min_amt_help')"
/>
<x-form-row
:label="trans('admin/hardware/form.serial')"
:$item
name="serial"
type="text"
/>
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
<!-- Model Number -->
<x-form-row
:label="trans('general.model_no')"
:$item
name="model_number"
input_div_class="col-md-5 col-sm-12"
/>
@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')
<!-- Order number -->
<x-form-row
:label="trans('general.order_number')"
:$item
name="order_number"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Purchase date -->
<x-form-row
:label="trans('general.purchase_date')"
:$item
name="purchase_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
/>
<!-- Purchase cost -->
<x-form-row
:label="trans('general.unit_cost')"
:$item
name="purchase_cost"
type="number"
maxlength="25"
min="0.00"
max="99999999999999999.000"
step="0.001"
input_div_class="col-md-4 col-sm-12"
/>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')])

View File

@@ -15,19 +15,98 @@
@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')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@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')
<!-- Model Number -->
<x-form-row
:label="trans('general.model_no')"
:$item
name="model_number"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Model Number -->
<x-form-row
:label="trans('admin/consumables/general.item_no')"
:$item
name="item_no"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Order number -->
<x-form-row
:label="trans('general.order_number')"
:$item
name="order_number"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Purchase date -->
<x-form-row
:label="trans('general.purchase_date')"
:$item
name="purchase_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
/>
<!-- Purchase cost -->
<x-form-row
:label="trans('general.unit_cost')"
:$item
name="purchase_cost"
type="number"
maxlength="25"
min="0.00"
max="99999999999999999.000"
step="0.001"
input_div_class="col-md-4 col-sm-12"
/>
<!-- QTY -->
<x-form-row
:label="trans('general.quantity')"
:$item
name="qty"
input_div_class="col-md-2"
/>
<!-- Min Amount -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="min_amt"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
:info_tooltip_text="trans('general.min_amt_help')"
/>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('consumables_upload_path')])
@stop

View File

@@ -40,16 +40,16 @@
<div class="col-md-8">
<!-- Name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">
{{ trans('admin/custom_fields/general.field_name') }}
</label>
<div class="col-md-8 required">
<input class="form-control" aria-label="name" name="name" type="text" required value="{{ old('name', $field->name) }}">
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">
{{ trans('admin/custom_fields/general.field_name') }}
</label>
<div class="col-md-8 required">
<input class="form-control" aria-label="name" name="name" type="text" required value="{{ old('name', $field->name) }}">
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Element Type -->
<div class="form-group {{ $errors->has('element') ? ' has-error' : '' }}">

View File

@@ -11,7 +11,12 @@
@stop
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@stop

View File

@@ -7,7 +7,12 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/departments/table.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Company -->
@if (\App\Models\Company::canManageUsersCompanies())
@@ -16,8 +21,21 @@
<input id="hidden_company_id" type="hidden" name="company_id" value="{{ Auth::user()->company_id }}">
@endif
@include ('partials.forms.edit.phone')
@include ('partials.forms.edit.fax')
<!-- Phone -->
<x-form-row
:label="trans('general.phone')"
:$item
name="phone"
type="tel"
/>
<!-- Fax -->
<x-form-row
:label="trans('general.fax')"
:$item
name="fax"
type="tel"
/>
<!-- Manager -->
@include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id'])
@@ -26,20 +44,15 @@
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
@include ('partials.forms.edit.image-upload', ['image_path' => app('departments_upload_path')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -9,17 +9,23 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/depreciations/general.depreciation_name')])
<!-- Months -->
<div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
<label for="months" class="col-md-3 control-label">
{{ trans('admin/depreciations/general.number_of_months') }}
</label>
<div class="col-md-9 col-sm-12">
<input class="form-control" type="number" min="0" max="3600" name="months" id="months" value="{{ old('months', $item->months) }}" style="width: 90px;"{!! (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' !!} />
{!! $errors->first('months', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Months -->
<x-form-row
:label="'admin/depreciations/general.number_of_months'"
:$item
name="months"
type="number"
min="0"
max="3600"
/>
<!-- Depreciation Minimum -->
<div class="form-group {{ $errors->has('depreciation_min') ? ' has-error' : '' }}">

View File

@@ -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')
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
:$errors
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.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 @@
</legend>
<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')
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
:$errors
name="name"
/> @include ('partials.forms.edit.warranty')
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('admin/hardware/form.expected_checkin'),'fieldname' => 'expected_checkin'])
@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 -->

View File

@@ -6,5 +6,10 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@stop

View File

@@ -25,12 +25,7 @@
<table
data-cookie-id-table="kitModelsTable"
data-columns="{{ \App\Presenters\PredefinedKitPresenter::dataTableModels() }}"
data-side-pagination="server"
data-sort-order="asc"
data-sort-name="name"
id="kitModelsTable"

View File

@@ -23,8 +23,8 @@
<!-- row -->
<div class="row">
<!-- col-md-8 -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0">
<!-- col-md-7 -->
<div class="col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0">
<form id="create-form" class="form-horizontal" method="post" action="{{ (isset($formAction)) ? $formAction : \Request::url() }}" autocomplete="off" role="form" enctype="multipart/form-data">

View File

@@ -13,124 +13,167 @@
{{-- 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'])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Seats -->
<div class="form-group {{ $errors->has('seats') ? ' has-error' : '' }}">
<label for="seats" class="col-md-3 control-label">{{ trans('admin/licenses/form.seats') }}</label>
<div class="col-md-7 col-sm-12">
<div class="col-md-12" style="padding-left:0px">
<input class="form-control" type="text" name="seats" id="seats" value="{{ old('seats', $item->seats) }}" minlength="1" required style="width: 97px;">
</div>
</div>
{!! $errors->first('seats', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
@include ('partials.forms.edit.minimum_quantity')
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license'])
<!-- Seats -->
<x-form-row
:label="trans('admin/licenses/form.seats')"
:$item
name="seats"
input_div_class="col-md-2"
minlength="1"
maxlength="10000"
type="number"
/>
<!-- Min Seats -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="seats"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
:info_tooltip_text="trans('general.min_amt_help')"
/>
<!-- Product Key -->
@can('viewKeys', $item)
<x-form-row
:label="trans('admin/licenses/form.license_key')"
:$item
name="serial"
type="textarea"
maxlength="65000"
/>
@endcan
<!-- Serial-->
@can('viewKeys', $item)
<div class="form-group {{ $errors->has('serial') ? ' has-error' : '' }}">
<label for="serial" class="col-md-3 control-label">{{ trans('admin/licenses/form.license_key') }}</label>
<div class="col-md-7">
<textarea class="form-control" type="text" name="serial" id="serial" rows="5"{{ (Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}>{{ old('serial', $item->serial) }}</textarea>
{!! $errors->first('serial', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@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',])
<!-- Licensed to name -->
<div class="form-group {{ $errors->has('license_name') ? ' has-error' : '' }}">
<label for="license_name" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_name') }}</label>
<div class="col-md-7">
<input class="form-control" type="text" name="license_name" id="license_name" value="{{ old('license_name', $item->license_name) }}" />
{!! $errors->first('license_name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Licensed to name -->
<x-form-row
:label="trans('admin/licenses/form.to_name')"
:$item
name="license_name"
/>
<!-- Licensed to email -->
<div class="form-group {{ $errors->has('license_email') ? ' has-error' : '' }}">
<label for="license_email" class="col-md-3 control-label">{{ trans('admin/licenses/form.to_email') }}</label>
<div class="col-md-7">
<input class="form-control" type="email" name="license_email" id="license_email" value="{{ old('license_email', $item->license_email) }}" />
{!! $errors->first('license_email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Reassignable -->
<div class="form-group {{ $errors->has('reassignable') ? ' has-error' : '' }}">
<div class="col-md-3 control-label">
<strong>{{ trans('admin/licenses/form.reassignable') }}</strong>
</div>
<div class="col-md-7">
<label class="form-control">
<input type="checkbox" name="reassignable" value="1" aria-label="reassignable" @checked(old('reassignable', $item->id ? $item->reassignable : '1'))>
{{ trans('general.yes') }}
</label>
</div>
</div>
<!-- Licensed to email -->
<x-form-row
:label="trans('admin/licenses/form.to_email')"
:$item
name="license_email"
type="email"
/>
<!-- Reassignable -->
<x-form-row
:label="trans('admin/licenses/form.reassignable')"
:$item
name="reassignable"
type="checkbox"
checkbox_value="1"
:value_text="trans('general.yes')"
/>
@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'])
<!-- Expiration Date -->
<div class="form-group {{ $errors->has('expiration_date') ? ' has-error' : '' }}">
<label for="expiration_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.expiration') }}</label>
<!-- Order number -->
<x-form-row
:label="trans('general.order_number')"
:$item
name="order_number"
input_div_class="col-md-5 col-sm-12"
/>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expiration_date" id="expiration_date" value="{{ old('expiration_date', ($item->expiration_date) ? $item->expiration_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('expiration_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<!-- Purchase Order -->
<x-form-row
:label="trans('admin/licenses/form.purchase_order')"
:$item
name="purchase_order"
input_div_class="col-md-5 col-sm-12"
/>
<!-- Purchase cost -->
<x-form-row
:label="trans('general.purchase_cost')"
:$item
name="purchase_cost"
type="number"
maxlength="25"
min="0.00"
max="99999999999999999.000"
step="0.001"
input_div_class="col-md-4 col-sm-12"
/>
<!-- Purchase date -->
<x-form-row
:label="trans('general.purchase_date')"
:$item
name="purchase_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
/>
<!-- Expiration Date -->
<x-form-row
:label="trans('admin/licenses/form.expiration')"
:$item
name="expiration_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('expiration_date', (($item->expiration_date && $item->expiration_date->format('Y-m-d')) ?? ''))"
/>
</div>
<!-- Termination Date -->
<div class="form-group {{ $errors->has('termination_date') ? ' has-error' : '' }}">
<label for="termination_date" class="col-md-3 control-label">{{ trans('admin/licenses/form.termination_date') }}</label>
<x-form-row
:label="trans('admin/licenses/form.termination_date')"
:$item
name="termination_date"
type="date"
input_div_class="col-md-4 col-sm-12"
:value="old('termination_date', (($item->termination_date && $item->termination_date->format('Y-m-d')) ?? ''))"
/>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="termination_date" id="termination_date" value="{{ old('termination_date', ($item->termination_date) ? $item->termination_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('termination_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
{{-- @TODO How does this differ from Order #? --}}
<!-- Purchase Order -->
<div class="form-group {{ $errors->has('purchase_order') ? ' has-error' : '' }}">
<label for="purchase_order" class="col-md-3 control-label">{{ trans('admin/licenses/form.purchase_order') }}</label>
<div class="col-md-3">
<input class="form-control" type="text" name="purchase_order" id="purchase_order" value="{{ old('purchase_order', $item->purchase_order) }}" maxlength="191" />
{!! $errors->first('purchase_order', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.depreciation')
<!-- Maintained -->
<div class="form-group {{ $errors->has('maintained') ? ' has-error' : '' }}">
<div class="col-md-3 control-label"><strong>{{ trans('admin/licenses/form.maintained') }}</strong></div>
<div class="col-md-7">
<label class="form-control">
<input type="checkbox" name="maintained" value="1" aria-label="maintained" @checked(old('maintained', $item->maintained))>
{{ trans('general.yes') }}
</label>
</div>
</div>
<!-- Maintained -->
<x-form-row
:label="trans('admin/licenses/form.maintained')"
:$item
:value_text="trans('general.yes')"
name="maintained"
type="checkbox"
checkbox_value="1"
/>
@include ('partials.forms.edit.notes')
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -9,7 +9,13 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/locations/table.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- parent -->
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/locations/table.parent'), 'fieldname' => 'parent_id'])
@@ -20,25 +26,30 @@
<!-- Company -->
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
@include ('partials.forms.edit.phone')
@include ('partials.forms.edit.fax')
<!-- Phone -->
<x-form-row
:label="trans('general.phone')"
:$item
name="phone"
type="tel"
/>
<!-- Currency -->
<div class="form-group {{ $errors->has('currency') ? ' has-error' : '' }}">
<label for="currency" class="col-md-3 control-label">
{{ trans('admin/locations/table.currency') }}
</label>
<div class="col-md-7">
<input class="form-control" style="width:100px" type="text" name="currency" aria-label="currency" id="currency" value="{{ old('currency', $item->currency) }}"{!! (Helper::checkIfRequired($item, 'currency')) ? ' required' : '' !!} maxlength="3" />
@error('currency')
<span class="alert-msg">
<x-icon type="x" />
{{ $message }}
</span>
@enderror
<!-- Fax -->
<x-form-row
:label="trans('general.fax')"
:$item
name="fax"
type="tel"
/>
</div>
</div>
<!-- Currency -->
<x-form-row
:label="trans('admin/locations/table.currency')"
:$item
name="currency"
maxlength="3"
input_div_class="col-md-2 col-sm-6 col-xs-6"
/>
@include ('partials.forms.edit.address')
@@ -61,22 +72,17 @@
@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')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -43,7 +43,12 @@
<div class="box-body">
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name'), 'required' => 'true'])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- This is a new maintenance -->
@if (!$item->id)

View File

@@ -9,75 +9,68 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/manufacturers/table.name')])
<!-- Name -->
<x-form-row
:label="trans('admin/manufacturers/table.name')"
:$item
name="name"
/>
<!-- URL -->
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
<label for="url" class="col-md-3 control-label">{{ trans('general.url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="text" name="url" id="url" value="{{ old('url', $item->url) }}" />
{!! $errors->first('url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.url')"
:$item
name="url"
type="url"
/>
<!-- Support URL -->
<div class="form-group {{ $errors->has('support_url') ? ' has-error' : '' }}">
<label for="support_url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="url" name="support_url" id="support_url" value="{{ old('support_url', $item->support_url) }}" />
{!! $errors->first('support_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_url')"
:$item
name="support_url"
type="url"
/>
<!-- Warranty Lookup URL -->
<div class="form-group {{ $errors->has('warranty_lookup_url') ? ' has-error' : '' }}">
<label for="support_url" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.warranty_lookup_url') }}
</label>
<div class="col-md-6">
<input class="form-control" type="url" name="warranty_lookup_url" id="warranty_lookup_url" value="{{ old('warranty_lookup_url', $item->warranty_lookup_url) }}" />
<p class="help-block">{!! trans('admin/manufacturers/message.support_url_help') !!}</p>
{!! $errors->first('warranty_lookup_url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.warranty_lookup_url')"
:$item
help_text="{!! trans('admin/manufacturers/message.support_url_help') !!}"
name="warranty_lookup_url"
type="url"
/>
<!-- Support Phone -->
<div class="form-group {{ $errors->has('support_phone') ? ' has-error' : '' }}">
<label for="support_phone" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_phone') }}
</label>
<div class="col-md-6">
<input class="form-control" type="text" name="support_phone" id="support_phone" value="{{ old('support_phone', $item->support_phone) }}" />
{!! $errors->first('support_phone', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_phone')"
:$item
name="support_phone"
type="tel"
/>
<!-- Support Email -->
<div class="form-group {{ $errors->has('support_email') ? ' has-error' : '' }}">
<label for="support_email" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.support_email') }}
</label>
<div class="col-md-6">
<input class="form-control" type="email" name="support_email" id="support_email" value="{{ old('support_email', $item->support_email) }}" />
{!! $errors->first('support_email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/manufacturers/table.support_email')"
:$item
name="support_email"
type="email"
input_div_class="col-md-6 col-sm-12 col-xs-12"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')])
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
<div class="col-md-8">
<x-input.textarea
name="notes"
id="notes"
:value="old('notes', $item->notes)"
placeholder="{{ trans('general.placeholders.notes') }}"
aria-label="notes"
rows="5"
/>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')])
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop

View File

@@ -9,12 +9,37 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name'), 'required' => 'true'])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'asset'])
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
@include ('partials.forms.edit.model_number')
<!-- Model Number -->
<x-form-row
:label="trans('general.model_no')"
:$item
name="model_number"
/>
@include ('partials.forms.edit.depreciation')
@include ('partials.forms.edit.minimum_quantity')
<!-- Min Amount -->
<x-form-row
:label="trans('general.min_amt')"
:$item
name="min_amt"
input_div_class="col-md-2"
minlength="1"
maxlength="5"
type="number"
:info_tooltip_text="trans('general.min_amt_help')"
/>
<!-- require serial boolean -->
<div class="form-group">
@@ -58,7 +83,16 @@
<!-- If $item->id is null we are cloning the model and we need the $model_id variable -->
@livewire('custom-field-set-default-values-for-model', ["model_id" => $item->id ?? $model_id ?? null])
@include ('partials.forms.edit.notes')
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])
@include ('partials.forms.edit.image-upload', ['image_path' => app('models_upload_path')])

View File

@@ -1,35 +1,31 @@
<div class="form-group {{ $errors->has('address') ? ' has-error' : '' }}">
<label for="address" class="col-md-3 control-label">{{ trans('general.address') }}</label>
<div class="col-md-7">
<input class="form-control" aria-label="address" maxlength="191" name="address" type="text" id="address" value="{{ old('address', $item->address) }}">
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.address')"
:$item
:$errors
name="address"
/>
<div class="form-group {{ $errors->has('address2') ? ' has-error' : '' }}">
<label class="sr-only " for="address2">{{ trans('general.address') }}</label>
<div class="col-md-7 col-md-offset-3">
<input class="form-control" aria-label="address2" maxlength="191" name="address2" type="text" value="{{ old('address2', $item->address2) }}">
{!! $errors->first('address2', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.address')"
:$item
:$errors
name="address2"
/>
<div class="form-group {{ $errors->has('city') ? ' has-error' : '' }}">
<label for="city" class="col-md-3 control-label">{{ trans('general.city') }}</label>
<div class="col-md-7">
<input class="form-control" aria-label="city" maxlength="191" name="city" type="text" id="city" value="{{ old('city', $item->city) }}">
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.city')"
:$item
:$errors
name="city"
/>
<div class="form-group {{ $errors->has('state') ? ' has-error' : '' }}">
<label for="state" class="col-md-3 control-label">{{ trans('general.state') }}</label>
<div class="col-md-7">
<input class="form-control" aria-label="state" maxlength="191" name="state" type="text" id="state" value="{{ old('state', $item->state) }}">
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.state')"
:$item
:$errors
name="state"
/>
<div class="form-group {{ $errors->has('country') ? ' has-error' : '' }}">
<label for="country" class="col-md-3 control-label">{{ trans('general.country') }}</label>
@@ -40,10 +36,11 @@
</div>
</div>
<div class="form-group {{ $errors->has('zip') ? ' has-error' : '' }}">
<label for="zip" class="col-md-3 control-label" maxlength="10">{{ trans('general.zip') }}</label>
<div class="col-md-7">
<input class="form-control" name="zip" type="text" id="zip" value="{{ old('zip', $item->zip) }}">
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('general.zip')"
:$item
:$errors
name="zip"
maxlength="10"
input_div_class="col-md-3"
/>

View File

@@ -47,24 +47,22 @@
</legend>
<!-- Menu Alerts Enabled -->
<div class="form-group {{ $errors->has('show_alerts_in_menu') ? 'error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="show_alerts_in_menu" value="1" @checked(old('show_alerts_in_menu', $setting->show_alerts_in_menu))>
{{ trans('admin/settings/general.show_alerts_in_menu') }}
</label>
</div>
</div>
<x-form-row
:item="$setting"
name="show_alerts_in_menu"
type="checkbox"
checkbox_value="1"
:value_text="trans('admin/settings/general.show_alerts_in_menu')"
/>
<!-- Alerts Enabled -->
<div class="form-group {{ $errors->has('alerts_enabled') ? 'error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="alerts_enabled" value="1" @checked(old('alerts_enabled', $setting->alerts_enabled))>
{{ trans('admin/settings/general.alerts_enabled') }}
</label>
</div>
</div>
<x-form-row
:item="$setting"
type="checkbox"
name="alerts_enabled"
checkbox_value="1"
:value_text="trans('admin/settings/general.alerts_enabled')"
/>
</fieldset>
@@ -74,30 +72,24 @@
</legend>
<!-- Alert Email -->
<div class="form-group {{ $errors->has('alert_email') ? 'error' : '' }}">
<div class="col-md-3">
<label for="alert_email">{{ trans('admin/settings/general.alert_email') }}</label>
</div>
<div class="col-md-7">
<input type="text" name="alert_email" value="{{ old('alert_email', $setting->alert_email) }}" class="form-control" placeholder="admin@yourcompany.com,it@yourcompany.com" maxlength="191">
{!! $errors->first('alert_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
<p class="help-block">{{ trans('admin/settings/general.alert_email_help') }}</p>
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.alert_email')"
:item="$setting"
name="alert_email"
:help_text="trans('admin/settings/general.alert_email_help')"
placeholder="admin@yourcompany.com,it@yourcompany.com"
/>
<!-- Admin CC Email -->
<div class="form-group {{ $errors->has('admin_cc_email') ? 'error' : '' }}">
<div class="col-md-3">
<label for="admin_cc_email">{{ trans('admin/settings/general.admin_cc_email') }}</label>
</div>
<div class="col-md-7">
<input type="email" name="admin_cc_email" value="{{ old('admin_cc_email', $setting->admin_cc_email) }}" class="form-control" placeholder="admin@yourcompany.com" maxlength="191">
{!! $errors->first('admin_cc_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
<p class="help-block">{{ trans('admin/settings/general.admin_cc_email_help') }}</p>
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.admin_cc_email')"
:item="$setting"
name="admin_cc_email"
:help_text="trans('admin/settings/general.admin_cc_email_help')"
placeholder="admin@yourcompany.com"
/>
<!-- Always CC Admins -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
@@ -129,72 +121,77 @@
<!-- Alert interval -->
<div class="form-group {{ $errors->has('alert_interval') ? 'error' : '' }}">
<div class="col-md-3">
<label for="alert_interval">{{ trans('admin/settings/general.alert_interval') }}</label>
</div>
<div class="col-md-9">
<input class="form-control" placeholder="30" maxlength="3" style="width: 70px;" name="alert_interval" type="number" value="{{ old('alert_interval', $setting->alert_interval) }}" id="alert_interval">
{!! $errors->first('alert_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Alert threshold -->
<div class="form-group {{ $errors->has('alert_threshold') ? 'error' : '' }}">
<div class="col-md-3">
<label for="alert_threshold">{{ trans('admin/settings/general.alert_inv_threshold') }}</label>
</div>
<div class="col-md-8">
<input class="form-control" placeholder="5" maxlength="3" style="width: 70px;" name="alert_threshold" type="number" value="{{ old('alert_threshold', $setting->alert_threshold) }}" id="alert_threshold">
{!! $errors->first('alert_threshold', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.alert_interval')"
:item="$setting"
name="alert_interval"
type="number"
maxlength="3"
min="0"
max="999"
step="1"
input_div_class="col-md-2 col-sm-6"
/>
<!-- Audit interval -->
<div class="form-group {{ $errors->has('audit_interval') ? 'error' : '' }}">
<div class="col-md-3">
<label for="audit_interval">{{ trans('admin/settings/general.audit_interval') }}</label>
</div>
<div class="input-group col-xs-10 col-sm-6 col-md-6 col-lg-3 col-xl-3">
<input class="form-control" placeholder="12" maxlength="3" name="audit_interval" type="number" id="audit_interval" value="{{ old('audit_interval', $setting->audit_interval) }}">
<span class="input-group-addon">{{ trans('general.months') }}</span>
</div>
<div class="col-md-8 col-md-offset-3">
{!! $errors->first('audit_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.audit_interval_help') }}</p>
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.alert_inv_threshold')"
:item="$setting"
name="alert_threshold"
type="number"
maxlength="3"
min="0"
max="999"
step="1"
input_div_class="col-md-2 col-sm-6"
/>
<!-- Alert threshold -->
<div class="form-group {{ $errors->has('audit_warning_days') ? 'error' : '' }}">
<div class="col-md-3">
<label for="audit_warning_days">{{ trans('admin/settings/general.audit_warning_days') }}</label>
</div>
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
<input class="form-control" placeholder="14" maxlength="3" name="audit_warning_days" type="number" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-8 col-md-offset-3">
{!! $errors->first('audit_warning_days', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.audit_warning_days_help') }}</p>
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.audit_interval')"
:item="$setting"
:help_text="trans('admin/settings/general.audit_interval_help')"
:input_group_addon="trans('general.months')"
name="audit_interval"
type="number"
maxlength="3"
min="0"
max="999"
step="1"
input_div_class="col-md-2 col-sm-6 input-group"
/>
<x-form-row
:label="trans('admin/settings/general.audit_warning_days')"
:item="$setting"
:help_text="trans('admin/settings/general.audit_warning_days_help')"
:input_group_addon="trans('general.days')"
name="audit_warning_days"
type="number"
maxlength="3"
min="0"
max="999"
step="1"
input_div_class="col-md-2 col-sm-6 input-group"
/>
<!-- Due for checkin days -->
<div class="form-group {{ $errors->has('due_checkin_days') ? 'error' : '' }}">
<div class="col-md-3">
<label for="due_checkin_days">{{ trans('admin/settings/general.due_checkin_days') }}</label>
</div>
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
<input class="form-control" placeholder="14" maxlength="3" name="due_checkin_days" type="number" id="due_checkin_days" value="{{ old('due_checkin_days', $setting->due_checkin_days) }}">
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-8 col-md-offset-3">
{!! $errors->first('due_checkin_days', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.due_checkin_days_help') }}</p>
</div>
</div>
<x-form-row
:label="trans('admin/settings/general.due_checkin_days')"
:item="$setting"
:help_text="trans('admin/settings/general.due_checkin_days_help')"
:input_group_addon="trans('general.days')"
name="due_checkin_days"
type="number"
maxlength="3"
min="0"
max="999"
step="1"
input_div_class="col-md-2 col-sm-6 input-group"
placeholder="14"
/>
</fieldset>
</div>

View File

@@ -19,7 +19,12 @@
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<!-- Label type -->
<div class="form-group{{ $errors->has('statuslabel_types') ? ' has-error' : '' }}">
@@ -27,6 +32,7 @@
{{ trans('admin/statuslabels/table.status_type') }}
</label>
<div class="col-md-7 required">
<x-input.select
name="statuslabel_types"
:options="$statuslabel_types"
@@ -50,28 +56,35 @@
</div>
</div>
@include ('partials.forms.edit.notes')
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
<!-- Show in Nav -->
<div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" value="1" name="show_in_nav" id="show_in_nav" {{ old('show_in_nav', $item->show_in_nav) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.show_in_nav') }}
</label>
</div>
</div>
<x-form-row
:label="trans('admin/statuslabels/table.show_in_nav')"
:$item
:value_text="trans('general.yes')"
name="show_in_nav"
type="checkbox"
checkbox_value="1"
/>
<!-- Set as Default -->
<div class="form-group{{ $errors->has('default_label') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" value="1" name="default_label" id="default_label" {{ old('default_label', $item->default_label) == '1' ? ' checked="checked"' : '' }}>
{{ trans('admin/statuslabels/table.default_label') }}
</label>
<p class="help-block"> {{ trans('admin/statuslabels/table.default_label_help') }}</p>
</div>
</div>
<x-form-row
:$item
:value_text="trans('general.yes')"
name="default_label"
checkbox_value="1"
type="checkbox"
help_text="{!! trans('admin/statuslabels/table.default_label_help') !!}"
/>
@stop

View File

@@ -10,30 +10,66 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/suppliers/table.name')])
@include ('partials.forms.edit.address')
<!-- Name -->
<x-form-row
:label="trans('general.name')"
:$item
name="name"
/>
<div class="form-group {{ $errors->has('contact') ? ' has-error' : '' }}">
<label for="contact" class="col-md-3 control-label">{{ trans('admin/suppliers/table.contact') }}</label>
<div class="col-md-7">
<input class="form-control" name="contact" type="text" id="contact" value="{{ old('contact', $item->contact) }}">
{!! $errors->first('contact', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.address')
@include ('partials.forms.edit.phone')
@include ('partials.forms.edit.fax')
@include ('partials.forms.edit.email')
<!-- Contact -->
<x-form-row
:label="trans('admin/suppliers/table.contact')"
:$item
name="contact"
/>
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
<label for="url" class="col-md-3 control-label">{{ trans('general.url') }}</label>
<div class="col-md-7">
<input class="form-control" name="url" type="url" id="url" value="{{ old('url', $item->url) }}">
{!! $errors->first('url', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@include ('partials.forms.edit.notes')
@include ('partials.forms.edit.image-upload', ['image_path' => app('suppliers_upload_path')])
<!-- Phone -->
<x-form-row
:label="trans('general.phone')"
:$item
name="phone"
type="tel"
/>
<!-- Fax -->
<x-form-row
:label="trans('general.fax')"
:$item
name="fax"
type="tel"
/>
<!-- Email -->
<x-form-row
:label="trans('general.email')"
:$item
name="email"
type="email"
/>
<!-- URL -->
<x-form-row
:label="trans('general.url')"
:$item
name="url"
type="url"
/>
@include ('partials.forms.edit.image-upload', ['image_path' => app('suppliers_upload_path')])
<!-- Notes -->
<x-form-row
:label="trans('general.notes')"
:$item
name="notes"
type="textarea"
maxlength="65000"
placeholder="{{ trans('general.placeholders.notes') }}"
/>
@stop