Added offline payment setting migrations.
Added offline payment options to the event customize page
This commit is contained in:
parent
d55cfac990
commit
efcb2ba84e
|
|
@ -224,6 +224,8 @@ class EventCustomizeController extends MyBaseController
|
|||
|
||||
$event->pre_order_display_message = trim($request->get('pre_order_display_message'));
|
||||
$event->post_order_display_message = trim($request->get('post_order_display_message'));
|
||||
$event->offline_payment_instructions = trim($request->get('offline_payment_instructions'));
|
||||
$event->enable_offline_payments = (int) $request->get('enable_offline_payments');
|
||||
$event->save();
|
||||
|
||||
return response()->json([
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddSupportForOfflinePayments extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->boolean('is_payment_received')->default(0);
|
||||
});
|
||||
|
||||
Schema::table('events', function (Blueprint $table) {
|
||||
$table->boolean('enable_offline_payments')->default(0);
|
||||
$table->text('offline_payment_instructions')->nullable();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('orders', function (Blueprint $table) {
|
||||
$table->dropColumn('is_payment_received');
|
||||
});
|
||||
|
||||
Schema::table('events', function (Blueprint $table) {
|
||||
$table->dropColumn('enable_offline_payments');
|
||||
$table->dropColumn('offline_payment_instructions');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -124,6 +124,9 @@
|
|||
|
||||
});
|
||||
|
||||
$('#enable_offline_payments').change(function () {
|
||||
$('.offline_payment_details').toggle(this.checked);
|
||||
}).change();
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -501,6 +504,22 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Offline Payment Settings</h4>
|
||||
<div class="form-group">
|
||||
<div class="custom-checkbox">
|
||||
<input {{ $event->enable_offline_payments ? 'checked="checked"' : '' }} data-toggle="toggle" id="enable_offline_payments" name="enable_offline_payments" type="checkbox" value="1">
|
||||
<label for="enable_offline_payments">Enable Offline Payments</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offline_payment_details" style="display: none;">
|
||||
{!! Form::textarea('offline_payment_instructions', $event->offline_payment_instructions, ['class' => 'form-control']) !!}
|
||||
<div class="help-block">
|
||||
Enter instructions on how attendees can make payment offline.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel-footer mt15 text-right">
|
||||
{!! Form::submit('Save Changes', ['class'=>"btn btn-success"]) !!}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue