+ Homparty Part 1
This commit is contained in:
parent
74923859d1
commit
9252094a04
43 changed files with 2385 additions and 66 deletions
241
resources/views/user/homeparty/detail.blade.php
Normal file
241
resources/views/user/homeparty/detail.blade.php
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-2 mb-2 d-flex justify-content-between align-items-center w-100 ">
|
||||
<div>{{ __('navigation.my_homeparty') }} /
|
||||
@if(!$homeparty->id)
|
||||
anlegen
|
||||
@else
|
||||
{{ __('navigation.manage') }}
|
||||
|
||||
@endif
|
||||
</div>
|
||||
<a href="{{route('user_homepartys')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('user_homeparty_detail', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-party-form-validation']) !!}
|
||||
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
<div class="row">
|
||||
@if(!$homeparty->id)
|
||||
<div class="col-12">
|
||||
Neue Homeparty anlegen
|
||||
</div>
|
||||
@else
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between align-items-center w-100">
|
||||
<div>Homeparty verwalten</div>
|
||||
<div class="float-right">
|
||||
<a href="{{route('user_homeparty_guests', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-md-person-add"></i> Gäste anlegen</a>
|
||||
<a href="{{route('user_homeparty_order', [$homeparty->id])}}" class="btn btn-sm btn-secondary mr-2 mb-1"><i class="ion ion-md-basket"></i> Bestellung</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</h5>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4 {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
<label for="name" class="form-label">{{ __('Veranstaltungsname') }}*</label>
|
||||
{{ Form::text('name', $homeparty->name, array('placeholder'=>__('Veranstaltungsname'), 'class'=>'form-control', 'required')) }}
|
||||
@if ($errors->has('name'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-md-4 {{ $errors->has('date') ? 'has-error' : '' }}">
|
||||
<label for="date" class="form-label">{{ __('Veranstaltungsdatum') }}*</label>
|
||||
{{ Form::text('date', $homeparty->date, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-base', 'required')) }}
|
||||
@if ($errors->has('date'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('date') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-md-4 {{ $errors->has('place') ? 'has-error' : '' }}">
|
||||
<label for="place" class="form-label">{{ __('Veranstaltungsort') }}*</label>
|
||||
{{ Form::text('place', $homeparty->place, array('placeholder'=>__('Veranstaltungsort'), 'class'=>'form-control', 'required')) }}
|
||||
@if ($errors->has('place'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('place') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="description">{{ __('Beschreibung') }}</label>
|
||||
{{ Form::textarea('description', $homeparty->description , array('placeholder'=>__('Beschreibung'), 'class'=>'form-control', 'rows'=>2)) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary mr-2 mb-2" name="action" value="homeparty-party-store">{{ __('speichern') }}</button>
|
||||
<a href="{{route('user_homepartys')}}" class="btn btn-default mb-2">zurück zur Übersicht</a>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@if($homeparty->id)
|
||||
{!! Form::open(['url' => route('user_homeparty_detail', [$homeparty->id]), 'class' => 'form-horizontal', 'id'=>'homeparty-user-form-validation']) !!}
|
||||
<hr>
|
||||
<div class="card mb-4">
|
||||
<div class="col-md-12 px-4 pt-4">
|
||||
<h6 class="mb-4">Lass den Gastgeber seine Daten selber ausfüllen</h6>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-prepend">
|
||||
<button class="btn btn-secondary" type="button" title="Kopiert!" data-clipboard-demo data-clipboard-target="#homeparty_link"><i class="ion ion-ios-copy"></i> Link kopieren</button>
|
||||
</span>
|
||||
<input type="text" class="form-control" name="homeparty_link" value="{{ $homeparty->homeparty_host->getTokenLink() }}" id="homeparty_link" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<p>Teile diesen Link mit dem Gastgeber (z.B. WhatsApp oder SMS), damit gelangt er auf eine Zielseite wo er seine Daten selber ausfüllen kann. Nutze das „Kopier-Symbol“, um den Link gleich in Deine Zwischenablage zu kopieren.</p>
|
||||
<hr>
|
||||
</div>
|
||||
<h5 class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
Gastgeber-, Rechungsadresse
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
|
||||
<span class="d-none d-lg-inline">Lieferadresse</span>
|
||||
</div>
|
||||
</div>
|
||||
</h5>
|
||||
@include('user.homeparty._edit')
|
||||
</div>
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary mr-2 mb-2" name="action" value="homeparty-user-store">{{ __('save') }}</button>
|
||||
<a href="{{route('user_homepartys')}}" class="btn btn-default mb-2">zurück zur Übersicht</a>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
<script type="application/javascript">
|
||||
$( document ).ready(function() {
|
||||
|
||||
// Shipping Address show|hide
|
||||
$("#same_as_billing").on("change", function () {
|
||||
$('#show_shipping_address').slideToggle(200, function () {
|
||||
|
||||
// scroll down to shipping area.
|
||||
if ($('#show_shipping_address').is(":visible")) {
|
||||
_scrollTo('#show_shipping_address', 20);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$.extend( $.validator.messages, {
|
||||
required: "Dieses Feld ist ein Pflichtfeld.",
|
||||
maxlength: $.validator.format( "Geben Sie bitte maximal {0} Zeichen ein." ),
|
||||
minlength: $.validator.format( "Geben Sie bitte mindestens {0} Zeichen ein." ),
|
||||
rangelength: $.validator.format( "Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein." ),
|
||||
email: "Geben Sie bitte eine gültige E-Mail Adresse ein.",
|
||||
url: "Geben Sie bitte eine gültige URL ein.",
|
||||
date: "Bitte geben Sie ein gültiges Datum ein.",
|
||||
number: "Geben Sie bitte eine Nummer ein.",
|
||||
digits: "Geben Sie bitte nur Ziffern ein.",
|
||||
equalTo: "Bitte denselben Wert wiederholen.",
|
||||
range: $.validator.format( "Geben Sie bitte einen Wert zwischen {0} und {1} ein." ),
|
||||
max: $.validator.format( "Geben Sie bitte einen Wert kleiner oder gleich {0} ein." ),
|
||||
min: $.validator.format( "Geben Sie bitte einen Wert größer oder gleich {0} ein." ),
|
||||
creditcard: "Geben Sie bitte eine gültige Kreditkarten-Nummer ein."
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set up validator
|
||||
$('#homeparty-party-form-validation').validate({
|
||||
errorPlacement: function errorPlacement(error, element) {
|
||||
$(element).parents('.form-group').append(
|
||||
error.addClass('invalid-feedback small d-block')
|
||||
)
|
||||
},
|
||||
highlight: function (element) {
|
||||
if ($(element).hasClass('selectpicker')) {
|
||||
$(element).parent().addClass('is-invalid');
|
||||
}
|
||||
$(element).addClass('is-invalid');
|
||||
},
|
||||
unhighlight: function (element) {
|
||||
$(element).removeClass('is-invalid');
|
||||
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
||||
},
|
||||
messages : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
onkeyup: false
|
||||
});
|
||||
|
||||
// Set up validator
|
||||
$('#homeparty-user-form-validation').validate({
|
||||
errorPlacement: function errorPlacement(error, element) {
|
||||
$(element).parents('.form-group').append(
|
||||
error.addClass('invalid-feedback small d-block')
|
||||
)
|
||||
},
|
||||
highlight: function (element) {
|
||||
if ($(element).hasClass('selectpicker')) {
|
||||
$(element).parent().addClass('is-invalid');
|
||||
}
|
||||
$(element).addClass('is-invalid');
|
||||
},
|
||||
unhighlight: function (element) {
|
||||
$(element).removeClass('is-invalid');
|
||||
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
||||
},
|
||||
messages : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
country_id : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
salutation : {
|
||||
required: "{{__('Bitte angeben.')}}",
|
||||
},
|
||||
first_name : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
last_name : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
zipcode : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
address : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
},
|
||||
city : {
|
||||
required: "{{__('This field is required.')}}",
|
||||
}
|
||||
},
|
||||
onkeyup: false
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
var clipboardDemos = new ClipboardJS('[data-clipboard-demo]');
|
||||
clipboardDemos.on('success', function (e) {
|
||||
e.clearSelection();
|
||||
$(e.trigger).tooltip('enable').tooltip('show');
|
||||
});
|
||||
clipboardDemos.on('error', function (e) {
|
||||
console.error('Action:', e.action);
|
||||
console.error('Trigger:', e.trigger);
|
||||
});
|
||||
|
||||
$('button[data-clipboard-demo]').on('mouseout', function () {
|
||||
$(this).tooltip('disable');
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue