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

Using glhd/airephp as a form builder instead of laravelcollective/html #183

Merged
merged 4 commits into from
Jan 12, 2024
Merged
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"glhd/aire-bootstrap": "^2.1",
"glhd/conveyor-belt": "*",
"guzzlehttp/guzzle": "^7.0.1",
"hack-greenville/api": "*",
Expand All @@ -22,7 +23,6 @@
"laravel/slack-notification-channel": "^2.4",
"laravel/tinker": "^2.0",
"laravel/ui": "v4.2.2",
"laravelcollective/html": "^6.3",
"livewire/livewire": "^2.12",
"scyllaly/hcaptcha": "^4.4",
"spatie/laravel-data": "*",
Expand Down
211 changes: 137 additions & 74 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 6 additions & 26 deletions resources/views/contact/contact.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,11 @@
<hr class="mx-auto w-100 px-4">
</div>

{!! Form::open(['url' => url()->secure('/contact'), 'class'=> 'px-lg-4']) !!}
<div class="form-group">
{{ Form::label('name', __('Name'), ['class' => 'form-label']) }}
{{ Form::text('name', old('name'), ['class' => 'form-control' . ($errors->has('name') ? ' is-invalid' : null)]) }}
@error('name')
<div class="col-12 mx-1 my-2 alert alert-danger">{{ $message }}</div>
@enderror
</div>
{{ aire()->route('contact.submit') }}

<div class="form-group">
{{ Form::label('contact', __('Email'), ['class' => 'form-label']) }}
{{ Form::email('contact', old('contact'), ['class' => 'form-control' . ($errors->has('contact') ? ' is-invalid' : null)]) }}
@error('contact')
<div class="col-12 mx-1 my-2 alert alert-danger">{{ $message }}</div>
@enderror
</div>

<div class="form-group">
{{ Form::label('message', __('Message'), ['class' => 'form-label']) }}
{{ Form::textarea('message', old('message'), ['class' => 'form-control' . ($errors->has('message') ? ' is-invalid' : null)]) }}
@error('message')
<div class="col-12 mx-1 my-2 alert alert-danger">{{ $message }}</div>
@enderror
</div>
{{ aire()->input('name', 'Name') }}
{{ aire()->email('contact', 'Email') }}
{{ aire()->textArea('message', 'Message') }}

{!! HCaptcha::display(['class' => 'hcaptcha mt-4 text-center']) !!}

Expand All @@ -54,10 +35,9 @@
@enderror

<div class="text-center">
{{ Form::submit('Submit', ['class' => 'my-4 btn btn-outline-secondary ']) }}
{{ aire()->submit() }}
</div>

{!! Form::close() !!}
{{ aire()->close() }}
</div>
</div>
</div>
Expand Down
Loading
Loading