Updated production assets

Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
This commit is contained in:
snipe 2023-04-06 15:00:38 -07:00
commit c683233aa3
66 changed files with 974 additions and 1038 deletions

View file

@ -92,7 +92,7 @@ class BulkAssetModelsController extends Controller
AssetModel::whereIn('id', $models_raw_array)->update($update_array);
return redirect()->route('models.index')
->with('success', trans('admin/models/message.bulkedit.success'));
->with('success', trans_choice('admin/models/message.bulkedit.success', count($models_raw_array), ['model_count' => count($models_raw_array)]));
}
return redirect()->route('models.index')

View file

@ -38,7 +38,6 @@
"chart.js": "^2.9.4",
"css-loader": "^4.0.0",
"ekko-lightbox": "^5.1.1",
"icheck": "^1.0.2",
"imagemin": "^8.0.1",
"jquery-form-validator": "^2.3.79",
"jquery-slimscroll": "^1.3.8",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/js/dist/all.js vendored

Binary file not shown.

View file

@ -1,8 +1,8 @@
{
"/js/build/app.js": "/js/build/app.js?id=4300e10fce87e56d57d190b9487a5788",
"/js/build/app.js": "/js/build/app.js?id=59ddb05ca277a4e3a8b8cf3c2f5c01b8",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=392cc93cfc0be0349bab9697669dd091",
"/css/build/overrides.css": "/css/build/overrides.css?id=65f62931cea7258a2b655268f7085cbd",
"/css/build/app.css": "/css/build/app.css?id=eeb524c41b0c1f1713410f3a264b3ed1",
"/css/build/overrides.css": "/css/build/overrides.css?id=0f8376a8d39550aeee63a29445d177c1",
"/css/build/app.css": "/css/build/app.css?id=0b476eb0ac88a657b91bc5bfb7ab0534",
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=f25c77ed07053646a42e9c19923d24fa",
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=268041e902b019730c23ee3875838005",
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=c3aebf96518113fe22517a67c6ec1dc1",
@ -18,9 +18,7 @@
"/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=b48f4d8af0e1ca5621c161e93951109f",
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=f0fbbb0ac729ea092578fb05ca615460",
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=b9a74ec0cd68f83e7480d5ae39919beb",
"/css/dist/all.css": "/css/dist/all.css?id=519b2564d91d336687125e348791563f",
"/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f2122815b2e4b150",
"/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b2414bd51dac5",
"/css/dist/all.css": "/css/dist/all.css?id=29aefa88aeb1e2e938c741fd1aa15037",
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
"/css/webfonts/fa-brands-400.ttf": "/css/webfonts/fa-brands-400.ttf?id=2df05d4beaa48550d71234e8dca79141",
@ -32,9 +30,9 @@
"/css/webfonts/fa-v4compatibility.ttf": "/css/webfonts/fa-v4compatibility.ttf?id=a947172f4fde88e43b4c1a60b01db061",
"/css/webfonts/fa-v4compatibility.woff2": "/css/webfonts/fa-v4compatibility.woff2?id=bbc23038a6067c78310d3f19432a3ebf",
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=ee4896df8b8f008ce73a9a0c2549aefd",
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",
"/js/build/vendor.js": "/js/build/vendor.js?id=3843eca1b2e670b29c1e1cb57e1d7aa7",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",
"/js/dist/all.js": "/js/dist/all.js?id=7dc8edf9b594414cb1141bbc39d15383",
"/js/dist/all.js": "/js/dist/all.js?id=abb8cd9afe481e321ed279c6a2dfed3d",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=b48f4d8af0e1ca5621c161e93951109f",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=8f449de09e00c15481b144b44b1a7185",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=1f33ca3d860461c1127ec465ab3ebb6b",

View file

@ -185,14 +185,6 @@ $(document).ready(function () {
}
});
/*
* iCheck checkbox plugin
*/
$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
/*
@ -607,26 +599,14 @@ function htmlEntities(str) {
})(jQuery);
/**
* Universal Livewire Select2 and iCheck integration
* Universal Livewire Select2 integration
*
* How to use:
*
* 1. Set the class of your select2 elements to 'livewire-select2' and your icheck elements to 'livewire-icheck' (as appropriate).
* (For iCheck, you may still need to apply the other iCheck classes like 'minimal' or 'iCheck')
* 1. Set the class of your select2 elements to 'livewire-select2').
* 2. Name your element to match a property in your Livewire component
* 3. Add an attribute called 'data-livewire-component' that points to $_instance->id (via `{{ }}` if you're in a blade,
* or just $_instance->id if not).
* 4. For iCheck, you need to wrap the 'checkbox' element with wire:ignore - perhaps in the <label> if it wraps the
* <input> element, or just put a <span wire:ignore></span> around just the input element.
* 5. If you have dynamically shown/hidden checkboxes, you might need to initialize iCheck on them on component page-load.
* Just use $('.livewire-icheck').iCheck(), or for the minimal-style, use:
*
* $('input[type="checkbox"].minimal.livewire-icheck, input[type="radio"].minimal.livewire-icheck').iCheck({
* checkboxClass: 'icheckbox_minimal-blue',
* radioClass: 'iradio_minimal-blue'
* });
*
* (which is stolen from above here in this JS file)
*/
$(function () {
$('.livewire-select2').select2()
@ -643,16 +623,6 @@ $(function () {
window.livewire.hook('message.processed', function (el,component) {
$('.livewire-select2').select2();
//$('.livewire-icheck').iCheck(); //this seems to blow up pretty badly.
});
$(document).on('ifToggled', '.livewire-icheck', function (event) {
if(!event.target.name || !$(event.target).data('livewire-component')) {
console.error("You need to set both name (which should match a Livewire property) and data-livewire-component on your iCheck elements!")
console.error("For data-livewire-component, you probably want to use $_instance->id or {{ $_instance->id }}, as appropriate")
return false
}
window.livewire.find($(event.target).data('livewire-component')).set(event.target.name, event.target.checked)
})
})

View file

@ -666,9 +666,6 @@ th.css-accessory > .th-inner::before
border-radius: 0px;
}
.bs-checkbox input {
zoom: 1.5;
}
@media screen and (max-width: 511px){
.sidebar-menu{
margin-top:160px;
@ -690,4 +687,155 @@ th.css-accessory > .th-inner::before
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
/** Form-stuff overrides for checkboxes and stuff **/
label.form-control {
display: grid;
grid-template-columns: 1.8em auto;
gap: 0.5em;
border: 0px;
padding-left: 0px;
background-color: inherit;
color: inherit;
font-size: inherit;
font-weight: inherit;
}
label.form-control--disabled {
color: #959495;
pointer-events:none;
cursor: not-allowed;
}
/** --------------------------------------- **/
/** Start checkbox styles to replace iCheck **/
/** --------------------------------------- **/
input[type="checkbox"] {
/* Add if not using autoprefixer */
-webkit-appearance: none;
appearance: none;
/* For iOS < 15 to remove gradient background */
background-color: #fff;
/* Not removed via appearance */
margin: 0;
font: inherit;
color: #959495;
width: 1.8em;
height: 1.8em;
border: 0.05em solid;
border-radius: 0em;
transform: translateY(-0.075em);
display: grid;
place-content: center;
/*Windows High Contrast Mode*/
}
/** This sets the display of a checkbox, and what the "fill" checkmark should look like */
input[type="checkbox"]::before {
/** If you want to use the non-checkbox, filled square, use this instead **/
content: "";
width: 1em;
height: 1em;
transform: scale(0);
transition: 120ms transform ease-in-out;
box-shadow: inset 1em 1em rgb(211, 211, 211);
content: "";
width: 1em;
height: 1em;
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
transform: scale(0);
transform-origin: bottom left;
transition: 120ms transform ease-in-out;
box-shadow: inset 1em 1em #428bca;
/* Windows High Contrast Mode */
background-color: CanvasText;
}
/** This sets the size of the scale up for the shape we defined above **/
input[type="checkbox"]:checked::before {
transform: scale(1);
}
/** This sets the scale and color of the DISABLED but CHECKED checkbox */
input[type=checkbox]:disabled::before, input[type=radio]:disabled::before {
content: "";
width: 1em;
height: 1em;
transform: scale(1);
box-shadow: inset 1em 1em rgb(211, 211, 211);
}
/* This sets the scale and style of a DISABLED checkbox that is NOT checked */
input[type=checkbox]:disabled:not(:checked)::before, input[type=radio]:disabled:not(:checked)::before {
content: "";
transform: scale(0);
cursor: not-allowed;
pointer-events:none;
}
/** this is the color of the checkbox and content on a disabled, checked box **/
input[type=checkbox]:disabled, input[type=radio]:disabled {
--form-control-color: rgb(211, 211, 211);
color: #959495;
cursor: not-allowed;
pointer-events:none;
}
/** Radio styles to replace iCheck **/
input[type="radio"] {
appearance: none;
background-color: #fff;
margin: 0;
font: inherit;
color: #959495;
width: 1.8em;
height: 1.8em;
border: 0.05em solid;
border-radius: 50%;
transform: translateY(-0.075em);
display: grid;
place-content: center;
}
input[type="radio"]::before {
content: "";
width: 1em;
height: 1em;
border-radius: 50%;
transform: scale(0);
transition: 120ms transform ease-in-out;
box-shadow: inset 1em 1em #428bca;
}
input[type="radio"]:checked::before {
transform: scale(1);
}
/**
* This addresses the column selector in bootstrap-table. Without these two lines, the
* checkbox and the <span></span> with the label text that BS tables generates will
* end up on two different lines and it looks assy.
*/
.dropdown-item-marker input[type=checkbox] {
font-size: 10px;
}
.bootstrap-table .fixed-table-toolbar li.dropdown-item-marker label {
font-weight: normal;
display: grid;
grid-template-columns: .1em auto;
gap: 1.5em;
}
/** --------------------------------------- **/
/** End checkbox styles to replace iCheck **/
/** --------------------------------------- **/

View file

@ -48,7 +48,7 @@ return [
'asset_location_update_default' => 'Update only default location',
'asset_not_deployable' => 'That asset status is not deployable. This asset cannot be checked out.',
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
'processing_spinner' => 'Processing...',
'processing_spinner' => 'Processing... (This might take a bit of time on large files)',
'optional_infos' => 'Optional Information',
'order_details' => 'Order Related Information'
];

View file

@ -6,7 +6,7 @@ return array(
'deleted' => 'This model has been deleted.',
'bulk_delete' => 'Bulk Delete Asset Models',
'bulk_delete_help' => 'Use the checkboxes below to confirm the deletion of the selected asset models. Asset models that have assets associated with them cannot be deleted until the assets are associated with a different model.',
'bulk_delete_warn' => 'You are about to delete :model_count asset models.',
'bulk_delete_warn' => 'You are about to delete one asset model.|You are about to delete :model_count asset models.',
'restore' => 'Restore Model',
'requestable' => 'Users may request this model',
'show_mac_address' => 'Show MAC address field in assets in this model',

View file

@ -16,7 +16,7 @@ return array(
'update' => array(
'error' => 'Model was not updated, please try again',
'success' => 'Model updated successfully.'
'success' => 'Model updated successfully.',
),
'delete' => array(
@ -32,12 +32,14 @@ return array(
'bulkedit' => array(
'error' => 'No fields were changed, so nothing was updated.',
'success' => 'Models updated.'
'success' => 'Model successfully updated. |:model_count models successfully updated.',
'warn' => 'You are about to update the properies of the following model: |You are about to edit the properties of the following :model_count models:',
),
'bulkdelete' => array(
'error' => 'No models were selected, so nothing was deleted.',
'success' => ':success_count model(s) deleted!',
'success' => 'Model deleted!|:success_count models deleted!',
'success_partial' => ':success_count model(s) were deleted, however :fail_count were unable to be deleted because they still have assets associated with them.'
),

View file

@ -49,5 +49,6 @@ return [
'email_credentials' => 'Email credentials',
'email_credentials_text' => 'Email my credentials to the email address above',
'next_save_user' => 'Next: Save User',
'all_assigned_list_generation' => 'Generated on:'
'all_assigned_list_generation' => 'Generated on:',
'email_user_creds_on_create' => 'Email this user their credentials?',
];

View file

@ -438,4 +438,5 @@ return [
'setup_successful_migrations' => 'Your database tables have been created',
'setup_migration_output' => 'Migration output:',
'setup_migration_create_user' => 'Next: Create User',
'importer_generic_error' => 'Your file import is complete, but we did receive an error. This is usually caused by third-party API throttling from a notification webhook (such as Slack) and would not have interfered with the import itself, but you should confirm this.',
];

View file

@ -15,7 +15,7 @@ return [
'more_info_title' => 'More Info',
'audit_help' => 'Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log.<br><br>Note that is this asset is checked out, it will not change the location of the person, asset or location it is checked out to.',
'audit_help' => 'Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log.<br><br>Note that if this asset is checked out, it will not change the location of the person, asset or location it is checked out to.',
'assets' => 'Assets are items tracked by serial number or asset tag. They tend to be higher value items where identifying a specific item matters.',

View file

@ -22,26 +22,7 @@
@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')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('accessories_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -43,35 +43,39 @@
<div class="col-sm-12 col-sm-offset-1 col-md-10 col-md-offset-1">
<div class="panel box box-default">
<div class="box-body">
<div class="col-md-12">
@if ($acceptance->checkoutable->getEula())
<div id="eula_div" style="padding-bottom: 20px">
{!! $acceptance->checkoutable->getEula() !!}
</div>
@endif
</div>
<div class="col-md-12">
<h3>{{$acceptance->checkoutable->present()->name()}}</h3>
<div class="radio">
<label>
<input type="radio" class="minimal" name="asset_acceptance" id="accepted" value="accepted">
</div>
<div class="col-md-12">
<label class="form-control">
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
{{trans('general.i_accept')}}
</label>
</div>
<div class="radio">
<label>
<input type="radio" class="minimal" name="asset_acceptance" id="declined" value="declined">
<label class="form-control">
<input type="radio" name="asset_acceptance" id="declined" value="declined">
{{trans('general.i_decline')}}
</label>
</div>
@if ($snipeSettings->require_accept_signature=='1')
<h3 style="padding-top: 20px">{{trans('general.sign_tos')}}</h3>
<div id="signature-pad" class="m-signature-pad">
<div class="m-signature-pad--body col-md-12 col-sm-12 col-lg-12 col-xs-12">
<canvas></canvas>
<input type="hidden" name="signature_output" id="signature_output">
</div>
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center">
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">{{trans('general.clear_signature')}}</button>
<div class="col-md-12">
<h3 style="padding-top: 20px">{{trans('general.sign_tos')}}</h3>
<div id="signature-pad" class="m-signature-pad">
<div class="m-signature-pad--body col-md-12 col-sm-12 col-lg-12 col-xs-12">
<canvas></canvas>
<input type="hidden" name="signature_output" id="signature_output">
</div>
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center">
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">{{trans('general.clear_signature')}}</button>
</div>
</div>
</div>
@endif

View file

@ -107,11 +107,11 @@
@if (($user->avatar) && ($user->avatar!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
<label for="image_delete" class="form-control">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['id' => 'image_delete', 'aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
<div class="form-group">
@ -123,8 +123,7 @@
@endif
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar'])
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')])
<!-- Two factor opt in -->
@ -132,9 +131,9 @@
<div class="form-group {{ $errors->has('two_factor_optin') ? 'has-error' : '' }}">
<div class="col-md-7 col-md-offset-3">
@can('self.two_factor')
<label for="two_factor_optin">{{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),array('class' => 'minimal')) }}
<label class="form-control">{{ Form::checkbox('two_factor_optin', '1', old('two_factor_optin', $user->two_factor_optin)) }}
@else
<label for="avatar">{{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),['class' => 'disabled minimal', 'disabled' => 'disabled']) }}
<label class="form-control form-control--disabled">{{ Form::checkbox('two_factor_optin', '1', old('two_factor_optin', $user->two_factor_optin),['disabled' => 'disabled']) }}
@endcan
{{ trans('admin/settings/general.two_factor_enabled_text') }}</label>

View file

@ -87,11 +87,10 @@
<!-- Warranty -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" {{ Request::old('is_warranty', $item->is_warranty) == '1' ? ' checked="checked"' : '' }} class="minimal"> {{ trans('admin/asset_maintenances/form.is_warranty') }}
<label class="form-control">
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" {{ old('is_warranty', $item->is_warranty) == '1' ? ' checked="checked"' : '' }}>
{{ trans('admin/asset_maintenances/form.is_warranty') }}
</label>
</div>
</div>
</div>

View file

@ -53,9 +53,9 @@
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password" id="password" autocomplete="off">
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="checkbox">
<label style="margin-left: -20px;">
<input name="remember" type="checkbox" value="1" class="minimal"> {{ trans('auth/general.remember_me') }}
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label class="form-control">
<input name="remember" type="checkbox" value="1"> {{ trans('auth/general.remember_me') }}
</label>
</div>
</fieldset>

View file

@ -39,21 +39,17 @@
<!-- Use default checkbox -->
<div class="form-group">
<div class="col-md-3">
</div>
<div class="col-md-9">
<div class="col-md-9 col-md-offset-3">
@if ($snipeSettings->default_eula_text!='')
<label for="use_default_eula">
{{ Form::checkbox('use_default_eula', '1', old('use_default_eula', $item->use_default_eula), ['class'=>'minimal', 'aria-label'=>'use_default_eula']) }}
{!! trans('admin/categories/general.use_default_eula') !!}
<label class="form-control">
{{ Form::checkbox('use_default_eula', '1', old('use_default_eula', $item->use_default_eula), ['aria-label'=>'use_default_eula']) }}
{!! trans('admin/categories/general.use_default_eula') !!}
</label>
@else
<div class="icheckbox disabled">
<label for="use_default_eula">
{{ Form::checkbox('use_default_eula', '0', old('use_default_eula'), ['class'=>'disabled minimal','disabled' => 'disabled', 'aria-label'=>'use_default_eula']) }}
{!! trans('admin/categories/general.use_default_eula_disabled') !!}
</label>
</div>
<label class="form-control form-control--disabled">
{{ Form::checkbox('use_default_eula', '0', old('use_default_eula'), ['class'=>'disabled','disabled' => 'disabled', 'aria-label'=>'use_default_eula']) }}
<span>{!! trans('admin/categories/general.use_default_eula_disabled') !!}</span>
</label>
@endif
</div>
</div>
@ -61,11 +57,9 @@
<!-- Require Acceptance -->
<div class="form-group">
<div class="col-md-3">
</div>
<div class="col-md-9">
<label for="require_acceptance">
{{ Form::checkbox('require_acceptance', '1', old('require_acceptance', $item->require_acceptance), ['class'=>'minimal', 'aria-label'=>'require_acceptance']) }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('require_acceptance', '1', old('require_acceptance', $item->require_acceptance), ['aria-label'=>'require_acceptance']) }}
{{ trans('admin/categories/general.require_acceptance') }}
</label>
</div>
@ -75,35 +69,16 @@
<!-- Email on Checkin -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<label for="checkin_email">
{{ Form::checkbox('checkin_email', '1', old('checkin_email', $item->checkin_email), ['class'=>'minimal','aria-label'=>'checkin_email']) }}
<label class="form-control">
{{ Form::checkbox('checkin_email', '1', old('checkin_email', $item->checkin_email), ['aria-label'=>'checkin_email']) }}
{{ trans('admin/categories/general.checkin_email') }}
</label>
</div>
</div>
@include ('partials.forms.edit.image-upload', ['image_path' => app('categories_upload_path')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('companies_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -9,24 +9,6 @@
{{-- Page content --}}
@section('inputFields')
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')])
@include ('partials.forms.edit.image-upload', ['image_path' => app('companies_upload_path')])
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('companies_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -20,28 +20,8 @@
@include ('partials.forms.edit.order_number')
@include ('partials.forms.edit.purchase_date')
@include ('partials.forms.edit.purchase_cost')
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('components_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.notes')
@include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')])
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -21,27 +21,6 @@
@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')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('consumables_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -111,11 +111,29 @@
</div>
</div>
@if (!$field->id)
<!-- Encrypted -->
<div class="form-group {{ $errors->has('encrypted') ? ' has-error' : '' }}">
<div class="col-md-8 col-md-offset-4">
<label class="form-control">
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted"{{ (Request::old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.encrypt_field') }}
</label>
</div>
<div class="col-md-6 col-md-offset-4" id="encrypt_warning" style="display:none;">
<div class="callout callout-danger">
<p><i class="fas fa-exclamation-triangle" aria-hidden="true"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
</div>
</div>
</div>
@endif
<!-- Show in Email -->
<div class="form-group {{ $errors->has('show_in_email') ? ' has-error' : '' }}" id="show_in_email">
<div class="col-md-8 col-md-offset-4">
<label for="show_in_email">
<input type="checkbox" name="show_in_email" aria-label="show_in_email" value="1" class="minimal"{{ (old('show_in_email') || $field->show_in_email) ? ' checked="checked"' : '' }}>
<label class="form-control">
<input type="checkbox" name="show_in_email" aria-label="show_in_email" value="1"{{ (old('show_in_email') || $field->show_in_email) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.show_in_email') }}
</label>
</div>
@ -125,8 +143,8 @@
<!-- Show in View All Assets profile view -->
<div class="form-group {{ $errors->has('display_in_user_view') ? ' has-error' : '' }}" id="display_in_user_view">
<div class="col-md-8 col-md-offset-4">
<label for="display_in_user_view">
<input type="checkbox" name="display_in_user_view" aria-label="display_in_user_view" value="1" class="minimal"{{ (old('display_in_user_view') || $field->display_in_user_view) ? ' checked="checked"' : '' }}>
<label class="form-control">
<input type="checkbox" name="display_in_user_view" aria-label="display_in_user_view" value="1" {{ (old('display_in_user_view') || $field->display_in_user_view) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.display_in_user_view') }}
</label>
</div>
@ -136,8 +154,8 @@
<!-- Value Must be Unique -->
<div class="form-group {{ $errors->has('is_unique') ? ' has-error' : '' }}" id="is_unique">
<div class="col-md-8 col-md-offset-4">
<label for="is_unique">
<input type="checkbox" name="is_unique" aria-label="is_unique" value="1" class="minimal"{{ (old('is_unique') || $field->is_unique) ? ' checked="checked"' : '' }}>
<label class="form-control">
<input type="checkbox" name="is_unique" aria-label="is_unique" value="1"{{ (old('is_unique') || $field->is_unique) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.is_unique') }}
</label>
</div>
@ -145,24 +163,6 @@
</div>
@if (!$field->id)
<!-- Encrypted -->
<div class="form-group {{ $errors->has('encrypted') ? ' has-error' : '' }}">
<div class="col-md-8 col-md-offset-4">
<label for="field_encrypted">
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted" class="minimal"{{ (Request::old('field_encrypted') || $field->field_encrypted) ? ' checked="checked"' : '' }}>
{{ trans('admin/custom_fields/general.encrypt_field') }}
</label>
</div>
<div class="col-md-6 col-md-offset-4" id="encrypt_warning" style="display:none;">
<div class="callout callout-danger">
<p><i class="fas fa-exclamation-triangle" aria-hidden="true"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
</div>
</div>
</div>
@endif
</div> <!-- /.box-body-->
<div class="box-footer text-right">
@ -219,18 +219,22 @@
}).change();
});
// Checkbox handling
$('#field_encrypted').on('ifChecked', function(event){
$("#encrypt_warning").show();
$("#show_in_email").hide();
$("#display_in_user_view").hide();
$("#field_encrypted").change(function() {
if (this.checked) {
$("#encrypt_warning").show();
$("#show_in_email").hide();
$("#display_in_user_view").hide();
$("#is_unique").hide();
} else {
$("#encrypt_warning").hide();
$("#show_in_email").show();
$("#display_in_user_view").show();
$("#is_unique").show();
}
});
$('#field_encrypted').on('ifUnchecked', function(event){
$("#encrypt_warning").hide();
$("#show_in_email").show();
$("#display_in_user_view").show();
});
</script>
@stop

View file

@ -104,8 +104,8 @@
<div class="form-group col-md-2" style="vertical-align: middle;">
<label for="required">
{{ Form::checkbox('required', 'on', old('required'), array('class' => 'minimal', 'aria-label'=>'required')) }}
<label class="form-control">
{{ Form::checkbox('required', 'on', old('required'), array('aria-label'=>'required')) }}
{{ trans('admin/custom_fields/general.required') }}
</label>

View file

@ -16,33 +16,13 @@
<input id="hidden_company_id" type="hidden" name="company_id" value="{{ Auth::user()->company_id }}">
@endif
<!-- Manager -->
@include ('partials.forms.edit.user-select', ['translated_name' => trans('admin/users/table.manager'), 'fieldname' => 'manager_id'])
<!-- Location -->
@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')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('departments_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -87,12 +87,12 @@
@endunless
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$localPermission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ 'permission['.$localPermission['permission'].']' }}</span></label>
{{ Form::radio('permission['.$localPermission['permission'].']', '1',(array_key_exists($localPermission['permission'], $groupPermissions) ? $groupPermissions[$localPermission['permission'] ] == '1' : null),['value'=>"grant", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
<label for="{{ 'permission['.$localPermission['permission'].']' }}" style="form-control"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ 'permission['.$localPermission['permission'].']' }}</span></label>
{{ Form::radio('permission['.$localPermission['permission'].']', '1',(array_key_exists($localPermission['permission'], $groupPermissions) ? $groupPermissions[$localPermission['permission'] ] == '1' : null),['value'=>"grant", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$localPermission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ 'permission['.$localPermission['permission'].']' }}</span></label>
{{ Form::radio('permission['.$localPermission['permission'].']', '0',(array_key_exists($localPermission['permission'], $groupPermissions) ? $groupPermissions[$localPermission['permission'] ] == '0' : null),['value'=>"grant", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '0',(array_key_exists($localPermission['permission'], $groupPermissions) ? $groupPermissions[$localPermission['permission'] ] == '0' : null),['value'=>"grant", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
</td>
</tr>
</tbody>
@ -109,11 +109,11 @@
</td>
<td class="col-md-1 permissions-item" style="vertical-align: bottom">
<label for="{{ $area }}"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ $area }}</span></label>
{{ Form::radio("$area", '1',false,['value'=>"grant", 'class'=>'minimal', 'data-checker-group' => str_slug($area), 'aria-label'=> $area]) }}
{{ Form::radio("$area", '1',false,['value'=>"grant", 'data-checker-group' => str_slug($area), 'aria-label'=> $area]) }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ $area }}</span></label>
{{ Form::radio("$area", '0',false,['value'=>"deny", 'class'=>'minimal', 'data-checker-group' => str_slug($area), 'aria-label'=> $area]) }}
{{ Form::radio("$area", '0',false,['value'=>"deny", 'data-checker-group' => str_slug($area), 'aria-label'=> $area]) }}
</td>
</tr>
@ -129,11 +129,11 @@
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$this_permission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.allow')}} {{ 'permission['.$this_permission['permission'].']' }}</span></label>
{{ Form::radio('permission['.$this_permission['permission'].']', '1',(array_key_exists($this_permission['permission'], $groupPermissions) ? $groupPermissions[$this_permission['permission'] ] == '1' : null),['class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$this_permission['permission'].']']) }}
{{ Form::radio('permission['.$this_permission['permission'].']', '1',(array_key_exists($this_permission['permission'], $groupPermissions) ? $groupPermissions[$this_permission['permission'] ] == '1' : null),['class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$this_permission['permission'].']']) }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ 'permission['.$this_permission['permission'].']' }}"><span class="sr-only">{{ trans('admin/groups/titles.deny')}} {{ 'permission['.$this_permission['permission'].']' }}</span></label>
{{ Form::radio('permission['.$this_permission['permission'].']', '0',(array_key_exists($this_permission['permission'], $groupPermissions) ? $groupPermissions[$this_permission['permission'] ] == '0' : null),['class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$this_permission['permission'].']']) }}
{{ Form::radio('permission['.$this_permission['permission'].']', '0',(array_key_exists($this_permission['permission'], $groupPermissions) ? $groupPermissions[$this_permission['permission'] ] == '0' : null),['class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$this_permission['permission'].']']) }}
</td>
</tr>
@ -165,10 +165,10 @@
});
// Check/Uncheck all radio buttons in the group
$('tr.header-row input:radio').on('ifClicked', function () {
$('tr.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').iCheck('check');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});

View file

@ -55,16 +55,14 @@
<!-- Update location -->
<div class="form-group">
<div class="col-sm-offset-3 col-md-9">
<label>
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
<div class="col-md-8 col-md-offset-3">
<label class="form-control">
<input type="checkbox" value="1" name="update_location" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label>
@include ('partials.more-info', ['helpText' => trans('help.audit_help'), 'helpPosition' => 'right'])
<p class="help-block">{!! trans('help.audit_help') !!}</p>
</div>
</div>

View file

@ -31,16 +31,16 @@
<!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>
<div class="col-md-3">
<div class="col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ old('purchase_date') }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
<div class="col-md-6">
<label>
{{ Form::checkbox('null_purchase_date', '1', false, ['class' => 'minimal']) }}
<div class="col-md-5">
<label class="form-control">
{{ Form::checkbox('null_purchase_date', '1', false) }}
{{ trans_choice('general.set_to_null', count($assets),['asset_count' => count($assets)]) }}
</label>
</div>
@ -49,7 +49,7 @@
<!-- Expected Checkin Date -->
<div class="form-group {{ $errors->has('expected_checkin') ? ' has-error' : '' }}">
<label for="expected_checkin" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
<div class="col-md-3">
<div class="col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ old('expected_checkin') }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
@ -57,9 +57,9 @@
{!! $errors->first('expected_checkin', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="col-md-6">
<label>
{{ Form::checkbox('null_expected_checkin_date', '1', false, ['class' => 'minimal']) }}
<div class="col-md-5">
<label class="form-control">
{{ Form::checkbox('null_expected_checkin_date', '1', false, ['checked' => 'false']) }}
{{ trans_choice('general.set_to_null', count($assets), ['asset_count' => count($assets)]) }}
</label>
</div>
@ -72,7 +72,7 @@
{{ trans('admin/hardware/form.status') }}
</label>
<div class="col-md-7">
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:350px', 'aria-label'=>'status_id')) }}
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:100%', 'aria-label'=>'status_id')) }}
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@ -84,16 +84,13 @@
<!-- Update actual location -->
<div class="form-group">
<div class="col-md-3"></div>
<div class="col-md-9">
<label for="update_real_loc">
{{ Form::radio('update_real_loc', '1', old('update_real_loc'), ['class'=>'minimal', 'aria-label'=>'update_real_loc']) }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::radio('update_real_loc', '1', old('update_real_loc'), ['checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_default_current') }}
</label>
<br>
<label for="update_default_loc">
{{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['class'=>'minimal', 'aria-label'=>'update_default_loc']) }}
<label class="form-control">
{{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_default') }}
</label>
@ -147,17 +144,18 @@
<!-- Next audit Date -->
<div class="form-group {{ $errors->has('next_audit_date') ? ' has-error' : '' }}">
<label for="next_audit_date" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
<div class="col-md-3">
<div class="col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date') }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true">
<i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="col-md-6">
<label>
{{ Form::checkbox('null_next_audit_date', '1', false, ['class' => 'minimal']) }}
<div class="col-md-5">
<label class="form-control">
{{ Form::checkbox('null_next_audit_date', '1', false) }}
{{ trans_choice('general.set_to_null', count($assets), ['asset_count' => count($assets)]) }}
</label>
</div>
@ -169,14 +167,17 @@
<strong>{{ trans('admin/hardware/form.requestable') }}</strong>
</div>
<div class="col-md-7">
<label class="radio">
<input type="radio" class="minimal" name="requestable" value="1"> {{ trans('general.yes')}}
<label class="form-control">
<input type="radio" name="requestable" value="1">
{{ trans('general.yes')}}
</label>
<label class="radio">
<input type="radio" class="minimal" name="requestable" value="0"> {{ trans('general.no')}}
<label class="form-control">
<input type="radio" name="requestable" value="0">
{{ trans('general.no')}}
</label>
<label class="radio">
<input type="radio" class="minimal" name="requestable" value="" checked> {{ trans('general.do_not_change')}}
<label class="form-control">
<input type="radio" name="requestable" value="" checked>
{{ trans('general.do_not_change')}}
</label>
</div>
</div>

View file

@ -22,14 +22,14 @@
<!-- we are editing an existing asset -->
@if ($item->id)
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
<input class="form-control" type="text" name="asset_tags[1]" id="asset_tag" value="{{ Request::old('asset_tag', $item->asset_tag) }}" data-validation="required">
<input class="form-control" type="text" name="asset_tags[1]" id="asset_tag" value="{{ old('asset_tag', $item->asset_tag) }}" data-validation="required">
{!! $errors->first('asset_tags', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
@else
<!-- we are creating a new asset - let people use more than one asset tag -->
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
<input class="form-control" type="text" name="asset_tags[1]" id="asset_tag" value="{{ Request::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}" data-validation="required">
<input class="form-control" type="text" name="asset_tags[1]" id="asset_tag" value="{{ old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}" data-validation="required">
{!! $errors->first('asset_tags', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}
</div>
@ -67,26 +67,10 @@
@include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'rtd_location_id'])
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@include ('partials.forms.edit.image-upload', ['image_path' => app('assets_upload_path')])
<div id='custom_fields_content'>
<!-- Custom Fields -->
@ -95,7 +79,7 @@
@endif
@if (Request::old('model_id'))
@php
$model = \App\Models\AssetModel::find(Request::old('model_id'));
$model = \App\Models\AssetModel::find(old('model_id'));
@endphp
@elseif (isset($selected_model))
@php
@ -127,8 +111,8 @@
<!-- byod checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="byod">
<input type="checkbox" value="1" name="byod" class="minimal" {{ (old('remote', $item->byod)) == '1' ? ' checked="checked"' : '' }} aria-label="byod">
<label for="byod" class="form-control">
<input type="checkbox" value="1" name="byod" {{ (old('remote', $item->byod)) == '1' ? ' checked="checked"' : '' }} aria-label="byod">
{{ trans('general.byod') }}
</label>

View file

@ -50,9 +50,12 @@
<!-- Update location -->
<div class="form-group">
<div class="col-sm-offset-3 col-md-9">
<label>
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label> <a href="#" class="text-dark-gray" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="<i class='far fa-life-ring'></i> More Info" data-html="true" data-content="Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log.<br><br>Note that is this asset is checked out, it will not change the location of the person, asset or location it is checked out to."><i class="far fa-life-ring"></i></a>
<label class="form-control">
<input type="checkbox" value="1" name="update_location" {{ old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label>
<a href="#" class="text-dark-gray" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="<i class='far fa-life-ring'></i> More Info" data-html="true" data-content="Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log.<br><br>Note that if this asset is checked out, it will not change the location of the person, asset or location it is checked out to."><i class="far fa-life-ring"></i></a>
</div>
</div>

View file

@ -56,10 +56,14 @@
<!-- Reassignable -->
<div class="form-group {{ $errors->has('reassignable') ? ' has-error' : '' }}">
<label for="reassignable" class="col-md-3 control-label">{{ trans('admin/licenses/form.reassignable') }}</label>
<div class="col-md-7 input-group">
{{ Form::Checkbox('reassignable', '1', old('reassignable', $item->id ? $item->reassignable : '1'),array('class' => 'minimal', 'aria-label'=>'reassignable')) }}
<div class="col-md-3 control-label">
<strong>{{ trans('admin/licenses/form.reassignable') }}</strong>
</div>
<div class="col-md-7">
<label class="form-control">
{{ Form::Checkbox('reassignable', '1', old('reassignable', $item->id ? $item->reassignable : '1'),array('aria-label'=>'reassignable')) }}
{{ trans('general.yes') }}
</label>
</div>
</div>
@ -110,10 +114,12 @@
<!-- Maintained -->
<div class="form-group {{ $errors->has('maintained') ? ' has-error' : '' }}">
<label for="maintained" class="col-md-3 control-label">{{ trans('admin/licenses/form.maintained') }}</label>
<div class="checkbox col-md-7">
{{ Form::Checkbox('maintained', '1', old('maintained', $item->maintained),array('class' => 'minimal', 'aria-label'=>'maintained')) }}
<div class="col-md-3 control-label"><strong>{{ trans('admin/licenses/form.maintained') }}</strong></div>
<div class="col-md-7">
<label class="form-control">
{{ Form::Checkbox('maintained', '1', old('maintained', $item->maintained),array('aria-label'=>'maintained')) }}
{{ trans('general.yes') }}
</label>
</div>
</div>

View file

@ -1,11 +1,13 @@
<span> {{-- This <span> doesn't seem to fix it, neither does a div? --}}
<div class="form-group{{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
<label for="custom_fieldset" class="col-md-3 control-label">{{ trans('admin/models/general.fieldset') }}</label>
<div class="col-md-9">
{{ Form::select('fieldset_id', Helper::customFieldsetList(), old('fieldset_id', $fieldset_id), array('class'=>'select2 js-fieldset-field livewire-select2', 'style'=>'width:350px', 'aria-label'=>'custom_fieldset', 'data-livewire-component' => $_instance->id)) }}
<div class="col-md-5">
{{ Form::select('fieldset_id', Helper::customFieldsetList(), old('fieldset_id', $fieldset_id), array('class'=>'select2 js-fieldset-field livewire-select2', 'style'=>'width:100%; min-width:350px', 'aria-label'=>'custom_fieldset', 'data-livewire-component' => $_instance->id)) }}
{!! $errors->first('custom_fieldset', '<span class="alert-msg" aria-hidden="true"><br><i class="fas fa-times"></i> :message</span>') !!}
<label class="m-l-xs" wire:ignore>
{{ Form::checkbox('add_default_values', 1, Request::old('add_default_values', $add_default_values), ['class' => 'minimal livewire-icheck', 'data-livewire-component' => $_instance->id, 'id' => 'add_default_values']) }}
</div>
<div class="col-md-3">
<label class="form-control">
{{ Form::checkbox('add_default_values', 1, old('add_default_values', $add_default_values), ['data-livewire-component' => $_instance->id, 'id' => 'add_default_values', 'wire:model' => 'add_default_values']) }}
{{ trans('admin/models/general.add_default_values') }}
</label>
</div>
@ -30,7 +32,7 @@
@elseif ($field->element == "text")
<input class="form-control m-b-xs" type="text" value="{{ $field->defaultValue($model_id) }}" id="default-value{{ $field->id }}" name="default_values[{{ $field->id }}]">
@elseif($field->element == "textarea")
<textarea class="form-control" id="default-value{{ $field->id }}" name="default_values[{{ $field->id }}]">{{ $field->defaultValue($model_id) }}</textarea><br>
<textarea class="form-control" style="width: 100%;" id="default-value{{ $field->id }}" name="default_values[{{ $field->id }}]">{{ $field->defaultValue($model_id) }}</textarea><br>
@elseif($field->element == "listbox")
<select class="form-control m-b-xs" name="default_values[{{ $field->id }}]">

View file

@ -34,13 +34,13 @@
<th>{{ trans('general.error') }}</th>
</thead>
<tbody>
@php \Log::error("import errors are: ".print_r($import_errors,true)); @endphp
@php \Log::debug("import errors are: ".print_r($import_errors,true)); @endphp
@foreach($import_errors AS $key => $actual_import_errors)
@php \Log::error("Key is: $key"); @endphp
@php \Log::debug("Key is: $key"); @endphp
@foreach($actual_import_errors AS $table => $error_bag)
@php \Log::error("Table is: $table"); @endphp
@php \Log::debug("Table is: $table"); @endphp
@foreach($error_bag as $field => $error_list)
@php \Log::error("Field is: $field"); @endphp
@php \Log::debug("Field is: $field"); @endphp
<tr>
<td>{{ $activeFile->file_path ?? "Unknown File" }}</td>
<td>
@ -124,7 +124,7 @@
<td class="col-md-6">{{ $currentFile->file_path }}</td>
<td class="col-md-3">{{ Helper::getFormattedDateObject($currentFile->created_at, 'datetime', false) }}</td>
<td class="col-md-1">{{ Helper::formatFilesizeUnits($currentFile->filesize) }}</td>
<td class="col-md-1 text-right">
<td class="col-md-1 text-right" style="white-space: nowrap;">
<button class="btn btn-sm btn-info" wire:click="selectFile({{ $currentFile->id }})">
<i class="fas fa-retweet fa-fw" aria-hidden="true"></i>
<span class="sr-only">{{ trans('general.import') }}</span>
@ -138,11 +138,9 @@
<tr class="warning">
<td colspan="4">
<div class="col-md-12">
<div class="form-group">
<div class="form-group col-md-12">
<label for="activeFile.import_type" class="col-md-3 col-xs-12 text-right">
<label for="activeFile.import_type" class="col-md-3 col-xs-12">
{{ trans('general.import_type') }}
</label>
@ -157,45 +155,40 @@
'data-livewire-component' => $_instance->id
]) }}
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 0)
<span class="help-block">
<p class="help-block">
{{ trans('general.auto_incrementing_asset_tags_disabled_so_tags_required') }}
</span>
</p>
@endif
</div>
</div>
<div class="form-group col-md-12">
<label for="update" class="col-md-9 col-md-offset-3 col-xs-12">
<input type="checkbox" class="minimal livewire-icheck" name="update" data-livewire-component="{{ $_instance->id }}" wire:model="update">
<div class="form-group col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" name="update" data-livewire-component="{{ $_instance->id }}" wire:model="update">
{{ trans('general.update_existing_values') }}
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update)
<span class="help-block">
{{ trans('general.auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created') }}
</span>
@endif
</label>
</div>
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update)
<p class="help-block">
{{ trans('general.auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created') }}
</p>
@endif
<div class="form-group col-md-12">
<label for="send_welcome" class="col-md-9 col-md-offset-3 col-xs-12">
<input type="checkbox" class="minimal livewire-icheck" name="send_welcome" data-livewire-component="{{ $_instance->id }}" wire:model="send_welcome">
<label class="form-control">
<input type="checkbox" name="send_welcome" data-livewire-component="{{ $_instance->id }}" wire:model="send_welcome">
{{ trans('general.send_welcome_email_to_users') }}
</label>
</div>
<div class="form-group col-md-12">
<label for="run_backup" class="col-md-9 col-md-offset-3 col-xs-12">
<input type="checkbox" class="minimal livewire-icheck" name="run_backup" data-livewire-component="{{ $_instance->id }}" wire:model="run_backup">
<label class="form-control">
<input type="checkbox" name="run_backup" data-livewire-component="{{ $_instance->id }}" wire:model="run_backup">
{{ trans('general.back_before_importing') }}
</label>
</div>
@if ($statusText)
<div class="form-group">
<div class="alert col-md-8 col-md-offset-2 {{ $statusType == 'success' ? 'alert-success' : ($statusType == 'error' ? 'alert-danger' : 'alert-info') }}" style="text-align:left">
{{ $statusText }}
</div><!-- /alert -->
@if($statusText)
<div class="alert col-md-8 col-md-offset-3{{ $statusType == 'success' ? ' alert-success' : ($statusType == 'error' ? ' alert-danger' : ' alert-info') }}" style="padding-top: 20px;">
{!! $statusText !!}
</div>
@endif
@ -258,14 +251,14 @@
</div>
@if($statusText)
<div class="alert col-md-12 col-md-offset-2 {{ $statusType == 'success' ? 'alert-success' : ($statusType == 'error' ? 'alert-danger' : 'alert-info') }}" style="padding-top: 20px;">
{{ $statusText }}
<div class="alert col-md-8 col-md-offset-3{{ $statusType == 'success' ? ' alert-success' : ($statusType == 'error' ? ' alert-danger' : ' alert-info') }}" style="padding-top: 20px;">
{!! $statusText !!}
</div>
@endif
@else
<div class="form-group col-md-12">
<div class="form-group col-md-10">
<div class="col-md-3 text-left">
<a href="#" wire:click="$set('activeFile',null)"><?php echo e(trans('general.cancel')); ?></a>
<a href="#" wire:click="$set('activeFile',null)">{{ trans('general.cancel') }}</a>
</div>
</div>
@endif {{-- end of if ... activeFile->import_type --}}
@ -325,10 +318,7 @@
// For the importFile part:
$(function () {
// initialize iCheck for use with livewire
$('.minimal.livewire-icheck').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
})
// we have to hook up to the `<tr id='importer-file'>` at the root of this display,
// because the #import button isn't visible until you click an import_type
@ -339,7 +329,7 @@
return;
}
@this.statusType ='pending';
@this.statusText = "{{ trans('admin/hardware/form.processing_spinner') }}";
@this.statusText = '<i class="fa fa-spinner fa-spin" aria-hidden="true"></i> {{ trans('admin/hardware/form.processing_spinner') }}';
@this.generate_field_map().then(function (mappings_raw) {
var mappings = JSON.parse(mappings_raw)
// console.warn("Here is the mappings:")
@ -369,18 +359,29 @@
}).fail( function (jqXHR, textStatus, error) {
// Failure
var body = jqXHR.responseJSON
if(body.status == 'import-errors') {
if((body) && (body.status) && body.status == 'import-errors') {
@this.emit('importError', body.messages);
@this.import_errors = body.messages
@this.statusType='error';
@this.statusText = "Error";
// If Slack/notifications hits API thresholds, we *do* 500, but we never
// actually surface that info.
//
// A 500 on notifications doesn't mean your import failed, so this is a confusing state.
//
// Ideally we'd have a message like "Your import worked, but not all
// notifications could be sent".
} else {
console.warn("Not import-errors, just regular errors")
console.dir(body)
{{-- @this.emit('alert', body.error)--}}
@this.message_type="danger"
@this.message = body.error
console.warn("Not import-errors, just regular errors - maybe API limits")
@this.message_type="warning"
if ((body) && (error in body)) {
@this.message = body.error ? body.error:"Unknown error - might just be throttling by notifications."
} else {
@this.message = "{{ trans('general.importer_generic_error') }}"
}
}
@this.activeFile = null; //@this.set('hideDetails')
});

View file

@ -62,8 +62,9 @@
</div>
<div class="form-group">
<div class="checkbox">
<label style="margin-left: -20px;">
<input name="remember" type="checkbox" value="1" class="minimal"> {{ trans('auth/general.remember_me') }}
<label class="form-control">
<input name="remember" type="checkbox" value="1">
{{ trans('auth/general.remember_me') }}
</label>
</div>
</div>

View file

@ -43,25 +43,6 @@
</div>
@endif
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('locations_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@include ('partials.forms.edit.image-upload', ['image_path' => app('locations_upload_path')])
@stop

View file

@ -50,20 +50,8 @@
</div>
</div>
<!-- Image -->
@if ($item->image)
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
<div class="col-md-5">
{{ Form::checkbox('image_delete', '1', old('image_delete'), array('class' => 'minimal', 'aria-label'=>'image_delete')) }}
<img src="{{ Storage::disk('public')->url(app('manufacturers_upload_path').e($item->image)) }}" class="img-responsive" />
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload', ['image_path' => app('manufacturers_upload_path')])
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -78,15 +78,15 @@
</div>
</div>
<!-- Space for keep consistance of layout -->
<div class="dynamic-form-row"></div>
<!-- Checkbox for activation new user, by default set for activated -->
<div class="dynamic-form-row">
<div class="col-md-3 col-xs-12"><label for="modal-activated">{{ trans('general.login_enabled') }}:</label></div>
<div class="col-md-8 col-xs-12">
<input type="checkbox" value="1" name="activated" id="modal-activated" class="minimal" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
{{ trans('admin/users/general.activated_help_text') }}
<div class="col-md-offset-3 col-md-8 col-xs-12">
<label class="form-control">
<input type="checkbox" value="1" name="activated" id="modal-activated" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
{{ trans('general.login_enabled') }}
</label>
</div>
</div>

View file

@ -21,7 +21,7 @@
{{csrf_field()}}
<div class="box box-default">
<div class="box-header with-border">
<h2 class="box-title" style="color: red">{{ trans('admin/models/general.bulk_delete_warn', ['model_count' => $valid_count]) }}</h2>
<h2 class="box-title" style="color: red">{{ trans_choice('admin/models/general.bulk_delete_warn', $valid_count, ['model_count' => $valid_count]) }}</h2>
</div>
<div class="box-body">
@ -30,7 +30,7 @@
<tr>
<td class="col-md-1">
<label>
<input type="checkbox" class="all minimal" checked="checked">
<input type="checkbox" id="checkAll" checked="checked">
</label>
</td>
@ -42,7 +42,7 @@
@foreach ($models as $model)
<tr{!! (($model->assets_count > 0 ) ? ' class="danger"' : '') !!}>
<td>
<input type="checkbox" name="ids[]" class="minimal{{ (($model->assets_count == 0) ? '' : ' disabled') }}" value="{{ $model->id }}" {!! (($model->assets_count == 0) ? ' checked="checked"' : ' disabled') !!}>
<input type="checkbox" name="ids[]" class="{ (($model->assets_count == 0) ? '' : ' disabled') }}" value="{{ $model->id }}" {!! (($model->assets_count == 0) ? ' checked="checked"' : ' disabled') !!}>
</td>
<td>{{ $model->assets_count }}</td>
<td>{{ $model->name }}</td>
@ -65,28 +65,10 @@
@section('moar_scripts')
<script>
// Check-all / Uncheck all
$(function () {
var checkAll = $('input.all');
var checkboxes = $('input.minimal');
checkAll.on('ifChecked ifUnchecked', function(event) {
if (event.type == 'ifChecked') {
checkboxes.iCheck('check');
} else {
checkboxes.iCheck('uncheck');
}
});
checkboxes.on('ifChanged', function(event){
if(checkboxes.filter(':checked').length == checkboxes.length) {
checkAll.prop('checked', 'checked');
} else {
checkAll.removeProp('checked');
}
checkAll.iCheck('update');
});
$("#checkAll").change(function () {
$("input:checkbox").prop('checked', $(this).prop("checked"));
});
</script>
@stop

View file

@ -21,11 +21,14 @@
{{ csrf_field() }}
<div class="box box-default">
<div class="box-header with-border">
<div class="box-title"><i class="fas fa-exclamation-triangle"></i>{{ trans('general.bulk_edit_about_to') }}</div>
</div>
<div class="box-body">
<div class="callout callout-warning">
<i class="fas fa-exclamation-triangle"></i>
{{ trans_choice('admin/models/message.bulkedit.warn', count($models), ['model_count' => count($models)]) }}
</div>
<table class="table">
<tbody>
@foreach ($models as $model)
@ -33,7 +36,11 @@
<tr{!! (($model->assets_count > 0 ) ? ' class="warning"' : ' class="success"') !!}>
<td>
<i class="fa {!! (($model->assets_count > 0 ) ? 'fa-warning info' : 'fa-check success') !!}"></i>
{{ $model->display_name }} ({{ $model->model_number }})
{{ $model->display_name }}
@if ($model->model_number)
({{ $model->model_number }})
@endif
</td>
<td>{{ $model->assets_count }} assets
</td>
@ -73,20 +80,24 @@
</div>
<!-- requestable -->
<div class="form-group {{ $errors->has('requestable') ? 'has-error' : '' }}">
<div class="col-md-7 col-md-offset-3">
<div class="checkbox">
<label for="requestable">
{{ Form::radio('requestable', '', true, ['aria-label'=>'requestable', 'class'=>'minimal']) }} {{ trans('admin/hardware/general.requestable_status_warning')}}<br>
{{ Form::radio('requestable', '1', old('requestable'), ['aria-label'=>'requestable', 'class'=>'minimal']) }} {{ trans('admin/hardware/general.requestable')}} <br>
{{ Form::radio('requestable', '0', old('requestable'), ['aria-label'=>'requestable', 'class'=>'minimal']) }} {{ trans('admin/hardware/general.not_requestable')}}
<div class="form-group{{ $errors->has('requestable') ? ' has-error' : '' }}">
<div class="col-md-7 col-md-offset-3">
<label for="requestable_nochange" class="form-control">
{{ Form::radio('requestable', '', true, ['id' => 'requestable_nochange', 'aria-label'=>'requestable_nochange']) }}
{{ trans('admin/hardware/general.requestable_status_warning')}}
</label>
<label for="requestable" class="form-control">
{{ Form::radio('requestable', '1', old('requestable'), ['id' => 'requestable', 'aria-label'=>'requestable']) }}
{{ trans('admin/hardware/general.requestable')}}
</label>
<label for="not_requestable" class="form-control">
{{ Form::radio('requestable', '0', old('requestable'), ['id' => 'not_requestable','aria-label'=>'not_requestable']) }}
{{ trans('admin/hardware/general.not_requestable')}}
</label>
</div>
</div>
</div>
</div>
@foreach ($models as $model)
@ -95,9 +106,10 @@
</div>
</div> <!--/.box-body-->
<div class="text-right box-footer">
<button type="submit" class="btn btn-success"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
</div>
<div class="box-footer text-right">
<a class="btn btn-link pull-left" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success" id="submit-button"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.update') }}</button>
</div><!-- /.box-footer -->
</div> <!--/.box.box-default-->
</form>
</div> <!--/.col-md-8-->

View file

@ -18,8 +18,8 @@
<!-- Checkboxes -->
@foreach ($field->formatFieldValuesAsArray() as $key => $value)
<div>
<label>
<input type="checkbox" value="{{ $value }}" name="{{ $field->db_column_name() }}[]" class="minimal" {{ isset($item) ? (in_array($value, array_map('trim', explode(',', $item->{$field->db_column_name()}))) ? ' checked="checked"' : '') : (Request::old($field->db_column_name()) != '' ? ' checked="checked"' : (in_array($key, array_map('trim', explode(',', $field->defaultValue($model->id)))) ? ' checked="checked"' : '')) }}>
<label class="form-control">
<input type="checkbox" value="{{ $value }}" name="{{ $field->db_column_name() }}[]" {{ isset($item) ? (in_array($value, array_map('trim', explode(',', $item->{$field->db_column_name()}))) ? ' checked="checked"' : '') : (Request::old($field->db_column_name()) != '' ? ' checked="checked"' : (in_array($key, array_map('trim', explode(',', $field->defaultValue($model->id)))) ? ' checked="checked"' : '')) }}>
{{ $value }}
</label>
</div>
@ -29,8 +29,8 @@
@foreach ($field->formatFieldValuesAsArray() as $value)
<div>
<label>
<input type="radio" value="{{ $value }}" name="{{ $field->db_column_name() }}" class="minimal" {{ isset($item) ? ($item->{$field->db_column_name()} == $value ? ' checked="checked"' : '') : (Request::old($field->db_column_name()) != '' ? ' checked="checked"' : (in_array($value, explode(', ', $field->defaultValue($model->id))) ? ' checked="checked"' : '')) }}>
<label class="form-control">
<input type="radio" value="{{ $value }}" name="{{ $field->db_column_name() }}" {{ isset($item) ? ($item->{$field->db_column_name()} == $value ? ' checked="checked"' : '') : (Request::old($field->db_column_name()) != '' ? ' checked="checked"' : (in_array($value, explode(', ', $field->defaultValue($model->id))) ? ' checked="checked"' : '')) }}>
{{ $value }}
</label>
</div>

View file

@ -38,26 +38,7 @@
@include ('partials.forms.edit.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')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -1,3 +1,25 @@
<!-- Image stuff - kept in /resources/views/partials/forms/edit/image-upload.blade.php -->
<!-- Image Delete -->
@if (isset($item) && ($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url($image_path.e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
<!-- Image Upload and preview -->
<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'image')) ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="{{ (isset($fieldname) ? $fieldname : 'image') }}">{{ trans('general.image_upload') }}</label>
<div class="col-md-9">

View file

@ -1,8 +1,8 @@
<!-- Notes -->
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
<div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
<label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
<div class="col-md-7 col-sm-12">
<textarea class="col-md-6 form-control" id="notes" aria-label="notes" name="notes">{{ old('notes', $item->notes) }}</textarea>
<textarea class="col-md-6 form-control" id="notes" aria-label="notes" name="notes" style="min-width:100%;">{{ old('notes', $item->notes) }}</textarea>
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

View file

@ -18,11 +18,11 @@
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@endif
@ -30,22 +30,22 @@
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny", 'aria-label'=> 'permission['.$localPermission['permission'].']']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
<label class="sr-only" for="{{ 'permission['.$localPermission['permission'].']' }}">
{{ 'permission['.$localPermission['permission'].']' }}</label>
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled",'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
@elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin')))
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled",'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled", 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
@else
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit", 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }}
@endif
</td>
</tr>
@ -59,15 +59,15 @@
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
{{ Form::radio("$area", '1',false,['value'=>"grant", 'class'=>'minimal', 'data-checker-group' => str_slug($area), 'aria-label' => $area]) }}
{{ Form::radio("$area", '1',false,['value'=>"grant", 'data-checker-group' => str_slug($area), 'aria-label' => $area]) }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
{{ Form::radio("$area", '-1',false,['value'=>"deny", 'class'=>'minimal', 'data-checker-group' => str_slug($area), 'aria-label' => $area]) }}
{{ Form::radio("$area", '-1',false,['value'=>"deny", 'data-checker-group' => str_slug($area), 'aria-label' => $area]) }}
</td>
<td class="col-md-1 permissions-item">
<label for="{{ $area }}" class="sr-only">{{ $area }}</label>
{{ Form::radio("$area", '0',false,['value'=>"inherit", 'class'=>'minimal', 'data-checker-group' => str_slug($area), 'aria-label' => $area] ) }}
{{ Form::radio("$area", '0',false,['value'=>"inherit", 'data-checker-group' => str_slug($area), 'aria-label' => $area] ) }}
</td>
</tr>
@ -86,23 +86,23 @@
<label class="sr-only" for="{{ 'permission['.$permission['permission'].']' }}">{{ 'permission['.$permission['permission'].']' }}</label>
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled', 'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled', 'class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant",'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label' =>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant",'class'=>'radiochecker-'.str_slug($area), 'aria-label' =>'permission['.$permission['permission'].']']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled', 'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled', 'class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny",'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny",'class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
@endif
</td>
<td class="col-md-1 permissions-item">
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled', 'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled', 'class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
@else
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'class'=>'minimal radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'class'=>'radiochecker-'.str_slug($area), 'aria-label'=>'permission['.$permission['permission'].']']) }}
@endif
</td>
@endif

View file

@ -1,8 +1,8 @@
<!-- Requestable -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-10">
<label>
<input type="checkbox" value="1" name="requestable" id="requestable" class="minimal" {{ Request::old('requestable', $item->requestable) == '1' ? ' checked="checked"' : '' }}> {{ $requestable_text }}
<div class="col-sm-offset-3 col-md-9">
<label class="form-control" for="requestable">
<input type="checkbox" value="1" name="requestable" id="requestable" {{ old('requestable', $item->requestable) == '1' ? ' checked="checked"' : '' }}> {{ $requestable_text }}
</label>
</div>

View file

@ -47,8 +47,8 @@
@if (($setting->$logoVariable!='') && (Storage::disk('public')->exists(e($snipeSettings->$logoVariable))))
<div class="col-md-9 col-md-offset-3">
<label id="{{ $logoId }}-deleteCheckbox" for="{{ $logoClearVariable }}" style="font-weight: normal">
{{ Form::checkbox($logoClearVariable, '1', Request::old($logoClearVariable),array('class' => 'minimal')) }}
<label id="{{ $logoId }}-deleteCheckbox" for="{{ $logoClearVariable }}" style="font-weight: normal" class="form-control">
{{ Form::checkbox($logoClearVariable, '1', Request::old($logoClearVariable)) }}
Remove current {{ ucwords(str_replace('_', ' ', $logoVariable)) }} image
</label>
</div>

View file

@ -28,254 +28,210 @@
</div><!-- /.box-header -->
<div class="box-body">
<div class="col-md-4">
<div class="col-md-4">
<div class="checkbox col-md-12">
<label>
<input type="checkbox" class="all minimal" checked="checked">
<label class="form-control">
<input type="checkbox" id="checkAll" checked="checked">
{{ trans('general.select_all') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('id', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('id', '1', '1') }}
{{ trans('general.id') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('company', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('company', '1', '1') }}
{{ trans('general.company') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('asset_tag', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('asset_tag', '1', '1') }}
{{ trans('general.asset_tag') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('asset_name', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('asset_name', '1', '1') }}
{{ trans('admin/hardware/form.name') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('manufacturer', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('manufacturer', '1', '1') }}
{{ trans('general.manufacturer') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('model', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('model', '1', '1') }}
{{ trans('general.asset_models') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('category', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('category', '1', '1') }}
{{ trans('general.category') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('serial', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('serial', '1', '1') }}
{{ trans('admin/hardware/table.serial') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('purchase_date', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('purchase_date', '1', '1') }}
{{ trans('admin/licenses/table.purchase_date') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('purchase_cost', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('purchase_cost', '1', '1') }}
{{ trans('admin/hardware/form.cost') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('eol', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('eol', '1', '1') }}
{{ trans('admin/hardware/table.eol') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('order', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('order', '1', '1') }}
{{ trans('admin/hardware/form.order') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('supplier', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('supplier', '1', '1') }}
{{ trans('general.suppliers') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('location', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('location', '1', '1') }}
{{ trans('general.location') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('location_address', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('location_address', '1', '1') }}
- {{ trans('general.address') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('rtd_location', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('rtd_location', '1', '1') }}
{{ trans('admin/hardware/form.default_location') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('rtd_location_address', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('rtd_location_address', '1', '1') }}
- {{ trans('general.address') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('status', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('status', '1', '1') }}
{{ trans('general.status') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('warranty', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('warranty', '1', '1') }}
{{ trans('admin/hardware/form.warranty') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('depreciation', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('depreciation', '1', '1') }}
{{ trans('general.depreciation') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('checkout_date', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('checkout_date', '1', '1') }}
{{ trans('admin/hardware/table.checkout_date') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('expected_checkin', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('expected_checkin', '1', '1') }}
{{ trans('admin/hardware/form.expected_checkin') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('created_at', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('created_at', '1', '1') }}
{{ trans('general.created_at') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('updated_at', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('updated_at', '1', '1') }}
{{ trans('general.updated_at') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('deleted_at', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('deleted_at', '1', '1') }}
{{ trans('general.deleted') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('last_audit_date', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('last_audit_date', '1', '1') }}
{{ trans('general.last_audit') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('next_audit_date', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('next_audit_date', '1', '1') }}
{{ trans('general.next_audit_date') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('notes', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('notes', '1', '1') }}
{{ trans('general.notes') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('url', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('url', '1', '1') }}
- {{ trans('admin/manufacturers/table.url') }}
</label>
</div>
<!-- User fields -->
<div class="checkbox col-md-12">
<h2>{{ trans('general.checked_out_to') }} {{ trans('general.fields') }}:</h2>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('assigned_to', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('assigned_to', '1', '1') }}
{{ trans('admin/licenses/table.assigned_to') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('username', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('username', '1', '1') }}
{{ trans('admin/users/table.username') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('employee_num', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('employee_num', '1', '1') }}
{{ trans('general.employee_number') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('manager', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('manager', '1', '1') }}
{{ trans('admin/users/table.manager') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('department', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('department', '1', '1') }}
{{ trans('general.department') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('title', '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('title', '1', '1') }}
{{ trans('admin/users/table.title') }}
</label>
</div>
@if ($customfields->count() > 0)
<div class="checkbox col-md-12">
<h2>{{ trans('admin/custom_fields/general.custom_fields') }}</h>:</h4>
</div>
<h2>{{ trans('admin/custom_fields/general.custom_fields') }}</h2>
@foreach ($customfields as $customfield)
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox($customfield->db_column_name(), '1', '1', ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox($customfield->db_column_name(), '1', '1') }}
{{ $customfield->name }}
</label>
</div>
@endforeach
@endif
</div> <!-- /.col-md-3-->
</div> <!-- /.col-md-4-->
<div class="col-md-8">
@ -311,9 +267,9 @@
<div class="form-group purchase-range">
<label for="purchase_start" class="col-md-3 control-label">{{ trans('general.purchase_date') }} {{ trans('general.range') }}</label>
<div class="input-daterange input-group col-md-6" id="datepicker">
<input type="text" class="input-sm form-control" name="purchase_start" aria-label="purchase_start">
<input type="text" class="form-control" name="purchase_start" aria-label="purchase_start">
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="purchase_end" aria-label="purchase_end">
<input type="text" class="form-control" name="purchase_end" aria-label="purchase_end">
</div>
</div>
@ -321,9 +277,9 @@
<div class="form-group purchase-range">
<label for="created_start" class="col-md-3 control-label">{{ trans('general.created_at') }} {{ trans('general.range') }}</label>
<div class="input-daterange input-group col-md-6" id="datepicker">
<input type="text" class="input-sm form-control" name="created_start" aria-label="created_start">
<input type="text" class="form-control" name="created_start" aria-label="created_start">
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="created_end" aria-label="created_end">
<input type="text" class="form-control" name="created_end" aria-label="created_end">
</div>
</div>
@ -331,9 +287,9 @@
<div class="form-group expected_checkin-range">
<label for="expected_checkin_start" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
<div class="input-daterange input-group col-md-6" id="datepicker">
<input type="text" class="input-sm form-control" name="expected_checkin_start" aria-label="expected_checkin_start">
<input type="text" class="form-control" name="expected_checkin_start" aria-label="expected_checkin_start">
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="expected_checkin_end" aria-label="expected_checkin_end">
<input type="text" class="form-control" name="expected_checkin_end" aria-label="expected_checkin_end">
</div>
</div>
@ -341,9 +297,9 @@
<div class="form-group last_audit-range">
<label for="last_audit_start" class="col-md-3 control-label">{{ trans('general.last_audit') }}</label>
<div class="input-daterange input-group col-md-6" id="datepicker">
<input type="text" class="input-sm form-control" name="last_audit_start" aria-label="last_audit_start">
<input type="text" class="form-control" name="last_audit_start" aria-label="last_audit_start">
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="last_audit_end" aria-label="last_audit_end">
<input type="text" class="form-control" name="last_audit_end" aria-label="last_audit_end">
</div>
</div>
@ -351,43 +307,50 @@
<div class="form-group next_audit-range">
<label for="next_audit_start" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>
<div class="input-daterange input-group col-md-6" id="datepicker">
<input type="text" class="input-sm form-control" name="next_audit_start" aria-label="nex_audit_start">
<input type="text" class="form-control" name="next_audit_start" aria-label="nex_audit_start">
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="next_audit_end" aria-label="next_audit_end">
<input type="text" class="form-control" name="next_audit_end" aria-label="next_audit_end">
</div>
</div>
<div class="col-md-9 col-md-offset-3">
<label>
{{ Form::checkbox('exclude_archived', '1', old('exclude_archived'), ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('exclude_archived', '1', old('exclude_archived')) }}
{{ trans('general.exclude_archived') }}
</label>
</div>
<div class="col-md-9 col-md-offset-3">
<label>
{{ Form::checkbox('use_bom', '1', old('use_bom'), ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('use_bom', '1', old('use_bom')) }}
{{ trans('general.bom_remark') }}
</label>
</div>
<div class="col-md-9 col-md-offset-3">
<br>
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'class'=>'minimal', 'id'=>'deleted_assets_exclude_deleted'])}}
<label for="deleted_assets_exclude_deleted">{{ trans('general.exclude_deleted') }}</label>
<br>
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal', 'id'=>'deleted_assets_include_deleted']) }}
<label for="deleted_assets_include_deleted">{{ trans('general.include_deleted') }}</label>
<br>
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','class' => 'minimal','id'=>'deleted_assets_only_deleted']) }}
<label for="deleted_assets_only_deleted">{{ trans('general.only_deleted') }}</label>
</div>
<label class="form-control">
{{ Form::radio('deleted_assets', '', true, ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_exclude_deleted'])}}
{{ trans('general.exclude_deleted') }}
</label>
<label class="form-control">
{{ Form::radio('deleted_assets', '1', old('deleted_assets'), ['aria-label'=>'deleted_assets', 'id'=>'deleted_assets_include_deleted']) }}
{{ trans('general.include_deleted') }}
</label>
<label class="form-control">
{{ Form::radio('deleted_assets', '0', old('deleted_assets'), ['aria-label'=>'deleted_assets','id'=>'deleted_assets_only_deleted']) }}
{{ trans('general.only_deleted') }}
</label>
</div>
</div>
</div> <!-- /.box-body-->
<div class="box-footer text-right">
<button type="submit" class="btn btn-success"><i class="fas fa-download icon-white" aria-hidden="true"></i> {{ trans('general.generate') }}</button>
<button type="submit" class="btn btn-success">
<i class="fas fa-download icon-white" aria-hidden="true"></i>
{{ trans('general.generate') }}
</button>
</div>
</div> <!--/.box.box-default-->
{{ Form::close() }}
@ -425,28 +388,9 @@
format: 'yyyy-mm-dd'
});
// Check-all / Uncheck all
$(function () {
var checkAll = $('input.all');
var checkboxes = $('input.minimal');
checkAll.on('ifChecked ifUnchecked', function(event) {
if (event.type == 'ifChecked') {
checkboxes.iCheck('check');
} else {
checkboxes.iCheck('uncheck');
}
});
checkboxes.on('ifChanged', function(event){
if(checkboxes.filter(':checked').length == checkboxes.length) {
checkAll.prop('checked', 'checked');
} else {
checkAll.removeProp('checked');
}
checkAll.iCheck('update');
});
$("#checkAll").change(function () {
$("input:checkbox").prop('checked', $(this).prop("checked"));
});
</script>
@stop

View file

@ -42,23 +42,21 @@
<!-- Alerts Enabled -->
<div class="form-group {{ $errors->has('alerts_enabled') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('alerts_enabled', trans('admin/settings/general.alerts_enabled')) }}
</div>
<div class="col-md-5">
{{ Form::checkbox('alerts_enabled', '1', Request::old('alerts_enabled', $setting->alerts_enabled),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('alerts_enabled', '1', Request::old('alerts_enabled', $setting->alerts_enabled)) }}
{{ trans('admin/settings/general.alerts_enabled') }}
</label>
</div>
</div>
<!-- Menu Alerts Enabled -->
<div class="form-group {{ $errors->has('show_alerts_in_menu') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_alerts_in_menu', trans('admin/settings/general.show_alerts_in_menu')) }}
</div>
<div class="col-md-5">
{{ Form::checkbox('show_alerts_in_menu', '1', Request::old('show_alerts_in_menu', $setting->show_alerts_in_menu),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('show_alerts_in_menu', '1', Request::old('show_alerts_in_menu', $setting->show_alerts_in_menu)) }}
{{ trans('admin/settings/general.show_alerts_in_menu') }}
</label>
</div>
</div>

View file

@ -43,11 +43,13 @@
<!-- auto ids -->
<div class="form-group">
<div class="col-md-5">
{{ Form::label('auto_increment_assets', trans('admin/settings/general.auto_increment_assets')) }}
<strong>{{ trans('admin/settings/general.auto_increment_assets') }}</strong>
</div>
<div class="col-md-7">
{{ Form::checkbox('auto_increment_assets', '1', old('auto_increment_assets', $setting->auto_increment_assets),array('class' => 'minimal', 'aria-label'=>'auto_increment_assets')) }}
{{ trans('admin/settings/general.enabled') }}
<label class="form-control">
{{ Form::checkbox('auto_increment_assets', '1', old('auto_increment_assets', $setting->auto_increment_assets),array('aria-label'=>'auto_increment_assets')) }}
{{ trans('admin/settings/general.enabled') }}
</label>
</div>
</div>

View file

@ -43,12 +43,11 @@
@if ($is_gd_installed)
<!-- qr code -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('qr_code', trans('admin/settings/general.display_qr')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('qr_code', '1', old('qr_code', $setting->qr_code),array('class' => 'minimal', 'aria-label'=>'qr_code')) }}
{{ trans('general.yes') }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('qr_code', '1', old('qr_code', $setting->qr_code),array('aria-label'=>'qr_code')) }}
{{ trans('admin/settings/general.display_qr') }}
</label>
</div>
</div>
@ -65,12 +64,12 @@
<!-- barcode -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('alt_barcode_enabled', trans('admin/settings/general.display_alt_barcode')) }}
</div>
<div class="col-md-9">
{{ Form::checkbox('alt_barcode_enabled', '1', old('alt_barcode_enabled', $setting->alt_barcode_enabled),array('class' => 'minimal', 'aria-label'=>'alt_barcode_enabled')) }}
{{ trans('general.yes') }}
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('alt_barcode_enabled', '1', old('alt_barcode_enabled', $setting->alt_barcode_enabled),array( 'aria-label'=>'alt_barcode_enabled')) }}
{{ trans('admin/settings/general.display_alt_barcode') }}
</label>
</div>
</div>

View file

@ -112,11 +112,13 @@
<!-- Include logo in print assets -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('logo_print_assets', trans('admin/settings/general.logo_print_assets')) }}
<strong>{{ trans('admin/settings/general.logo_print_assets') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('logo_print_assets', '1', old('logo_print_assets', $setting->logo_print_assets),array('class' => 'minimal', 'aria-label'=>'logo_print_assets')) }}
<label class="form-control">
{{ Form::checkbox('logo_print_assets', '1', old('logo_print_assets', $setting->logo_print_assets),array('aria-label'=>'logo_print_assets')) }}
{{ trans('admin/settings/general.logo_print_assets_help') }}
</label>
</div>
</div>
@ -125,11 +127,13 @@
<!-- show urls in emails-->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('show_url_in_emails', trans('admin/settings/general.show_url_in_emails')) }}
<strong>{{ trans('admin/settings/general.show_url_in_emails') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('show_url_in_emails', '1', old('show_url_in_emails', $setting->show_url_in_emails),array('class' => 'minimal', 'aria-label'=>'show_url_in_emails')) }}
{{ trans('general.yes') }}
<label class="form-control">
{{ Form::checkbox('show_url_in_emails', '1', old('show_url_in_emails', $setting->show_url_in_emails),array('aria-label'=>'show_url_in_emails')) }}
{{ trans('general.yes') }}
</label>
<p class="help-block">{{ trans('admin/settings/general.show_url_in_emails_help_text') }}</p>
</div>
</div>
@ -164,11 +168,13 @@
<!-- Allow User Skin -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('allow_user_skin', trans('admin/settings/general.allow_user_skin')) }}
<strong>{{ trans('admin/settings/general.allow_user_skin') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('allow_user_skin', '1', old('allow_user_skin', $setting->allow_user_skin),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<label class="form-control">
{{ Form::checkbox('allow_user_skin', '1', old('allow_user_skin', $setting->allow_user_skin)) }}
{{ trans('general.yes') }}
</label>
<p class="help-block">{{ trans('admin/settings/general.allow_user_skin_help_text') }}</p>
</div>
</div>

View file

@ -45,11 +45,13 @@
<!-- Full Multiple Companies Support -->
<div class="form-group {{ $errors->has('full_multiple_companies_support') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('full_multiple_companies_support', trans('admin/settings/general.full_multiple_companies_support_text')) }}
<strong>{{ trans('admin/settings/general.full_multiple_companies_support_text') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('full_multiple_companies_support', '1', old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('class' => 'minimal', 'aria-label'=>'full_multiple_companies_support')) }}
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
<label class="form-control">
{{ Form::checkbox('full_multiple_companies_support', '1', old('full_multiple_companies_support', $setting->full_multiple_companies_support),array('aria-label'=>'full_multiple_companies_support')) }}
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
</label>
{!! $errors->first('full_multiple_companies_support', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.full_multiple_companies_support_help_text') }}
@ -62,12 +64,13 @@
<!-- Require signature for acceptance -->
<div class="form-group {{ $errors->has('require_accept_signature') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('require_accept_signature',
trans('admin/settings/general.require_accept_signature')) }}
<strong> {{ trans('admin/settings/general.require_accept_signature') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('require_accept_signature', '1', Request::old('require_accept_signature', $setting->require_accept_signature),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<label class="form-control">
{{ Form::checkbox('require_accept_signature', '1', Request::old('require_accept_signature', $setting->require_accept_signature)) }}
{{ trans('general.yes') }}
</label>
{!! $errors->first('require_accept_signature', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">{{ trans('admin/settings/general.require_accept_signature_help_text') }}</p>
</div>
@ -117,12 +120,14 @@
<!-- Load images in emails -->
<div class="form-group {{ $errors->has('show_images_in_email') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_images_in_email', trans('admin/settings/general.show_images_in_email')) }}
<strong>{{ trans('admin/settings/general.show_images_in_email') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('show_images_in_email', '1', Request::old('show_images_in_email', $setting->show_images_in_email),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
{!! $errors->first('show_images_in_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<label class="form-control">
{{ Form::checkbox('show_images_in_email', '1', old('show_images_in_email', $setting->show_images_in_email)) }}
{{ trans('general.yes') }}
{!! $errors->first('show_images_in_email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</label>
</div>
</div>
@ -130,11 +135,13 @@
<!-- unique serial -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('unique_serial', trans('admin/settings/general.unique_serial')) }}
<strong>{{ trans('admin/settings/general.unique_serial') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('unique_serial', '1', Request::old('unique_serial', $setting->unique_serial),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
<label class="form-control">
{{ Form::checkbox('unique_serial', '1', Request::old('unique_serial', $setting->unique_serial),array('class' => 'minimal')) }}
{{ trans('general.yes') }}
</label>
{!! $errors->first('unique_serial', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.unique_serial_help_text') }}
@ -277,14 +284,20 @@
<!-- Model List prefs -->
<div class="form-group {{ $errors->has('show_in_model_list') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('show_in_model_list',
trans('admin/settings/general.show_in_model_list')) }}
<strong>{{ trans('admin/settings/general.show_in_model_list') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('show_in_model_list[]', 'image', old('show_in_model_list', $snipeSettings->modellistCheckedValue('image')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.image') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'category', old('show_in_model_list', $snipeSettings->modellistCheckedValue('category')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.category') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'manufacturer', old('show_in_model_list', $snipeSettings->modellistCheckedValue('manufacturer')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.manufacturer') }} <br>
{{ Form::checkbox('show_in_model_list[]', 'model_number', old('show_in_model_list', $snipeSettings->modellistCheckedValue('model_number')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.model_no') }}<br>
<label class="form-control">
{{ Form::checkbox('show_in_model_list[]', 'image', old('show_in_model_list', $snipeSettings->modellistCheckedValue('image')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.image') }}
</label>
<label class="form-control">
{{ Form::checkbox('show_in_model_list[]', 'category', old('show_in_model_list', $snipeSettings->modellistCheckedValue('category')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.category') }}
</label>
<label class="form-control">
{{ Form::checkbox('show_in_model_list[]', 'manufacturer', old('show_in_model_list', $snipeSettings->modellistCheckedValue('manufacturer')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.manufacturer') }} </label>
<label class="form-control">
{{ Form::checkbox('show_in_model_list[]', 'model_number', old('show_in_model_list', $snipeSettings->modellistCheckedValue('model_number')),array('class' => 'minimal', 'aria-label'=>'show_in_model_list' )) }} {{ trans('general.model_no') }}
</label>
</div>
</div>

View file

@ -54,7 +54,7 @@
<div class="col-md-3">
{{ Form::label('labels_fontsize', trans('admin/settings/general.labels_fontsize')) }}
</div>
<div class="col-md-2 form-group">
<div class="col-md-2">
<div class="input-group">
{{ Form::text('labels_fontsize', old('labels_fontsize', $setting->labels_fontsize), ['class' => 'form-control', 'aria-label'=>'labels_fontsize']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.text_pt') }}</div>
@ -69,13 +69,13 @@
<div class="col-md-3">
{{ Form::label('labels_width', trans('admin/settings/general.label_dimensions')) }}
</div>
<div class="col-md-3 form-group">
<div class="col-md-3">
<div class="input-group">
{{ Form::text('labels_width', old('labels_width', $setting->labels_width), ['class' => 'form-control', 'aria-label'=>'labels_width']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
</div>
</div>
<div class="col-md-3 form-group" style="margin-left: 10px">
<div class="col-md-3">
<div class="input-group">
{{ Form::text('labels_height', old('labels_height', $setting->labels_height), ['class' => 'form-control', 'aria-label'=>'labels_height']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.height_h') }}</div>
@ -91,13 +91,13 @@
<div class="col-md-3">
{{ Form::label('labels_display_sgutter', trans('admin/settings/general.label_gutters')) }}
</div>
<div class="col-md-3 form-group">
<div class="col-md-3">
<div class="input-group">
{{ Form::text('labels_display_sgutter', old('labels_display_sgutter', $setting->labels_display_sgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_sgutter']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.horizontal') }}</div>
</div>
</div>
<div class="col-md-3 form-group" style="margin-left: 10px">
<div class="col-md-3">
<div class="input-group">
{{ Form::text('labels_display_bgutter', old('labels_display_bgutter', $setting->labels_display_bgutter), ['class' => 'form-control', 'aria-label'=>'labels_display_bgutter']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.vertical') }}</div>
@ -113,7 +113,7 @@
<div class="col-md-3">
{{ Form::label('labels_pmargin_top', trans('admin/settings/general.page_padding')) }}
</div>
<div class="col-md-3 form-group">
<div class="col-md-3">
<div class="input-group" style="margin-bottom: 15px;">
{{ Form::text('labels_pmargin_top', old('labels_pmargin_top', $setting->labels_pmargin_top), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_top']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.top') }}</div>
@ -123,7 +123,7 @@
<div class="input-group-addon">{{ trans('admin/settings/general.right') }}</div>
</div>
</div>
<div class="col-md-3 form-group" style="margin-left: 10px; ">
<div class="col-md-3" style="margin-left: 10px; ">
<div class="input-group" style="margin-bottom: 15px;">
{{ Form::text('labels_pmargin_bottom', old('labels_pmargin_bottom', $setting->labels_pmargin_bottom), ['class' => 'form-control', 'aria-label'=>'labels_pmargin_bottom']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.bottom') }}</div>
@ -144,7 +144,7 @@
<div class="col-md-3">
{{ Form::label('labels_pagewidth', trans('admin/settings/general.page_dimensions')) }}
</div>
<div class="col-md-3 form-group">
<div class="col-md-3">
<div class="input-group">
{{ Form::text('labels_pagewidth', old('labels_pagewidth', $setting->labels_pagewidth), ['class' => 'form-control', 'aria-label'=>'labels_pagewidth']) }}
<div class="input-group-addon">{{ trans('admin/settings/general.width_w') }}</div>
@ -167,29 +167,27 @@
{{ Form::label('labels_display', trans('admin/settings/general.label_fields')) }}
</div>
<div class="col-md-9">
<div class="checkbox">
<label for="labels_display_name">
<label class="form-control">
{{ Form::checkbox('labels_display_name', '1', old('labels_display_name', $setting->labels_display_name),['class' => 'minimal', 'aria-label'=>'labels_display_name']) }}
{{ trans('admin/hardware/form.name') }}
</label>
<label for="labels_display_serial">
<label class="form-control">
{{ Form::checkbox('labels_display_serial', '1', old('labels_display_serial', $setting->labels_display_serial),['class' => 'minimal', 'aria-label'=>'labels_display_serial']) }}
{{ trans('admin/hardware/form.serial') }}
</label>
<label for="labels_display_tag">
<label class="form-control">
{{ Form::checkbox('labels_display_tag', '1', old('labels_display_tag', $setting->labels_display_tag),['class' => 'minimal', 'aria-label'=>'labels_display_tag']) }}
{{ trans('admin/hardware/form.tag') }}
</label>
<label for="labels_display_model">
<label class="form-control">
{{ Form::checkbox('labels_display_model', '1', old('labels_display_model', $setting->labels_display_model),['class' => 'minimal', 'aria-label'=>'labels_display_model']) }}
{{ trans('admin/hardware/form.model') }}
</label>
<label for="labels_display_company_name">
<label class="form-control">
{{ Form::checkbox('labels_display_company_name', '1', old('labels_display_company_name', $setting->labels_display_company_name),['class' => 'minimal', 'aria-label'=>'labels_display_company_name']) }}
{{ trans('admin/companies/table.name') }}
</label>
</label>
</div> <!--/.CHECKBOX-->
</div> <!--/.col-md-9-->
</div> <!--/.form-group-->

View file

@ -43,27 +43,29 @@
</div>
<div class="box-body">
<div class="col-md-11 col-md-offset-1">
<!-- Enable SAML -->
<div class="form-group {{ $errors->has('saml_integration') ? 'error' : '' }}">
<div class="form-group{{ $errors->has('saml_integration') ? ' error' : '' }}">
<div class="col-md-3">
{{ Form::label('saml_integration', trans('admin/settings/general.saml_integration')) }}
<strong>{{ trans('admin/settings/general.saml_integration') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('saml_enabled', '1', Request::old('saml_enabled', $setting->saml_enabled), [((config('app.lock_passwords')===true)) ? 'disabled ': '', 'class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_enabled') }}
{!! $errors->first('saml_integration', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}<br>
@if (config('app.lock_passwords')===true)
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
{{ Form::checkbox('saml_enabled', '1', old('saml_enabled', $setting->saml_enabled), ['class' => config('app.lock_passwords') === true ? 'disabled ': '', config('app.lock_passwords') === true ? 'disabled ': '', ]) }}
{{ trans('admin/settings/general.saml_enabled') }}
</label>
{!! $errors->first('saml_integration', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@if (config('app.lock_passwords') === true)
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@endif
</div>
@if ($setting->saml_enabled)
<div class="col-md-9 col-md-offset-3">
<!-- SAML SP Details -->
<!-- SAML SP Entity ID -->
{{ Form::label('saml_sp_entitiyid', trans('admin/settings/general.saml_sp_entityid')) }}
@ -95,6 +97,7 @@
</div>
</div>
<!-- SAML IdP Metadata -->
<div class="form-group {{ $errors->has('saml_idp_metadata') ? 'error' : '' }}">
<div class="col-md-3">
@ -103,10 +106,10 @@
<div class="col-md-9">
{{ Form::textarea('saml_idp_metadata', old('saml_idp_metadata', $setting->saml_idp_metadata), ['class' => 'form-control','placeholder' => 'https://example.com/idp/metadata', 'wrap' => 'off', $setting->demoMode]) }}
{!! $errors->first('saml_idp_metadata', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}<br>
<button type="button" class="btn btn-default" id="saml_idp_metadata_upload_btn">{{ trans('button.select_file') }}</button>
<button type="button" class="btn btn-default" id="saml_idp_metadata_upload_btn" {{ $setting->demoMode }}>{{ trans('button.select_file') }}</button>
<input type="file" class="js-uploadFile" id="saml_idp_metadata_upload"
data-maxsize="{{ Helper::file_upload_max_size() }}"
accept="text/xml,application/xml" style="display:none; max-width: 90%">
accept="text/xml,application/xml" style="display:none; max-width: 90%" {{ $setting->demoMode }}>
<p class="help-block">{{ trans('admin/settings/general.saml_idp_metadata_help') }}</p>
</div>
@ -118,7 +121,7 @@
{{ Form::label('saml_attr_mapping_username', trans('admin/settings/general.saml_attr_mapping_username')) }}
</div>
<div class="col-md-9">
{{ Form::text('saml_attr_mapping_username', Request::old('saml_attr_mapping_username', $setting->saml_attr_mapping_username), ['class' => 'form-control','placeholder' => '', $setting->demoMode]) }}
{{ Form::text('saml_attr_mapping_username', old('saml_attr_mapping_username', $setting->saml_attr_mapping_username), ['class' => 'form-control','placeholder' => '', $setting->demoMode]) }}
<p class="help-block">{{ trans('admin/settings/general.saml_attr_mapping_username_help') }}</p>
{!! $errors->first('saml_attr_mapping_username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
@ -127,11 +130,13 @@
<!-- SAML Force Login -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('saml_forcelogin', trans('admin/settings/general.saml_forcelogin_label')) }}
<strong>{{ trans('admin/settings/general.saml_forcelogin_label') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('saml_forcelogin', '1', Request::old('saml_forcelogin', $setting->saml_forcelogin),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_forcelogin') }}
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
{{ Form::checkbox('saml_forcelogin', '1', old('saml_forcelogin', $setting->saml_forcelogin),['class' => $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_forcelogin') }}
</label>
<p class="help-block">{{ trans('admin/settings/general.saml_forcelogin_help') }}</p>
<p class="help-block">{{ route('login', ['nosaml']) }}</p>
{!! $errors->first('saml_forcelogin', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
@ -141,11 +146,13 @@
<!-- SAML Single Log Out -->
<div class="form-group">
<div class="col-md-3">
{{ Form::label('saml_slo', trans('admin/settings/general.saml_slo_label')) }}
<strong>{{ trans('admin/settings/general.saml_slo_label') }}</strong>
</div>
<div class="col-md-9">
{{ Form::checkbox('saml_slo', '1', Request::old('saml_slo', $setting->saml_slo),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_slo') }}
<label class="form-control{{ config('app.lock_passwords') === true ? ' form-control--disabled': '' }}">
{{ Form::checkbox('saml_slo', '1', old('saml_slo', $setting->saml_slo),['class' => 'minimal '. $setting->demoMode, $setting->demoMode]) }}
{{ trans('admin/settings/general.saml_slo') }}
</label>
<p class="help-block">{{ trans('admin/settings/general.saml_slo_help') }}</p>
{!! $errors->first('saml_slo', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
@ -161,17 +168,15 @@
<p class="help-block">{{ trans('admin/settings/general.saml_custom_settings_help') }}</p>
{!! $errors->first('saml_custom_settings', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
</div>
</div> <!--/.box-body-->
<div class="box-footer">
<div class="text-left col-md-6">
<a class="btn btn-link text-left" href="{{ route('settings.index') }}">{{ trans('button.cancel') }}</a>
</div>
<div class="text-right col-md-6">
<button type="submit" class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
<button type="submit" class="btn btn-primary"{{ config('app.lock_passwords') === true ? ' disabled': '' }}><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
</div>
</div>

View file

@ -72,25 +72,6 @@
</div>
<!-- Common Passwords -->
<div class="form-group {{ $errors->has('pwd_secure_uncommon') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('pwd_secure_text_label',
trans('admin/settings/general.pwd_secure_uncommon')) }}
</div>
<div class="col-md-9">
<label for="pwd_secure_uncommon"><span class="sr-only">Prevent common insecure passwords</span>
{{ Form::checkbox('pwd_secure_uncommon', '1', old('pwd_secure_uncommon', $setting->pwd_secure_uncommon),array('class' => 'minimal', 'aria-label'=>'pwd_secure_uncommon')) }}
{{ trans('general.yes') }}
</label>
{!! $errors->first('pwd_secure_uncommon', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.pwd_secure_uncommon_help') }}
</p>
</div>
</div>
<!-- /.form-group -->
<!-- Common Passwords -->
<div class="form-group">
@ -99,21 +80,31 @@
</div>
<div class="col-md-9">
{{ Form::checkbox("pwd_secure_complexity['disallow_same_pwd_as_user_fields']", 'disallow_same_pwd_as_user_fields', old('disallow_same_pwd_as_user_fields', strpos($setting->pwd_secure_complexity, 'disallow_same_pwd_as_user_fields')!==false), array('class' => 'minimal', 'aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_disallow_same_pwd_as_user_fields') }}<br>
{{ Form::checkbox("pwd_secure_complexity['letters']", 'letters', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'letters')!==false), array('class' => 'minimal', 'aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_letters') }}<br>
{{ Form::checkbox("pwd_secure_complexity['numbers']", 'numbers', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'numbers')!==false), array('class' => 'minimal', 'aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_numbers') }}<br>
{{ Form::checkbox("pwd_secure_complexity['symbols']", 'symbols', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'symbols')!==false), array('class' => 'minimal', 'aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_symbols') }}<br>
{{ Form::checkbox("pwd_secure_complexity['case_diff']", 'case_diff', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'case_diff')!==false), array('class' => 'minimal', 'aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_case_diff') }}
<label class="form-control">
<span class="sr-only">{{ trans('admin/settings/general.pwd_secure_uncommon') }}</span>
{{ Form::checkbox('pwd_secure_uncommon', '1', old('pwd_secure_uncommon', $setting->pwd_secure_uncommon),array( 'aria-label'=>'pwd_secure_uncommon')) }}
{{ trans('admin/settings/general.pwd_secure_uncommon') }}
</label>
<label class="form-control">
{{ Form::checkbox("pwd_secure_complexity['disallow_same_pwd_as_user_fields']", 'disallow_same_pwd_as_user_fields', old('disallow_same_pwd_as_user_fields', strpos($setting->pwd_secure_complexity, 'disallow_same_pwd_as_user_fields')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_disallow_same_pwd_as_user_fields') }}
</label>
<label class="form-control">
{{ Form::checkbox("pwd_secure_complexity['letters']", 'letters', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'letters')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_letters') }}
</label>
<label class="form-control">
{{ Form::checkbox("pwd_secure_complexity['numbers']", 'numbers', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'numbers')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_numbers') }}
</label>
<label class="form-control">
{{ Form::checkbox("pwd_secure_complexity['symbols']", 'symbols', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'symbols')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_symbols') }}
</label>
<label class="form-control">
{{ Form::checkbox("pwd_secure_complexity['case_diff']", 'case_diff', old('pwd_secure_uncommon', strpos($setting->pwd_secure_complexity, 'case_diff')!==false), array('aria-label'=>'pwd_secure_complexity')) }}
{{ trans('admin/settings/general.pwd_secure_complexity_case_diff') }}
</label>
<p class="help-block">
{{ trans('admin/settings/general.pwd_secure_complexity_help') }}
@ -125,7 +116,7 @@
<!-- Remote User Authentication -->
<div class="form-group {{ $errors->has('login_remote_user') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('login_remote_user_label', trans('admin/settings/general.login_remote_user_text')) }}
<strong>{{ trans('admin/settings/general.login_remote_user_text') }}</strong>
</div>
<div class="col-md-9">
<!-- Enable Remote User Login -->
@ -133,8 +124,11 @@
@if (config('app.lock_passwords'))
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@else
{{ Form::checkbox('login_remote_user_enabled', '1', old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal', 'aria-label'=>'login_remote_user')) }}
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
<label class="form-control">
{{ Form::checkbox('login_remote_user_enabled', '1', old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('aria-label'=>'login_remote_user')) }}
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
</label>
{!! $errors->first('login_remote_user_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
<p class="help-block">
{{ trans('admin/settings/general.login_remote_user_enabled_help') }}
@ -155,9 +149,9 @@
{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}
</p>
<!-- Disable other logins mechanism -->
<label>
<label class="form-control">
{{ Form::checkbox('login_common_disabled', '1', old('login_common_disabled', $setting->login_common_disabled),array('class' => 'minimal', 'aria-label'=>'login_common_disabled')) }}
{{ Form::checkbox('login_common_disabled', '1', old('login_common_disabled', $setting->login_common_disabled),array('aria-label'=>'login_common_disabled')) }}
{{ trans('admin/settings/general.login_common_disabled_text') }}
</label>
{!! $errors->first('login_common_disabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}

View file

@ -23,9 +23,11 @@
<!-- Label type -->
<div class="form-group{{ $errors->has('statuslabel_types') ? ' has-error' : '' }}">
<label for="statuslabel_types" class="col-md-3 control-label">{{ trans('admin/statuslabels/table.status_type') }} </label>
<label for="statuslabel_types" class="col-md-3 control-label">
{{ trans('admin/statuslabels/table.status_type') }}
</label>
<div class="col-md-7 required">
{{ Form::select('statuslabel_types', $statuslabel_types, $item->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px', 'aria-label'=>'statuslabel_types')) }}
{{ Form::select('statuslabel_types', $statuslabel_types, $item->getStatuslabelType(), array('class'=>'select2', 'style'=>'width: 100%; min-width:400px', 'aria-label'=>'statuslabel_types')) }}
{!! $errors->first('statuslabel_types', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
@ -33,12 +35,12 @@
<!-- Chart color -->
<div class="form-group{{ $errors->has('color') ? ' has-error' : '' }}">
{{ Form::label('color', trans('admin/statuslabels/table.color'), ['class' => 'col-md-3 control-label']) }}
<div class="col-md-2">
<div class="col-md-9">
<div class="input-group color">
{{ Form::text('color', Request::old('color', $item->color), array('class' => 'form-control', 'style' => 'width: 100px;', 'maxlength'=>'10')) }}
{{ Form::text('color', Request::old('color', $item->color), array('class' => 'form-control col-md-10', 'maxlength'=>'20')) }}
<div class="input-group-addon"><i></i></div>
</div><!-- /.input group -->
{!! $errors->first('header_color', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
{!! $errors->first('color', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
@ -46,19 +48,23 @@
<!-- Show in Nav -->
<div class="form-group{{ $errors->has('notes') ? ' has-error' : '' }}">
<label class="col-md-offset-3" style="padding-left: 15px;">
<input type="checkbox" value="1" name="show_in_nav" id="show_in_nav" class="minimal" {{ Request::old('show_in_nav', $item->show_in_nav) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.show_in_nav') }}
</label>
<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" {{ Request::old('show_in_nav', $item->show_in_nav) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.show_in_nav') }}
</label>
</div>
</div>
<!-- Set as Default -->
<div class="form-group{{ $errors->has('default_label') ? ' has-error' : '' }}">
<label class="col-md-offset-3" style="padding-left: 15px;">
<input type="checkbox" value="1" name="default_label" id="default_label" class="minimal" {{ Request::old('default_label', $item->default_label) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/statuslabels/table.default_label') }}
</label>
<p class="col-md-offset-3 help-block"> {{ trans('admin/statuslabels/table.default_label_help') }}</p>
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
<input type="checkbox" value="1" name="default_label" id="default_label" {{ Request::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>
@stop
@ -66,6 +72,7 @@
@section('moar_scripts')
<!-- bootstrap color picker -->
<script nonce="{{ csrf_token() }}">
$(function() {
$('.color').colorpicker({
color: '#AA3399',

View file

@ -42,25 +42,6 @@
</div>
@include ('partials.forms.edit.notes')
@include ('partials.forms.edit.image-upload', ['image_path' => app('suppliers_upload_path')])
<!-- Image -->
@if (($item->image) && ($item->image!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('suppliers_upload_path').e($item->image)) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload')
@stop

View file

@ -44,8 +44,8 @@
<div class="form-group">
<div class=" col-md-9 col-md-offset-3">
<label>
{{ Form::checkbox('null_location_id', '1', false, ['class' => 'minimal']) }}
<label class="form-control">
{{ Form::checkbox('null_location_id', '1', false) }}
{{ trans_choice('general.set_users_field_to_null', count($users), ['field' => trans('general.location'), 'user_count' => count($users)]) }}
</label>
</div>
@ -84,14 +84,21 @@
{{ trans('admin/users/general.remote') }}
</div>
<div class="col-sm-9">
<div class="radio">
<label for="remote">
{{ Form::radio('remote', '', true, ['aria-label'=>'remote', 'class'=>'minimal']) }} {{ trans('general.do_not_change') }} <br>
{{ Form::radio('remote', '1', old('remote'), ['aria-label'=>'remote', 'class'=>'minimal']) }} {{ trans('admin/users/general.remote_label') }}<br>
{{ Form::radio('remote', '0', old('remote'), ['aria-label'=>'remote', 'class'=>'minimal']) }} {{ trans('admin/users/general.not_remote_label') }}
<label for="no_change" class="form-control">
{{ Form::radio('remote', '', true, ['id' => 'no_change', 'aria-label'=>'no_change']) }}
{{ trans('general.do_not_change') }}
</label>
</div>
<label for="remote" class="form-control">
{{ Form::radio('remote', '1', old('remote'), ['id' => 'remote', 'aria-label'=>'remote']) }}
{{ trans('admin/users/general.remote_label') }}
</label>
<label for="not_remote" class="form-control">
{{ Form::radio('remote', '0', old('remote'), ['id' => 'not_remote', 'aria-label'=>'not_remote']) }}
{{ trans('admin/users/general.not_remote_label') }}
</label>
</div>
</div> <!--/form-group-->
@ -101,12 +108,14 @@
{{ trans('general.ldap_sync') }}
</div>
<div class="col-sm-9">
<div class="radio">
<label for="ldap_import">
{{ Form::radio('ldap_import', '', true, ['aria-label'=>'ldap_import', 'class'=>'minimal']) }} {{ trans('general.do_not_change') }} <br>
{{ Form::radio('ldap_import', '0', old('ldap_import'), ['aria-label'=>'ldap_import', 'class'=>'minimal']) }} {{ trans('general.ldap_import') }}
<label for="no_change" class="form-control">
{{ Form::radio('ldap_import', '', true, ['id' => 'no_change', 'aria-label'=>'ldap_import']) }}
{{ trans('general.do_not_change') }}
</label>
<label for="ldap_import" class="form-control">
{{ Form::radio('ldap_import', '0', old('ldap_import'), ['id' => 'ldap_import', 'aria-label'=>'ldap_import']) }}
{{ trans('general.ldap_import') }}
</label>
</div>
</div>
</div> <!--/form-group-->
@ -116,14 +125,20 @@
{{ trans('general.login_enabled') }}
</div>
<div class="col-sm-9">
<div class="radio">
<label for="activated">
{{ Form::radio('activated', '', true, ['aria-label'=>'activated', 'class'=>'minimal']) }} {{ trans('general.do_not_change') }} <br>
{{ Form::radio('activated', '1', old('activated'), ['aria-label'=>'activated', 'class'=>'minimal']) }} {{ trans('admin/users/general.user_activated')}} <br>
{{ Form::radio('activated', '0', old('activated'), ['aria-label'=>'activated', 'class'=>'minimal']) }} {{ trans('admin/users/general.user_deactivated')}}
<label for="no_change" class="form-control">
{{ Form::radio('activated', '', true, ['id' => 'no_change', 'aria-label'=>'no_change']) }}
{{ trans('general.do_not_change') }}
</label>
</div>
<label for="activated" class="form-control">
{{ Form::radio('activated', '1', old('activated'), ['id' => 'activated', 'aria-label'=>'activated']) }}
{{ trans('admin/users/general.user_activated')}}
</label>
<label for="deactivated" class="form-control">
{{ Form::radio('activated', '0', old('activated'), ['id' => 'deactivated', 'aria-label'=>'deactivated']) }}
{{ trans('admin/users/general.user_deactivated')}}
</label>
</div>
</div> <!--/form-group-->
@ -158,9 +173,15 @@
@endforeach
</div> <!--/.box-body-->
<div class="text-right box-footer">
<button type="submit" class="btn btn-success"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
</div>
<div class="box-footer text-right">
<a class="btn btn-link pull-left" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success"{{ (config('app.lock_passwords') ? ' disabled' : '') }}>
<i class="fas fa-check icon-white" aria-hidden="true"></i>
{{ trans('button.update') }}
</button>
</div><!-- /.box-footer -->
</div> <!--/.box.box-default-->
</form>
</div> <!--/.col-md-8-->

View file

@ -18,8 +18,8 @@
<div class="col-md-12">
<div class="callout callout-danger">
<i class="fas fa-exclamation-triangle"></i>
<strong>{{ trans('admin/users/general.warning_deletion') }} </strong>
{{ trans('admin/users/general.warning_deletion_information', array('count' => count($users))) }}
<strong>{{ trans('admin/users/general.warning_deletion_information', array('count' => count($users))) }} </strong>
</div>
</div>
@ -36,7 +36,9 @@
<table class="display table table-hover">
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-1">
<!-- <input type="checkbox" id="checkAll"> -->
</th>
<th class="col-md-6">{{ trans('general.name') }}</th>
<th class="col-md-5">{{ trans('general.groups') }}</th>
<th class="col-md-5">{{ trans('general.assets') }}</th>
@ -50,9 +52,9 @@
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
<td>
@if (Auth::id()!=$user->id)
<input type="checkbox" name="ids[]" value="{{ $user->id }}" class="minimal" checked="checked">
<input type="checkbox" name="ids[]" value="{{ $user->id }}" checked="checked">
@else
<input type="checkbox" name="ids[]" value="{{ $user->id }}" class="minimal" disabled>
<input type="checkbox" name="ids[]" class="cannot_delete" value="{{ $user->id }}" disabled>
@endif
</td>
@ -93,10 +95,10 @@
</td>
</tr>
<tr>
<td colspan="7" class="text-danger">
<label>
<input type="checkbox" name="delete_user" value="1" class="minimal">
<i class="fa fa-warning text-danger"></i> {{ trans('general.bulk_soft_delete') }}
<td colspan="7" class="col-md-12 alert-danger">
<label class="form-control">
<input type="checkbox" name="delete_user" value="1">
<span><i class="fa fa-warning fa-2x"></i> {{ trans('general.bulk_soft_delete') }}</span>
</label>
</td>
</tr>
@ -120,7 +122,15 @@
@section('moar_scripts')
<script>
$(":submit").attr("disabled", "disabled");
// TODO: include a class that excludes certain checkboxes by class to not be select-all'd
// $("#checkAll").change(function () {
// $("input:checkbox").prop('checked', $(this).prop("checked"));
// });
$(":submit").attr("disabled", "disabled");
$("[name='status_id']").on('select2:select', function (e) {
if (e.params.data.id != ""){
console.log(e.params.data.id);

View file

@ -71,8 +71,7 @@
@foreach ($users as $user)
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
<td>
<input type="radio" name="merge_into_id" id="{{ $user->id }}" value="{{ $user->id }}" class="minimal">
<label for="{{ $user->id }}"> {{ $user->present()->fullName() }}</label>
<label class="form-control" for="{{ $user->id }}"><input type="radio" name="merge_into_id" id="{{ $user->id }}" value="{{ $user->id }}"> {{ $user->present()->fullName() }}</label>
</td>
<td>
{{ $user->email }}

View file

@ -75,12 +75,12 @@
<!-- Custom Tabs -->
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab">{{ trans('general.information') }} </a></li>
<li class="active"><a href="#info" data-toggle="tab">{{ trans('general.information') }} </a></li>
<li><a href="#permissions" data-toggle="tab">{{ trans('general.permissions') }} </a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
<div class="tab-pane active" id="info">
<div class="row">
<div class="col-md-12">
<!-- First Name -->
@ -104,6 +104,7 @@
<!-- Username -->
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="username">{{ trans('admin/users/table.username') }}</label>
<div class="col-md-6{{ (Helper::checkIfRequired($user, 'username')) ? ' required' : '' }}">
@if ($user->ldap_import!='1' || str_contains(Route::currentRouteName(), 'clone'))
<input
@ -111,24 +112,35 @@
type="text"
name="username"
id="username"
value="{{ Request::old('username', $user->username) }}"
value="{{ old('username', $user->username) }}"
autocomplete="off"
maxlength="191"
readonly
onfocus="this.removeAttribute('readonly');"
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
>
@if (config('app.lock_passwords') && ($user->id))
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
@endif
@else
{{ trans('general.managed_ldap') }}
<input type="hidden" name="username" value="{{ Request::old('username', $user->username) }}">
@else
<!-- insert the old username so we don't break validation -->
{{ trans('general.managed_ldap') }}
<input type="hidden" name="username" value="{{ Request::old('username', $user->username) }}">
@endif
</div>
@if (config('app.lock_passwords') && ($user->id))
<!-- disallow changing existing usernames on the demo -->
<div class="col-md-8 col-md-offset-3">
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
</div>
@endif
@if ($errors->first('username'))
<div class="col-md-8 col-md-offset-3">
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
@endif
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- Password -->
@ -191,42 +203,36 @@
</div>
@endif
<!-- Activation Status -->
<!-- Activation Status (Can the user login?) -->
<div class="form-group {{ $errors->has('activated') ? 'has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<div class="form-group">
<div class="col-md-3 control-label">
{{ Form::label('activated', trans('general.login_enabled')) }}
</div>
<div class="col-md-9">
<!-- checkbox($name, $value = 1, $checked = null, $options = array() -->
@if (config('app.lock_passwords'))
<div class="icheckbox disabled" style="padding-left: 10px;">
<input type="checkbox" value="1" name="activated" class="minimal disabled" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} disabled="disabled" aria-label="activated">
<!-- this is necessary because the field is disabled and will reset -->
<input type="hidden" name="activated" value="{{ (int)$user->activated }}">
<!-- demo mode - disallow changes -->
<label class="form-control form-control--disabled">
<input type="checkbox" value="1" name="activated" class="disabled" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} disabled="disabled" aria-label="activated">
{{ trans('admin/users/general.activated_help_text') }}
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
</div>
</label>
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
@elseif ($user->id === Auth::user()->id)
<div class="icheckbox disabled" style="padding-left: 10px;">
<input type="checkbox" value="1" name="activated" class="minimal disabled" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} disabled="disabled">
<!-- this is necessary because the field is disabled and will reset -->
<input type="hidden" name="activated" value="1" aria-label="activated">
<!-- disallow the user from editing their own login status -->
<label class="form-control form-control--disabled">
{{ Form::checkbox('activated', '1', old('activated', $user->activated), ['disabled' => true, 'checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}
{{ trans('admin/users/general.activated_help_text') }}
<p class="help-block">{{ trans('admin/users/general.activated_disabled_help_text') }}</p>
</div>
</label>
<p class="text-warning">{{ trans('admin/users/general.activated_disabled_help_text') }}</p>
@else
<div style="padding-left: 10px;">
<input type="checkbox" value="1" id="activated" name="activated" class="minimal" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
<!-- everything is normal - as you were -->
<label class="form-control">
{{ Form::checkbox('activated', '1', old('activated'), ['id' => 'activated', 'checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}
{{ trans('admin/users/general.activated_help_text') }}
</div>
</label>
@endif
{!! $errors->first('activated', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
</div>
@ -256,43 +262,23 @@
<!-- Email user -->
@if (!$user->id)
<div class="form-group" id="email_user_row">
<div class="col-sm-3">
</div>
<div class="col-md-9">
<div class="icheckbox disabled" id="email_user_div">
{{ Form::checkbox('email_user', '1', Request::old('email_user'),['class' => 'minimal', 'disabled'=>true, 'id' => 'email_user_checkbox']) }}
Email this user their credentials?
</div>
<p class="help-block">
{{ trans('admin/users/general.send_email_help') }}
</p>
<div class="col-md-8 col-md-offset-3">
<label class="form-control form-control--disabled">
{{ Form::checkbox('email_user', '1', old('email_user'), ['id' => "email_user_checkbox", 'aria-label'=>'email_user']) }}
{{ trans('admin/users/general.email_user_creds_on_create') }}
</label>
<p class="help-block"> {{ trans('admin/users/general.send_email_help') }}</p>
</div>
</div> <!--/form-group-->
@endif
<!-- Image -->
@if (($user->avatar) && ($user->avatar!=''))
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label for="image_delete">
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['class'=>'minimal','aria-label'=>'image_delete']) }}
{{ trans('general.image_delete') }}
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</label>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<img src="{{ Storage::disk('public')->url(app('users_upload_path').$user->avatar) }}" class="img-responsive">
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>
@endif
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')])
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar'])
<!-- begin optional disclosure arrow stuff -->
<div class="form-group">
@ -371,15 +357,16 @@
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.end_date'), 'fieldname' => 'end_date', 'item' => $user])
<!-- VIP checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="vip">
<input type="checkbox" value="1" name="vip" class="minimal" {{ (old('vip', $user->vip)) == '1' ? ' checked="checked"' : '' }} aria-label="vip">
{{ trans('admin/users/general.vip_label') }}
<label class="form-control" for="vip">
<input type="checkbox" value="1" name="vip" {{ (old('vip', $user->vip)) == '1' ? ' checked="checked"' : '' }} aria-label="vip">
{{ trans('admin/users/general.vip_label') }}
</label>
<p class="help-block">{{ trans('admin/users/general.vip_help') }}
</p>
<p class="help-block">{{ trans('admin/users/general.vip_help') }}</p>
</div>
</div>
@ -387,10 +374,9 @@
<!-- remote checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="remote">
<input type="checkbox" value="1" name="remote" class="minimal" {{ (old('remote', $user->remote)) == '1' ? ' checked="checked"' : '' }} aria-label="remote">
<label for="remote" class="form-control">
<input type="checkbox" value="1" name="remote" {{ (old('remote', $user->remote)) == '1' ? ' checked="checked"' : '' }} aria-label="remote">
{{ trans('admin/users/general.remote_label') }}
</label>
<p class="help-block">{{ trans('admin/users/general.remote_help') }}
</p>
@ -400,13 +386,10 @@
<!-- Auto Assign checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="autoassign_licenses">
<input type="checkbox" value="1" name="autoassign_licenses" class="minimal" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? ' checked="checked"' : '' }} aria-label="autoassign_licenses">
<label for="autoassign_licenses" class="form-control">
<input type="checkbox" value="1" name="autoassign_licenses" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? ' checked="checked"' : '' }} aria-label="autoassign_licenses">
{{ trans('admin/users/general.auto_assign_label') }}
</label>
<p class="help-block">{{ trans('admin/users/general.auto_assign_help') }}
</p>
</div>
</div>
@ -488,17 +471,21 @@
@if ($snipeSettings->two_factor_enabled!='')
@if ($snipeSettings->two_factor_enabled=='1')
<div class="form-group">
<div class="col-md-3 control-label">
{{ Form::label('two_factor_optin', trans('admin/settings/general.two_factor')) }}
</div>
<div class="col-md-9">
<div class="col-md-9 col-md-offset-3">
@if (config('app.lock_passwords'))
<div class="icheckbox disabled">
{{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),['class' => 'minimal', 'disabled'=>'disabled']) }} {{ trans('admin/settings/general.two_factor_enabled_text') }}
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
</div>
<label class="form-control form-control--disabled" for="two_factor_optin">
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin" disabled>
{{ trans('admin/settings/general.two_factor') }}
</label>
@else
{{ Form::checkbox('two_factor_optin', '1', Request::old('two_factor_optin', $user->two_factor_optin),['class' => 'minimal']) }} {{ trans('admin/settings/general.two_factor_enabled_text') }}
<label class="form-control" for="two_factor_optin">
<input type="checkbox" value="1" name="two_factor_optin" {{ (old('two_factor_optin', $user->two_factor_optin)) == '1' ? ' checked="checked"' : '' }} aria-label="two_factor_optin">
{{ trans('admin/settings/general.two_factor') }}
</label>
<p class="help-block">{{ trans('admin/users/general.two_factor_admin_optin_help') }}</p>
@endif
@ -613,33 +600,51 @@
@section('moar_scripts')
<script nonce="{{ csrf_token() }}">
$(document).ready(function() {
$('#activated').on('ifChecked', function(event){
console.log('user activated is checked');
$("#email_user_row").show();
});
$('#activated').on('ifUnchecked', function(event){
$("#email_user_row").hide();
});
$('#email').on('keyup',function(){
event.preventDefault();
if(this.value.length > 5){
$('#email_user_checkbox').iCheck('enable');
// If the "user can login" check box is checked, show them the ability to email the user credentials
$("#activated").change(function() {
if (this.checked) {
$("#email_user_row").show();
} else {
$('#email_user_checkbox').iCheck('disable').iCheck('uncheck');
$("#email_user_row").hide();
}
});
// Set some defaults
$('#email_user_checkbox').prop("disabled", true);
$('#email_user_checkbox').prop("checked", false);
$("#email_user_checkbox").removeAttr('checked');
// If the email address is longer than 5 characters, enable the "send email" checkbox
$('#email').on('keyup',function(){
//event.preventDefault();
@if (!config('app.lock_passwords'))
if (this.value.length > 5){
console.log('email field is ' + this.value.length + ' - enable the checkbox');
$('#email_user_checkbox').prop("disabled", false);
$("#email_user_checkbox").parent().removeClass("form-control--disabled");
} else {
console.log('email field is ' + this.value.length + ' - DISABLE the checkbox');
$('#email_user_checkbox').prop("disabled", true);
$('#email_user_checkbox').prop("checked", false);
$("#email_user_checkbox").parent().addClass("form-control--disabled");
}
@endif
});
// Check/Uncheck all radio buttons in the group
$('tr.header-row input:radio').on('ifClicked', function () {
$('tr.header-row input:radio').change(function() {
value = $(this).attr('value');
area = $(this).data('checker-group');
$('.radiochecker-'+area+'[value='+value+']').iCheck('check');
$('.radiochecker-'+area+'[value='+value+']').prop('checked', true);
});
$('.header-name').click(function() {

View file

@ -18,8 +18,6 @@ mix
"./node_modules/@fortawesome/fontawesome-free/css/all.css",
"./public/css/build/AdminLTE.css",
"./node_modules/jquery-ui-bundle/jquery-ui.css",
"./node_modules/admin-lte/plugins/iCheck/minimal/blue.css",
"./node_modules/icheck/skins/minimal/minimal.css",
"./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.standalone.css",
"./node_modules/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css",
"./node_modules/blueimp-file-upload/css/jquery.fileupload.css",
@ -34,13 +32,6 @@ mix
)
.version();
mix.copy(
[
"./node_modules/icheck/skins/minimal/blue.png",
"./node_modules/icheck/skins/minimal/blue@2x.png",
],
"./public/css"
);
/**
* Copy, minify and version signature-pad.css
@ -174,7 +165,6 @@ mix.combine(
"./node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js",
"./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js",
"./node_modules/ekko-lightbox/dist/ekko-lightbox.js",
"./node_modules/icheck/icheck.js", //definite problem here :(
"./resources/assets/js/extensions/pGenerator.jquery.js",
"./node_modules/chart.js/dist/Chart.js",
"./resources/assets/js/signature_pad.js",