Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"laravel/framework": "^11.51",
"laravel/tinker": "^2.9",
"laravel/ui": "^4.4",
"laravelcollective/html": "^6.4",
"league/flysystem-aws-s3-v3": "^3.0",
"mcamara/laravel-localization": "2.3.0",
"phpoffice/phpspreadsheet": "^1.15",
"predis/predis": "^2.2",
"santigarcor/laratrust": "^8.3",
"tray-labs/laravel-influxdb": "1.0.12"
"tray-labs/laravel-influxdb": "1.0.12",
"spatie/laravel-html": "^3.11"
},
"require-dev": {
"appzcoder/crud-generator": "^4.0",
Expand Down
2 changes: 0 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
'webapp_url' => env('WEBAPP_URL', null),

'aliases' => Facade::defaultAliases()->merge([
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
'Influx' => TrayLabs\InfluxDB\Facades\InfluxDB::class,
'InterventionImage' => Intervention\Image\Facades\Image::class,
'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class,
Expand Down
4 changes: 2 additions & 2 deletions resources/views/alert-rule-formula/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('alert_rule_id') ? 'has-error' : ''}}">
<label for="alert_rule_id" control-label>{{ 'AlertRuleFormula' }}</label>
<div>
{!! Form::select('alert_rule_id', App\Models\AlertRule::selectList(), e($alertruleformula->alert_rule_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('beep.AlertRuleFormula')]),'class' => 'form-control select2')) !!}
{{ html()->select('alert_rule_id', App\Models\AlertRule::selectList(), e($alertruleformula->alert_rule_id ?? null))->placeholder(__('crud.select', ['item' => __('beep.AlertRuleFormula')]))->class('form-control select2') }}
{!! $errors->first('alert_rule_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -11,7 +11,7 @@
<div class="form-group {{ $errors->has('measurement_id') ? 'has-error' : ''}}">
<label for="measurement_id" control-label>{{ 'Measurement' }}</label>
<div>
{!! Form::select('measurement_id', App\Measurement::selectList(), e($alertruleformula->measurement_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.measurement')]),'class' => 'form-control select2')) !!}
{{ html()->select('measurement_id', App\Measurement::selectList(), e($alertruleformula->measurement_id ?? null))->placeholder(__('crud.select', ['item' => __('general.measurement')]))->class('form-control select2') }}
{!! $errors->first('measurement_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/alert-rule/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<div class="form-group {{ $errors->has('measurement_id') ? 'has-error' : ''}}">
<label for="measurement_id" control-label>{{ 'Measurement Id' }}</label>
<div>
{!! Form::select('measurement_id', App\Measurement::selectList(), e($alertrule->measurement_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.measurement')]),'class' => 'form-control select2')) !!}
{{ html()->select('measurement_id', App\Measurement::selectList(), e($alertrule->measurement_id ?? null))->placeholder(__('crud.select', ['item' => __('general.measurement')]))->class('form-control select2') }}
{!! $errors->first('measurement_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down Expand Up @@ -155,7 +155,7 @@
<div class="form-group {{ $errors->has('exclude_months') ? 'has-error' : ''}}">
<label for="exclude_months" control-label>{{ 'Exclude Months' }}</label>
<div>
{!! Form::select('exclude_months[]', App\Models\AlertRule::$exclude_months, isset($alertrule->exclude_months) ? $alertrule->getExcludeMonthsAttribute() : null, array('class' => 'form-control select2', 'multiple')) !!}
{{ html()->multiselect('exclude_months[]', App\Models\AlertRule::$exclude_months, isset($alertrule->exclude_months) ? $alertrule->getExcludeMonthsAttribute() : null)->class('form-control select2') }}
{!! $errors->first('exclude_months', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -164,7 +164,7 @@
<div class="form-group {{ $errors->has('exclude_hours') ? 'has-error' : ''}}">
<label for="exclude_hours" control-label>{{ 'Exclude Hours' }}</label>
<div>
{!! Form::select('exclude_hours[]', App\Models\AlertRule::$exclude_hours, isset($alertrule->exclude_hours) ? $alertrule->getExcludeHoursAttribute() : null, array('class' => 'form-control select2', 'multiple')) !!}
{{ html()->multiselect('exclude_hours[]', App\Models\AlertRule::$exclude_hours, isset($alertrule->exclude_hours) ? $alertrule->getExcludeHoursAttribute() : null)->class('form-control select2') }}
{!! $errors->first('exclude_hours', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -173,7 +173,7 @@
<div class="form-group {{ $errors->has('exclude_hive_ids') ? 'has-error' : ''}}">
<label for="exclude_hive_ids" control-label>{{ 'Exclude Hives' }}</label>
<div>
{!! Form::select('exclude_hive_ids[]', App\Hive::selectList(true), isset($alertrule->exclude_hive_ids) ? $alertrule->getExcludeHiveIdsAttribute() : null, array('class' => 'form-control select2', 'multiple')) !!}
{{ html()->multiselect('exclude_hive_ids[]', App\Hive::selectList(true), isset($alertrule->exclude_hive_ids) ? $alertrule->getExcludeHiveIdsAttribute() : null)->class('form-control select2') }}
{!! $errors->first('exclude_hive_ids', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -193,7 +193,7 @@
<div class="form-group {{ $errors->has('user_id') ? 'has-error' : ''}}">
<label for="user_id" control-label>{{ 'User Id' }}</label>
<div>
{!! Form::select('user_id', App\User::selectList(), e($alertrule->user_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.user')]),'class' => 'form-control select2')) !!}
{{ html()->select('user_id', App\User::selectList(), e($alertrule->user_id ?? null))->placeholder(__('crud.select', ['item' => __('general.user')]))->class('form-control select2') }}
{!! $errors->first('user_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/alert-rule/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@extends('layouts.app')

@section('page-title') {{ __('crud.management', ['item'=>__('beep.AlertRule')]) }}
{!! Form::open(['method' => 'GET', 'route' => 'alert-rule.index', 'class' => 'form-inline', 'role' => 'search', 'style'=>'display: inline-block;']) !!}
{{ html()->form('GET', route('alert-rule.index'))->class('form-inline')->attribute('role', 'search')->style('display: inline-block;')->open() }}
<div class="input-group" style="display: inline-block;">
<input type="text" class="form-control" style="max-width: 100px;" name="rule_id" placeholder="Rule ID" value="{{ $rule_id }}">
<span class="input-group-btn">
Expand All @@ -15,7 +15,7 @@
</span>
</div> --}}
<div class="input-group" style="display: inline-block; font-size:16px;">
{!! Form::select('user_id', $users, $user_id, array('class' => 'form-control select2', 'placeholder'=>'Select user...', 'onchange'=>'this.form.submit()')) !!}
{{ html()->select('user_id', $users, $user_id)->class('form-control select2')->placeholder('Select user...')->attribute('onchange', 'this.form.submit()') }}
{!! $errors->first('user_id', '<p class="help-block">:message</p>') !!}
</div>
<div style="display: inline-block;">
Expand All @@ -24,7 +24,7 @@
<div style="display: inline-block;">
<input type="checkbox" style="min-width: 10px;" name="default_rule" value="1" onchange="this.form.submit();" @if($default_rule) checked @endif> <span style="font-size:16px;">Default</span></input>
</div>
{!! Form::close() !!}
{{ html()->form()->close() }}
@endsection

@section('content')
Expand Down
10 changes: 5 additions & 5 deletions resources/views/alert/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="form-group {{ $errors->has('alert_rule_id') ? 'has-error' : ''}}">
<label for="alert_rule_id" control-label>{{ 'Alert Rule Id' }}</label>
<div>
{!! Form::select('alert_rule_id', App\Models\AlertRule::selectList(), e($alert->alert_rule_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.alert_rule')]),'class' => 'form-control select2')) !!}
{{ html()->select('alert_rule_id', App\Models\AlertRule::selectList(), e($alert->alert_rule_id ?? null))->placeholder(__('crud.select', ['item' => __('general.alert_rule')]))->class('form-control select2') }}
{!! $errors->first('alert_rule_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -29,7 +29,7 @@
<div class="form-group {{ $errors->has('measurement_id') ? 'has-error' : ''}}">
<label for="measurement_id" control-label>{{ 'Measurement Id' }}</label>
<div>
{!! Form::select('measurement_id', App\Measurement::selectList(), e($alert->measurement_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.measurement')]),'class' => 'form-control select2')) !!}
{{ html()->select('measurement_id', App\Measurement::selectList(), e($alert->measurement_id ?? null))->placeholder(__('crud.select', ['item' => __('general.measurement')]))->class('form-control select2') }}
{!! $errors->first('measurement_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down Expand Up @@ -79,7 +79,7 @@
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : ''}}">
<label for="location_id" control-label>{{ 'Location Id' }}</label>
<div>
{!! Form::select('location_id', App\Location::selectList(), e($alert->location_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.location')]),'class' => 'form-control select2')) !!}
{{ html()->select('location_id', App\Location::selectList(), e($alert->location_id ?? null))->placeholder(__('crud.select', ['item' => __('general.location')]))->class('form-control select2') }}
{!! $errors->first('location_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -97,7 +97,7 @@
<div class="form-group {{ $errors->has('device_id') ? 'has-error' : ''}}">
<label for="device_id" control-label>{{ 'Device Id' }}</label>
<div>
{!! Form::select('device_id', App\Device::selectList(), e($alert->device_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.device')]),'class' => 'form-control select2')) !!}
{{ html()->select('device_id', App\Device::selectList(), e($alert->device_id ?? null))->placeholder(__('crud.select', ['item' => __('general.device')]))->class('form-control select2') }}
{!! $errors->first('device_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -106,7 +106,7 @@
<div class="form-group {{ $errors->has('user_id') ? 'has-error' : ''}}">
<label for="user_id" control-label>{{ 'User Id' }}</label>
<div>
{!! Form::select('user_id', App\User::selectList(), e($alert->user_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.user')]),'class' => 'form-control select2')) !!}
{{ html()->select('user_id', App\User::selectList(), e($alert->user_id ?? null))->placeholder(__('crud.select', ['item' => __('general.user')]))->class('form-control select2') }}
{!! $errors->first('user_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/alert/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@extends('layouts.app')

@section('page-title') {{ __('crud.management', ['item'=>__('beep.Alert')]) }}
{!! Form::open(['method' => 'GET', 'route' => 'alert.index', 'class' => 'form-inline', 'role' => 'search', 'style'=>'display: inline-block;']) !!}
{{ html()->form('GET', route('alert.index'))->class('form-inline')->attribute('role', 'search')->style('display: inline-block;')->open() }}
<div class="input-group" style="display: inline-block;">
<input type="text" class="form-control" style="max-width: 100px;" name="rule_id" placeholder="Alert Rule ID" value="{{ $rule_id }}">
<span class="input-group-btn">
Expand All @@ -15,13 +15,13 @@
</span>
</div>
<div class="input-group" style="display: inline-block; font-size:16px;">
{!! Form::select('user_id', $users, $user_id, array('class' => 'form-control select2', 'placeholder'=>'Select user...', 'onchange'=>'this.form.submit()')) !!}
{{ html()->select('user_id', $users, $user_id)->class('form-control select2')->placeholder('Select user...')->attribute('onchange', 'this.form.submit()') }}
{!! $errors->first('user_id', '<p class="help-block">:message</p>') !!}
</div>
<div style="display: inline-block;">
<input type="checkbox" style="min-width: 10px;" name="no_measurements" value="1" onchange="this.form.submit();" @if($no_meas) checked @endif> <span style="font-size:16px;">No measurements</span></input>
</div>
{!! Form::close() !!}
{{ html()->form()->close() }}
@endsection

@section('content')
Expand Down
6 changes: 3 additions & 3 deletions resources/views/calculation-model/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="form-group {{ $errors->has('data_measurement_id') ? 'has-error' : ''}}">
<label for="data_measurement_id" control-label>{{ 'IN: Data Measurement' }}</label>
<div>
{!! Form::select('data_measurement_id', App\Measurement::selectList(), e($calculationmodel->data_measurement_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.measurement')]),'class' => 'form-control select2')) !!}
{{ html()->select('data_measurement_id', App\Measurement::selectList(), e($calculationmodel->data_measurement_id ?? null))->placeholder(__('crud.select', ['item' => __('general.measurement')]))->class('form-control select2') }}
{!! $errors->first('data_measurement_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand All @@ -20,7 +20,7 @@
<div class="form-group {{ $errors->has('measurement_id') ? 'has-error' : ''}}">
<label for="measurement_id" control-label>{{ 'OUT: Output Measurement' }}</label>
<div>
{!! Form::select('measurement_id', App\Measurement::selectList(), e($calculationmodel->measurement_id ?? null), array('placeholder'=>__('crud.select', ['item'=>__('general.measurement')]),'class' => 'form-control select2')) !!}
{{ html()->select('measurement_id', App\Measurement::selectList(), e($calculationmodel->measurement_id ?? null))->placeholder(__('crud.select', ['item' => __('general.measurement')]))->class('form-control select2') }}
{!! $errors->first('measurement_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down Expand Up @@ -107,7 +107,7 @@
<label for="calculation" control-label>{{ 'Calculation type' }}</label>
<div>
<div>
{!! Form::select('calculation', App\Models\CalculationModel::$calculations, e($calculationmodel->calculation ?? null), array('placeholder'=>__('crud.select', ['item'=>'Calculation type']),'class' => 'form-control select2')) !!}
{{ html()->select('calculation', App\Models\CalculationModel::$calculations, e($calculationmodel->calculation ?? null))->placeholder(__('crud.select', ['item' => 'Calculation type']))->class('form-control select2') }}
{!! $errors->first('calculation', '<p class="help-block">:message</p>') !!}
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/categories/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
@overwrite

@section('body')
{!! Form::model($data, [ 'route' => 'categories.store' ]) !!}
{{ html()->modelForm($data, 'POST', route('categories.store'))->open() }}
@include('categories.partials.form')
<br>
<div class="form-group">
{!! Form::submit('Create', [ 'class' => 'btn btn-primary btn-block' ]) !!}
{{ html()->input('submit')->value('Create')->class('btn btn-primary btn-block') }}
</div>
{!! Form::close() !!}
{{ html()->closeModelForm() }}
@overwrite
6 changes: 3 additions & 3 deletions resources/views/categories/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
@overwrite

@section('body')
{!! Form::model($category, [ 'route' => [ 'categories.update', $category->getKey() ], 'method' => 'PATCH' ]) !!}
{{ html()->modelForm($category, 'PATCH', route('categories.update', $category->getKey()))->open() }}

@include('categories.partials.form')

<div class="form-group">
{!! Form::submit('Save', [ 'class' => 'btn btn-primary' ]) !!}
{{ html()->input('submit')->value('Save')->class('btn btn-primary') }}
</div>
{!! Form::close() !!}
{{ html()->closeModelForm() }}
@overwrite
Loading