mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-09 21:07:41 -08:00
setting created
This commit is contained in:
parent
552f90ae2c
commit
3ff1745f56
|
@ -342,6 +342,8 @@ class SettingsController extends Controller
|
|||
$setting->depreciation_method = $request->input('depreciation_method');
|
||||
$setting->dash_chart_type = $request->input('dash_chart_type');
|
||||
$setting->profile_edit = $request->input('profile_edit', 0);
|
||||
$setting->require_checkinout_notes = $request->input('require_checkinout_notes', 0);
|
||||
|
||||
|
||||
if ($request->input('per_page') != '') {
|
||||
$setting->per_page = $request->input('per_page');
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('require_checkinout_notes')->nullable()->default(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('settings', 'require_checkinout_notes')) {
|
||||
$table->dropColumn('require_checkinout_notes');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
|
@ -276,6 +276,8 @@ return [
|
|||
'two_factor_enrollment_text' => "Two factor authentication is required, however your device has not been enrolled yet. Open your Google Authenticator app and scan the QR code below to enroll your device. Once you've enrolled your device, enter the code below",
|
||||
'require_accept_signature' => 'Require Signature',
|
||||
'require_accept_signature_help_text' => 'Enabling this feature will require users to physically sign off on accepting an asset.',
|
||||
'require_checkinout_notes' => 'Require Notes on Checkin/Checkout',
|
||||
'require_checkinout_notes_help_text' => 'Enabling this feature will require the note fields to be populated when checking in or checking out an asset.',
|
||||
'left' => 'left',
|
||||
'right' => 'right',
|
||||
'top' => 'top',
|
||||
|
|
|
@ -200,6 +200,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Require Notes on checkin/checkout checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label>
|
||||
{{ trans('admin/settings/general.require_checkinout_notes') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="require_checkinout_notes" {{ (old('require_checkinout_notes', $setting->require_checkinout_notes)) == '1' ? ' checked="checked"' : '' }} aria-label="require_checkinout_notes">
|
||||
{{ trans('general.yes') }}
|
||||
</label>
|
||||
<p class="help-block">{{ trans('admin/settings/general.require_checkinout_notes_help_text') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
||||
|
||||
<!-- login text -->
|
||||
<div class="form-group {{ $errors->has('login_note') ? 'error' : '' }}">
|
||||
|
|
Loading…
Reference in a new issue