mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge pull request #15793 from snipe/allow_eol_explicit
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
Allow user to specify null for calculation or explicit on bulk edit
This commit is contained in:
commit
b6ad69fac2
|
@ -321,7 +321,11 @@ class BulkAssetsController extends Controller
|
||||||
|
|
||||||
if ($request->input('null_asset_eol_date')=='1') {
|
if ($request->input('null_asset_eol_date')=='1') {
|
||||||
$this->update_array['asset_eol_date'] = null;
|
$this->update_array['asset_eol_date'] = null;
|
||||||
$this->update_array['eol_explicit'] = 1;
|
|
||||||
|
// If they are nulling the EOL date to allow it to calculate, set eol explicit to 0
|
||||||
|
if ($request->input('calc_eol')=='1') {
|
||||||
|
$this->update_array['eol_explicit'] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,5 +59,6 @@ return [
|
||||||
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
|
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
|
||||||
'processing_spinner' => 'Processing... (This might take a bit of time on large files)',
|
'processing_spinner' => 'Processing... (This might take a bit of time on large files)',
|
||||||
'optional_infos' => 'Optional Information',
|
'optional_infos' => 'Optional Information',
|
||||||
'order_details' => 'Order Related Information'
|
'order_details' => 'Order Related Information',
|
||||||
|
'calc_eol' => 'If nulling the EOL date, use automatic EOL calculation based on the purchase date and EOL rate.',
|
||||||
];
|
];
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Purchase Date -->
|
<!-- EOL Date -->
|
||||||
<div class="form-group {{ $errors->has('asset_eol_date') ? ' has-error' : '' }}">
|
<div class="form-group {{ $errors->has('asset_eol_date') ? ' has-error' : '' }}">
|
||||||
<label for="eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>
|
<label for="eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
@ -109,6 +109,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-9 col-md-offset-3">
|
||||||
|
<label class="form-control">
|
||||||
|
{{ Form::checkbox('calc_eol', '1', false) }}
|
||||||
|
{{ trans('admin/hardware/form.calc_eol') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||||
|
|
Loading…
Reference in a new issue