Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to spatie/laravel-html #554

Closed
wants to merge 3 commits into from
Closed
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 @@ -26,7 +26,6 @@
"laravel/socialite": "^5.6",
"laravel/tinker": "^2.8",
"laravel/ui": "^4.2",
"laravelcollective/html": "^6.4",
"mailgun/mailgun-php": "^3.5",
"nyholm/psr7": "^1.5",
"owen-it/laravel-auditing": "^13.1",
Expand All @@ -35,7 +34,8 @@
"spatie/laravel-stripe-webhooks": "^3.2",
"stuyam/laravel-phone-validator": "^1.0",
"symfony/http-client": "^6.2",
"symfony/mailgun-mailer": "^6.2"
"symfony/mailgun-mailer": "^6.2",
"spatie/laravel-html": "^3.2"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.8",
Expand Down
36 changes: 15 additions & 21 deletions resources/views/activities/add_group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,50 @@
<section class="section-padding">
<div class="jumbotron text-left">
<h2><strong>Create Group Touchpoint</strong></h2>
{!! Form::open(['url' => 'touchpoint/add_group', 'method' => 'post', 'class' => 'form-horizontal panel']) !!}
{{ html()->form('POST', 'touchpoint/add_group')->class('form-horizontal panel')->open() }}
<span>
<div class='row'>

{!! Form::label('touched_at', 'Date of contact:', ['class' => 'col-md-3']) !!}
{!! Form::text('touched_at',date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())) , ['class' => 'col-md-3']) !!}
{{ html()->label('Date of contact:', 'touched_at')->class('col-md-3') }}
{{ html()->text('touched_at', date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())))->class('col-md-3') }}

</div>
<div class='row'>
{!! Form::label('group_id', 'Name of Group:', ['class' => 'col-md-3']) !!}
{{ html()->label('Name of Group:', 'group_id')->class('col-md-3') }}
@if (isset($defaults['group_id']))
{!! Form::select('group_id', $groups, $defaults['group_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('group_id', $groups, $defaults['group_id'])->class('col-md-3') }}
@else
{!! Form::select('group_id', $groups, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('group_id', $groups)->class('col-md-3') }}
@endif

</div>
<div class='row'>
{!! Form::label('staff_id', 'Contacted by:', ['class' => 'col-md-3']) !!}
{{ html()->label('Contacted by:', 'staff_id')->class('col-md-3') }}
@if (isset($defaults['user_id']))
{!! Form::select('staff_id', $staff, $defaults['user_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff, $defaults['user_id'])->class('col-md-3') }}
@else
{!! Form::select('staff_id', $staff, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff)->class('col-md-3') }}

@endif

</div>

<div class='row'>
{!! Form::label('type', 'Type of Contact:', ['class' => 'col-md-3']) !!}
{!! Form::select('type', [
'Call' => 'Call',
'Email' => 'Email',
'Face' => 'Face to Face',
'Letter' => 'Letter',
'Other' => 'Other',
], NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Type of Contact:', 'type')->class('col-md-3') }}
{{ html()->select('type', ['Call' => 'Call', 'Email' => 'Email', 'Face' => 'Face to Face', 'Letter' => 'Letter', 'Other' => 'Other'])->class('col-md-3') }}

</div>
<div class='row'>
{!! Form::label('notes', 'Notes:', ['class' => 'col-md-3']) !!}
{!! Form::textarea('notes', NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Notes:', 'notes')->class('col-md-3') }}
{{ html()->textarea('notes')->class('col-md-3') }}
</div>

<div class="clearfix"> </div>
<div class="col-md-1">
<div class="form-group">
{!! Form::submit('Add Group Touchpoint', ['class'=>'btn btn-primary']) !!}
{{ html()->submit('Add Group Touchpoint')->class('btn btn-primary') }}
</div>
{!! Form::close() !!}
{{ html()->form()->close() }}
</div>
</span>
</div>
Expand Down
34 changes: 14 additions & 20 deletions resources/views/activities/add_retreat.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,47 @@
<section class="section-padding">
<div class="jumbotron text-left">
<h2><strong>Create Retreat Touchpoint for {{$retreat->title}}</strong></h2>
{!! Form::open(['url' => 'touchpoint/add_retreat', 'method' => 'post', 'class' => 'form-horizontal panel']) !!}
{{ html()->form('POST', 'touchpoint/add_retreat')->class('form-horizontal panel')->open() }}
<span>
<h3>A retreat touchpoint will add a touchpoint to each of the retreat participants.</h3>
<div class='row'>

{!! Form::label('touched_at', 'Date of contact:', ['class' => 'col-md-3']) !!}
{!! Form::text('touched_at',date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())) , ['class' => 'col-md-3']) !!}
{{ html()->label('Date of contact:', 'touched_at')->class('col-md-3') }}
{{ html()->text('touched_at', date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())))->class('col-md-3') }}

</div>
<div class='row'>
{!! Form::label('event_id', 'Name of Retreat:', ['class' => 'col-md-3']) !!}
{!! Form::select('event_id', [$defaults['event_id']=>$defaults['event_description']],$defaults['event_id'], ['class' => 'col-md-3']) !!}
{{ html()->label('Name of Retreat:', 'event_id')->class('col-md-3') }}
{{ html()->select('event_id', [$defaults['event_id'] => $defaults['event_description']], $defaults['event_id'])->class('col-md-3') }}

</div>
<div class='row'>
{!! Form::label('staff_id', 'Contacted by:', ['class' => 'col-md-3']) !!}
{{ html()->label('Contacted by:', 'staff_id')->class('col-md-3') }}
@if (isset($defaults['user_id']))
{!! Form::select('staff_id', $staff, $defaults['user_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff, $defaults['user_id'])->class('col-md-3') }}
@else
{!! Form::select('staff_id', $staff, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff)->class('col-md-3') }}

@endif

</div>

<div class='row'>
{!! Form::label('type', 'Type of Contact:', ['class' => 'col-md-3']) !!}
{!! Form::select('type', [
'Call' => 'Call',
'Email' => 'Email',
'Face' => 'Face to Face',
'Letter' => 'Letter',
'Other' => 'Other',
], NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Type of Contact:', 'type')->class('col-md-3') }}
{{ html()->select('type', ['Call' => 'Call', 'Email' => 'Email', 'Face' => 'Face to Face', 'Letter' => 'Letter', 'Other' => 'Other'])->class('col-md-3') }}

</div>
<div class='row'>
{!! Form::label('notes', 'Notes:', ['class' => 'col-md-3']) !!}
{!! Form::textarea('notes', NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Notes:', 'notes')->class('col-md-3') }}
{{ html()->textarea('notes')->class('col-md-3') }}
</div>

<div class="clearfix"> </div>
<div class="col-md-1">
<div class="form-group">
{!! Form::submit('Add Retreat Touchpoint', ['class'=>'btn btn-primary']) !!}
{{ html()->submit('Add Retreat Touchpoint')->class('btn btn-primary') }}
</div>
{!! Form::close() !!}
{{ html()->form()->close() }}
</div>
</span>
</div>
Expand Down
60 changes: 30 additions & 30 deletions resources/views/activities/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,69 @@
<section class="section-padding">
<div class="jumbotron text-left">
<h2><strong>Create Activity</strong></h2>
{!! Form::open(['url' => 'activity', 'method' => 'post', 'class' => 'form-horizontal panel']) !!}
{{ html()->form('POST', 'activity')->class('form-horizontal panel')->open() }}
<span>
<div class='row'>
{!! Form::label('activity_date_time', 'Date of activity:', ['class' => 'col-md-3']) !!}
{!! Form::text('activity_date_time',date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())) , ['class' => 'col-md-3']) !!}
{{ html()->label('Date of activity:', 'activity_date_time')->class('col-md-3') }}
{{ html()->text('activity_date_time', date('F j, Y g:i A', strtotime(\Carbon\Carbon::now())))->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('activity_type_id', 'Activity type:', ['class' => 'col-md-3']) !!}
{!! Form::select('activity_type_id', $activity_type, NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Activity type:', 'activity_type_id')->class('col-md-3') }}
{{ html()->select('activity_type_id', $activity_type)->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('staff_id', 'Contacted by:', ['class' => 'col-md-3']) !!}
{{ html()->label('Contacted by:', 'staff_id')->class('col-md-3') }}
@if (isset($defaults['user_id']))
{!! Form::select('staff_id', $staff, $defaults['user_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff, $defaults['user_id'])->class('col-md-3') }}
@else
{!! Form::select('staff_id', $staff, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('staff_id', $staff)->class('col-md-3') }}

@endif

</div>
<div class='row'>
{!! Form::label('person_id', 'Name of Contact:', ['class' => 'col-md-3']) !!}
{{ html()->label('Name of Contact:', 'person_id')->class('col-md-3') }}
@if (isset($defaults['contact_id']))
{!! Form::select('person_id', $persons, $defaults['contact_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('person_id', $persons, $defaults['contact_id'])->class('col-md-3') }}
@else
{!! Form::select('person_id', $persons, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('person_id', $persons)->class('col-md-3') }}
@endif

</div>
<div class='row'>
{!! Form::label('subject', 'Subject:', ['class' => 'col-md-3']) !!}
{!! Form::text('subject',null, ['class' => 'col-md-3']) !!}
{{ html()->label('Subject:', 'subject')->class('col-md-3') }}
{{ html()->text('subject')->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('details', 'Details:', ['class' => 'col-md-3']) !!}
{!! Form::textarea('details', NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Details:', 'details')->class('col-md-3') }}
{{ html()->textarea('details')->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('medium_id', 'Activity medium:', ['class' => 'col-md-3']) !!}
{!! Form::select('medium_id', $medium, NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Activity medium:', 'medium_id')->class('col-md-3') }}
{{ html()->select('medium_id', $medium)->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('status_id', 'Activity status:', ['class' => 'col-md-3']) !!}
{!! Form::select('status_id', $status, NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Activity status:', 'status_id')->class('col-md-3') }}
{{ html()->select('status_id', $status)->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('duration', 'Duration (minutes): ', ['class' => 'col-md-3']) !!}
{!! Form::text('duration', null, ['class' => 'col-md-3']) !!}
{{ html()->label('Duration (minutes): ', 'duration')->class('col-md-3') }}
{{ html()->text('duration')->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('priority_id', 'Activity priority:', ['class' => 'col-md-3']) !!}
{!! Form::select('priority_id', array_map('ucfirst',array_flip(config('polanco.priority'))), NULL, ['class' => 'col-md-3']) !!}
{{ html()->label('Activity priority:', 'priority_id')->class('col-md-3') }}
{{ html()->select('priority_id', array_map('ucfirst', array_flip(config('polanco.priority'))))->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('location', 'Location: ', ['class' => 'col-md-3']) !!}
{!! Form::text('location', null, ['class' => 'col-md-3']) !!}
{{ html()->label('Location: ', 'location')->class('col-md-3') }}
{{ html()->text('location')->class('col-md-3') }}
</div>
<div class='row'>
{!! Form::label('created_by', 'Created by:', ['class' => 'col-md-3']) !!}
{{ html()->label('Created by:', 'created_by')->class('col-md-3') }}
@if (isset($defaults['user_id']))
{!! Form::select('created_by', $staff, $defaults['user_id'], ['class' => 'col-md-3']) !!}
{{ html()->select('created_by', $staff, $defaults['user_id'])->class('col-md-3') }}
@else
{!! Form::select('created_by', $staff, NULL, ['class' => 'col-md-3']) !!}
{{ html()->select('created_by', $staff)->class('col-md-3') }}

@endif

Expand All @@ -75,9 +75,9 @@
<div class="clearfix"> </div>
<div class="col-md-1">
<div class="form-group">
{!! Form::submit('Add Activity', ['class'=>'btn btn-primary']) !!}
{{ html()->submit('Add Activity')->class('btn btn-primary') }}
</div>
{!! Form::close() !!}
{{ html()->form()->close() }}
</div>
<div class="clearfix"> </div>
</span>
Expand Down
Loading