checkout, register, payment,
checkout correction, register wizard, payment packege,
This commit is contained in:
parent
6e3adac4d7
commit
446bc4561b
48 changed files with 2580 additions and 1493 deletions
1348
.idea/workspace.xml
generated
1348
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\SfGuardUser;
|
use App\Models\ShoppingPayment;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Auth;
|
use Auth;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
@ -69,7 +69,7 @@ class HomeController extends Controller
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkLogin($identify, $token)
|
/* public function checkLogin($identify, $token)
|
||||||
{
|
{
|
||||||
if($identify){
|
if($identify){
|
||||||
//user find by $identify
|
//user find by $identify
|
||||||
|
|
@ -110,6 +110,7 @@ class HomeController extends Controller
|
||||||
}
|
}
|
||||||
return abort(404);
|
return abort(404);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public function legalDataProtected()
|
public function legalDataProtected()
|
||||||
{
|
{
|
||||||
|
|
@ -131,7 +132,9 @@ class HomeController extends Controller
|
||||||
if ( ! $user)
|
if ( ! $user)
|
||||||
{
|
{
|
||||||
|
|
||||||
return redirect('/status/not/found');
|
// return redirect('/status/not/found');
|
||||||
|
return redirect('/home');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->confirmed = 1;
|
$user->confirmed = 1;
|
||||||
|
|
@ -144,7 +147,7 @@ class HomeController extends Controller
|
||||||
//Login!
|
//Login!
|
||||||
Auth::login($user);
|
Auth::login($user);
|
||||||
|
|
||||||
return redirect('/status/verify');
|
return redirect('/home');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function statusRegister(){
|
public function statusRegister(){
|
||||||
|
|
@ -177,7 +180,27 @@ class HomeController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return json_encode(true);
|
return json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function blocked()
|
||||||
|
{
|
||||||
|
return view('status.user_blocked');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function backToShop($reference = ""){
|
||||||
|
|
||||||
|
if($reference){
|
||||||
|
$ShoppingPayment = ShoppingPayment::where('reference', $reference)->first();
|
||||||
|
if($ShoppingPayment->status == 'success'){
|
||||||
|
$user = Auth::user();
|
||||||
|
$user->wizard = 4;
|
||||||
|
$user->save();
|
||||||
|
return redirect(route('wizard', [4]));
|
||||||
|
}else{
|
||||||
|
\Session()->flash('alert-error', "Es ist ein Fehler bei der Bestellung aufgetreten");
|
||||||
|
return redirect(route('wizard'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@ class LeadController extends Controller
|
||||||
if($id == "new"){
|
if($id == "new"){
|
||||||
$user = new User();
|
$user = new User();
|
||||||
$user->account = new UserAccount();
|
$user->account = new UserAccount();
|
||||||
|
$user->account->same_as_billing = 1;
|
||||||
|
$user->account->country_id = 1;
|
||||||
|
$user->account->shipping_country_id = 1;
|
||||||
|
$user->id = "new";
|
||||||
}else{
|
}else{
|
||||||
$user = User::findOrFail($id);
|
$user = User::findOrFail($id);
|
||||||
if(!$user->account){
|
if(!$user->account){
|
||||||
|
|
@ -66,52 +70,66 @@ class LeadController extends Controller
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$data = Input::all();
|
|
||||||
|
|
||||||
if ($data['user_id'] == "new") {
|
$data = Input::all();
|
||||||
$user = new User();
|
if ($data['user_id'] == "new" || $data['user_id'] == 0) {
|
||||||
$user->id = "new";
|
|
||||||
$user->account = new UserAccount();
|
|
||||||
$user->account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : 0;
|
|
||||||
$user->account->salutation = isset($data['salutation']) ? $data['salutation'] : 0;
|
|
||||||
$rules = array(
|
$rules = array(
|
||||||
'salutation' => 'required',
|
'salutation' => 'required',
|
||||||
'last_name' => 'required|max:255',
|
'first_name'=>'required',
|
||||||
'country_id' => 'required|integer|min:1',
|
'last_name'=>'required',
|
||||||
'email' => 'required|string|email|max:255|unique:users',
|
'email' => 'required|string|email|max:255|unique:users',
|
||||||
'email-confirm' => 'required|same:email',
|
'email-confirm' => 'required|same:email',
|
||||||
);
|
);
|
||||||
|
}else{
|
||||||
} else {
|
|
||||||
$user = User::findOrFail($data['user_id']);
|
|
||||||
if(!$user->account){
|
|
||||||
$user->account = new UserAccount();
|
|
||||||
}
|
|
||||||
$rules = array(
|
$rules = array(
|
||||||
'salutation' => 'required',
|
'salutation' => 'required',
|
||||||
'last_name' => 'required|max:255',
|
'first_name'=>'required',
|
||||||
'country_id' => 'required|integer|min:1',
|
'last_name'=>'required',
|
||||||
|
'address'=>'required',
|
||||||
|
'zipcode'=>'required',
|
||||||
|
'city' => 'required',
|
||||||
'email' => 'required|string|email|max:255|exists:users,email',
|
'email' => 'required|string|email|max:255|exists:users,email',
|
||||||
'email-confirm' => 'required|same:email',
|
'email-confirm' => 'required|same:email',
|
||||||
);
|
);
|
||||||
|
if(!Input::get('same_as_billing')){
|
||||||
|
$rules = array_merge($rules, [
|
||||||
|
'shipping_firstname'=>'required',
|
||||||
|
'shipping_lastname'=>'required',
|
||||||
|
'shipping_address'=>'required',
|
||||||
|
'shipping_zipcode'=>'required',
|
||||||
|
'shipping_city' => 'required',
|
||||||
|
'shipping_salutation' => 'required'
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Input::get('company') == 1){
|
|
||||||
$rules['company_name'] = 'required|max:255';
|
|
||||||
$rules['company_country_id'] = 'required|integer|min:1';
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = [
|
|
||||||
'user' => $user,
|
|
||||||
];
|
|
||||||
$validator = Validator::make(Input::all(), $rules);
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return view('admin.lead_edit', $data)->withErrors($validator);
|
|
||||||
|
|
||||||
} else {
|
if ($data['user_id'] == "new" || $data['user_id'] == 0) {
|
||||||
$data = Input::all();
|
$user_id = "new";
|
||||||
$this->userRepo->update(Input::all());
|
}else{
|
||||||
|
$user = User::findOrFail($data['user_id']);
|
||||||
|
$user_id = $user->id;
|
||||||
|
}
|
||||||
|
return redirect(route('admin_lead_edit', [$user_id]))->withErrors($validator)->withInput(Input::all());
|
||||||
|
}else{
|
||||||
|
|
||||||
|
if ($data['user_id'] == "new" || $data['user_id'] == 0) {
|
||||||
|
$user = new User();
|
||||||
|
$user->id = "new";
|
||||||
|
$user->account = new UserAccount();
|
||||||
|
|
||||||
|
}else {
|
||||||
|
$user = User::findOrFail($data['user_id']);
|
||||||
|
if(!$user->account){
|
||||||
|
$user->account = new UserAccount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->userRepo->update($data);
|
||||||
|
|
||||||
if(isset($data['contact_verify'])){
|
if(isset($data['contact_verify'])){
|
||||||
|
|
||||||
|
|
@ -135,7 +153,12 @@ class LeadController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
\Session()->flash('alert-save', true);
|
\Session()->flash('alert-save', true);
|
||||||
return redirect('/admin/leads');
|
return redirect(route('admin_leads'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11,6 +11,7 @@ use App\Models\ShoppingOrder;
|
||||||
use App\Models\ShoppingOrderItem;
|
use App\Models\ShoppingOrderItem;
|
||||||
use App\Models\ShoppingPayment;
|
use App\Models\ShoppingPayment;
|
||||||
use App\Models\ShoppingUser;
|
use App\Models\ShoppingUser;
|
||||||
|
use App\User;
|
||||||
use Illuminate\Session\SessionManager;
|
use Illuminate\Session\SessionManager;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
|
@ -37,7 +38,7 @@ class CheckoutController extends Controller
|
||||||
|
|
||||||
public function checkout(){
|
public function checkout(){
|
||||||
|
|
||||||
$user_shop = Util::getUserShop();
|
// $user_shop = Util::getUserShop();
|
||||||
|
|
||||||
if(Input::get('selected_country')){
|
if(Input::get('selected_country')){
|
||||||
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
|
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
|
||||||
|
|
@ -46,7 +47,42 @@ class CheckoutController extends Controller
|
||||||
// $selected_country = $ShippingCountry->id;
|
// $selected_country = $ShippingCountry->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id'));
|
if(!$this->getPayments('shopping_user_id') && Util::getAuthUser()){
|
||||||
|
|
||||||
|
$user = Util::getAuthUser();
|
||||||
|
$user->email;
|
||||||
|
$account = $user->account;
|
||||||
|
$shopping_user = new ShoppingUser();
|
||||||
|
$shopping_user->auth_user_id = $user->id;
|
||||||
|
$shopping_user->billing_salutation = $user->account->salutation;
|
||||||
|
$shopping_user->billing_company = $user->account->company;
|
||||||
|
$shopping_user->billing_firstname = $user->account->first_name;
|
||||||
|
$shopping_user->billing_lastname = $user->account->last_name;
|
||||||
|
$shopping_user->billing_address = $user->account->address;
|
||||||
|
$shopping_user->billing_address_2 = $user->account->address_2;
|
||||||
|
$shopping_user->billing_zipcode = $user->account->zipcode;
|
||||||
|
$shopping_user->billing_city = $user->account->city;
|
||||||
|
$shopping_user->billing_country_id = $user->account->country_id;
|
||||||
|
$shopping_user->billing_phone = $user->account->phone;
|
||||||
|
$shopping_user->billing_email = $user->email;
|
||||||
|
$shopping_user->accepted_data_checkbox = 1;
|
||||||
|
$shopping_user->same_as_billing = $user->account->same_as_billing;
|
||||||
|
$shopping_user->shipping_salutation = $user->account->shipping_salutation;
|
||||||
|
$shopping_user->shipping_company = $user->account->shipping_company;
|
||||||
|
$shopping_user->shipping_firstname = $user->account->shipping_firstname;
|
||||||
|
$shopping_user->shipping_lastname = $user->account->shipping_lastname;
|
||||||
|
$shopping_user->shipping_address = $user->account->shipping_address;
|
||||||
|
$shopping_user->shipping_address_2 = $user->account->shipping_address_2;
|
||||||
|
$shopping_user->shipping_zipcode = $user->account->shipping_zipcode;
|
||||||
|
$shopping_user->shipping_city = $user->account->shipping_city;
|
||||||
|
$shopping_user->shipping_country_id = $user->account->shipping_country_id;
|
||||||
|
$shopping_user->shipping_phone = $user->account->shipping_phone;
|
||||||
|
$shopping_user->save();
|
||||||
|
$this->putPayments('shopping_user_id', $shopping_user->id);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$shopping_user = ShoppingUser::findOrNew($this->getPayments('shopping_user_id'));
|
||||||
|
}
|
||||||
if($shopping_user->same_as_billing === NULL){
|
if($shopping_user->same_as_billing === NULL){
|
||||||
$shopping_user->same_as_billing = true;
|
$shopping_user->same_as_billing = true;
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +95,7 @@ class CheckoutController extends Controller
|
||||||
|
|
||||||
public function checkoutFinal(){
|
public function checkoutFinal(){
|
||||||
|
|
||||||
/*
|
|
||||||
$rules = array(
|
$rules = array(
|
||||||
'billing_salutation' => 'required',
|
'billing_salutation' => 'required',
|
||||||
'billing_firstname'=>'required',
|
'billing_firstname'=>'required',
|
||||||
|
|
@ -86,7 +122,7 @@ class CheckoutController extends Controller
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return back()->withErrors($validator)->withErrors($validator)->withInput(Input::all());
|
return back()->withErrors($validator)->withErrors($validator)->withInput(Input::all());
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
$data = Input::all();
|
$data = Input::all();
|
||||||
//make User
|
//make User
|
||||||
|
|
@ -203,15 +239,16 @@ class CheckoutController extends Controller
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
||||||
'txaction' => 'appointed',
|
'txaction' => 'paid',
|
||||||
'clearingtype' => 'vor',
|
'clearingtype' => 'wlt',
|
||||||
'userid' => '157787236',
|
'userid' => '158006846',
|
||||||
'txid' => '319655873',
|
'txid' => '320267294',
|
||||||
'price' => '13.80',
|
'price' => '59.00',
|
||||||
'param' => '6', //$this->shopping_order->id,
|
'param' => '18', //$this->shopping_order->id,
|
||||||
'reference' => '15c76c0d470cf9',
|
'reference' => '15c79ba77992e2',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
|
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
|
||||||
\Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
|
\Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
|
||||||
abort(404);
|
abort(404);
|
||||||
|
|
@ -274,6 +311,28 @@ class CheckoutController extends Controller
|
||||||
if($data['txaction'] == 'paid'){
|
if($data['txaction'] == 'paid'){
|
||||||
$shopping_order->paid = true;
|
$shopping_order->paid = true;
|
||||||
$shopping_order->save();
|
$shopping_order->save();
|
||||||
|
//if product has actions
|
||||||
|
if($shopping_order->shopping_order_items && $shopping_order->auth_user_id){
|
||||||
|
foreach($shopping_order->shopping_order_items as $shopping_order_item){
|
||||||
|
if($shopping_order_item->product){
|
||||||
|
if($shopping_order_item->product->action){
|
||||||
|
|
||||||
|
$user = User::findOrFail($shopping_order->auth_user_id);
|
||||||
|
foreach ($shopping_order_item->product->action as $do){
|
||||||
|
if($shopping_order_item->product->getActionName($do) == 'payment_for_account'){
|
||||||
|
$user->payment_account = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||||
|
$user->wizard = 10;
|
||||||
|
}
|
||||||
|
if($shopping_order_item->product->getActionName($do) == 'payment_for_shop'){
|
||||||
|
$user->payment_shop = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||||
|
$user->wizard = 10;
|
||||||
|
}
|
||||||
|
$user->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($data['txaction'] == 'appointed'){
|
if($data['txaction'] == 'appointed'){
|
||||||
|
|
@ -321,6 +380,7 @@ class CheckoutController extends Controller
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'shopping_user_id' => $shopping_user->id,
|
'shopping_user_id' => $shopping_user->id,
|
||||||
|
'auth_user_id' => $shopping_user->auth_user_id,
|
||||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||||
'user_shop_id' => $user_shop->id,
|
'user_shop_id' => $user_shop->id,
|
||||||
'total' => Yard::instance('shopping')->total(2, '.', ','),
|
'total' => Yard::instance('shopping')->total(2, '.', ','),
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ class SiteController extends Controller
|
||||||
$products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam'];
|
$products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam'];
|
||||||
$set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set'];
|
$set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set'];
|
||||||
$data = [
|
$data = [
|
||||||
'products' => Product::whereIn('slug', $products)->get(),
|
'products' => Product::whereIn('slug', $products)->where('active', true)->where('show_at', '<=', 1)->get(),
|
||||||
'set_products' => Product::whereIn('slug', $set_products)->get(),
|
'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->where('show_at', '<=', 1)->get(),
|
||||||
'user_shop' => Util::getUserShop(),
|
'user_shop' => Util::getUserShop(),
|
||||||
];
|
];
|
||||||
return view('web.index', $data);
|
return view('web.index', $data);
|
||||||
|
|
@ -36,12 +36,12 @@ class SiteController extends Controller
|
||||||
public function site($site, $subsite = false, $product_slug = false)
|
public function site($site, $subsite = false, $product_slug = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
$subsite = trim($subsite, '/');
|
$subsite = trim($subsite, '/');
|
||||||
$product_slug = trim($product_slug, '/');
|
$product_slug = trim($product_slug, '/');
|
||||||
if($product_slug){
|
if($product_slug){
|
||||||
|
|
||||||
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
||||||
$product = Product::where('slug', $product_slug)->where('active', true)->first();
|
$product = Product::where('slug', $product_slug)->where('active', true)->where('show_at', '<=', 1)->first();
|
||||||
if ($category && $product) {
|
if ($category && $product) {
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|
@ -49,7 +49,7 @@ class SiteController extends Controller
|
||||||
'subsite' => $subsite,
|
'subsite' => $subsite,
|
||||||
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'p_count' => Product::where('active', true)->count(),
|
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||||
|
|
||||||
];
|
];
|
||||||
return view('web.templates.produkte-show', $data);
|
return view('web.templates.produkte-show', $data);
|
||||||
|
|
@ -57,7 +57,6 @@ class SiteController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if($site == 'produkte'){
|
if($site == 'produkte'){
|
||||||
|
|
||||||
if($subsite || $subsite != 'alle-produkte') {
|
if($subsite || $subsite != 'alle-produkte') {
|
||||||
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
||||||
if ($category) {
|
if ($category) {
|
||||||
|
|
@ -68,8 +67,8 @@ class SiteController extends Controller
|
||||||
'products' => Product::whereHas('categories', function ($query) use ($category) {
|
'products' => Product::whereHas('categories', function ($query) use ($category) {
|
||||||
$query->where('category_id', '=', $category->id);
|
$query->where('category_id', '=', $category->id);
|
||||||
|
|
||||||
})->where('active', true)->orderBy('pos', 'DESC')->get(),
|
})->where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'DESC')->get(),
|
||||||
'p_count' => Product::where('active', true)->count(),
|
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||||
|
|
||||||
];
|
];
|
||||||
return view('web.templates.' . $site, $data);
|
return view('web.templates.' . $site, $data);
|
||||||
|
|
@ -80,8 +79,8 @@ class SiteController extends Controller
|
||||||
'user_shop' => Util::getUserShop(),
|
'user_shop' => Util::getUserShop(),
|
||||||
'subsite' => 'alle-produkte',
|
'subsite' => 'alle-produkte',
|
||||||
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||||
'products' => Product::where('active', true)->orderBy('pos', 'ASC')->get(),
|
'products' => Product::where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'ASC')->get(),
|
||||||
'p_count' => Product::where('active', true)->count(),
|
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||||
];
|
];
|
||||||
return view('web.templates.'.$site, $data);
|
return view('web.templates.'.$site, $data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
199
app/Http/Controllers/WizardController.php
Executable file
199
app/Http/Controllers/WizardController.php
Executable file
|
|
@ -0,0 +1,199 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\ShoppingInstance;
|
||||||
|
use App\Models\UserAccount;
|
||||||
|
use App\Services\Util;
|
||||||
|
use Auth;
|
||||||
|
use Hash;
|
||||||
|
use Input;
|
||||||
|
use Validator;
|
||||||
|
use Yard;
|
||||||
|
|
||||||
|
class WizardController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function show($step = 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!Auth::check()){
|
||||||
|
return redirect('login');
|
||||||
|
}
|
||||||
|
$user = Auth::user();
|
||||||
|
if(!$user->account){
|
||||||
|
$account = UserAccount::create([]);
|
||||||
|
$user->account_id = $account->id;
|
||||||
|
$user->save();
|
||||||
|
return redirect(route('wizard'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$step = (!$user->wizard ? 0 : $user->wizard );
|
||||||
|
if($step == 10){
|
||||||
|
return redirect('/');
|
||||||
|
}
|
||||||
|
$data = [
|
||||||
|
'user' => Auth::user(),
|
||||||
|
'step' => $step,
|
||||||
|
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('user.wizard.show', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function store($step = 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!Auth::check()){
|
||||||
|
return redirect('login');
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = Auth::user();
|
||||||
|
if(!$user->account){
|
||||||
|
$user->account = new UserAccount();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($step == 0){
|
||||||
|
$rules = array(
|
||||||
|
'accepted_data_protection' => 'required',
|
||||||
|
'accepted_active' => 'required',
|
||||||
|
);
|
||||||
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
$data = [
|
||||||
|
'user' => Auth::user(),
|
||||||
|
'step' => $step,
|
||||||
|
];
|
||||||
|
return view('user.wizard.show', $data)->withErrors($validator);
|
||||||
|
}
|
||||||
|
$account = $user->account;
|
||||||
|
$account->data_protection = now();
|
||||||
|
$account->save();
|
||||||
|
$user->agreement = now();
|
||||||
|
$user->wizard = 1;
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
return redirect(route('wizard', [1]));
|
||||||
|
}
|
||||||
|
if($step == 1){
|
||||||
|
|
||||||
|
if($user->isPasswort()){
|
||||||
|
$user->wizard = 2;
|
||||||
|
$user->save();
|
||||||
|
return redirect(route('wizard', [2]));
|
||||||
|
}
|
||||||
|
$rules = array(
|
||||||
|
'password' => 'required|string|min:6|confirmed',
|
||||||
|
);
|
||||||
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
$data = [
|
||||||
|
'user' => Auth::user(),
|
||||||
|
'step' => $step,
|
||||||
|
];
|
||||||
|
return view('user.wizard.show', $data)->withErrors($validator);
|
||||||
|
}else{
|
||||||
|
$user->fill([
|
||||||
|
'password' => Hash::make(Input::get('password'))
|
||||||
|
])->save();
|
||||||
|
$user->wizard = 2;
|
||||||
|
$user->save();
|
||||||
|
return redirect(route('wizard', [2]));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($step == 2){
|
||||||
|
$rules = array(
|
||||||
|
'salutation' => 'required',
|
||||||
|
'first_name'=>'required',
|
||||||
|
'last_name'=>'required',
|
||||||
|
'address'=>'required',
|
||||||
|
'zipcode'=>'required',
|
||||||
|
'city' => 'required',
|
||||||
|
);
|
||||||
|
|
||||||
|
if(!Input::get('same_as_billing')){
|
||||||
|
$rules = array_merge($rules, [
|
||||||
|
'shipping_firstname'=>'required',
|
||||||
|
'shipping_lastname'=>'required',
|
||||||
|
'shipping_address'=>'required',
|
||||||
|
'shipping_zipcode'=>'required',
|
||||||
|
'shipping_city' => 'required',
|
||||||
|
'shipping_salutation' => 'required'
|
||||||
|
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return redirect(route('wizard', [2]))->withErrors($validator)->withInput(Input::all());
|
||||||
|
}else{
|
||||||
|
$data = Input::all();
|
||||||
|
$data['same_as_billing'] = Input::get('same_as_billing') == NULL ? 0 : 1;
|
||||||
|
$user->account->fill($data)->save();
|
||||||
|
$user->wizard = 3;
|
||||||
|
$user->active_date = now();
|
||||||
|
$user->active = 1;
|
||||||
|
$user->save();
|
||||||
|
return redirect(route('wizard', [3]));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($step == 3){
|
||||||
|
|
||||||
|
|
||||||
|
if(Input::get('switchers-package-wizard')){
|
||||||
|
Yard::instance('shopping')->destroy();
|
||||||
|
$product = Product::find(Input::get('switchers-package-wizard'));
|
||||||
|
if($product && $product->active && $product->show_at == 3){
|
||||||
|
$image = "";
|
||||||
|
if($product->images->count()){
|
||||||
|
$image = $product->images->first()->slug;
|
||||||
|
}
|
||||||
|
Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||||
|
|
||||||
|
do {
|
||||||
|
$identifier = Util::getToken();
|
||||||
|
} while( ShoppingInstance::where('identifier', $identifier)->count() );
|
||||||
|
|
||||||
|
ShoppingInstance::create([
|
||||||
|
'identifier' => $identifier,
|
||||||
|
'user_shop_id' => 1, //is first faker shop!
|
||||||
|
'auth_user_id' => $user->id,
|
||||||
|
'subdomain' => url('/'),
|
||||||
|
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||||
|
|
||||||
|
]);
|
||||||
|
Yard::instance('shopping')->store($identifier);
|
||||||
|
|
||||||
|
//add to DB
|
||||||
|
$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
|
||||||
|
$path = str_replace('http', 'https', $path);
|
||||||
|
return redirect()->secure($path);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\Session()->flash('alert-error', "Fehler beim Produkt");
|
||||||
|
return redirect(route('wizard', [3]));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -53,7 +53,7 @@ class Kernel extends HttpKernel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'admin' => \App\Http\Middleware\Admin::class,
|
'admin' => \App\Http\Middleware\Admin::class,
|
||||||
'superadmin' => \App\Http\Middleware\SuperAdmin::class,
|
'superadmin' => \App\Http\Middleware\SuperAdmin::class,
|
||||||
|
|
|
||||||
83
app/Http/Middleware/Authenticate.php
Normal file
83
app/Http/Middleware/Authenticate.php
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Auth\AuthenticationException;
|
||||||
|
use Illuminate\Contracts\Auth\Factory as Auth;
|
||||||
|
|
||||||
|
class Authenticate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The authentication factory instance.
|
||||||
|
*
|
||||||
|
* @var \Illuminate\Contracts\Auth\Factory
|
||||||
|
*/
|
||||||
|
protected $auth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new middleware instance.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Contracts\Auth\Factory $auth
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(Auth $auth)
|
||||||
|
{
|
||||||
|
$this->auth = $auth;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @param string[] ...$guards
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Auth\AuthenticationException
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next, ...$guards)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->authenticate($guards);
|
||||||
|
|
||||||
|
//is blocked
|
||||||
|
if(in_array('user', $guards) && $this->auth->user()->blocked == 1){
|
||||||
|
return redirect(route('user_blocked'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//is wizard
|
||||||
|
if(in_array('user', $guards) && $this->auth->user()->wizard < 5){
|
||||||
|
return redirect(route('wizard'));
|
||||||
|
}
|
||||||
|
//can use wizard < 10 to repay
|
||||||
|
if(in_array('user', $guards) && $this->auth->user()->wizard < 10){
|
||||||
|
//return redirect(route('wizard'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if the user is logged in to any of the given guards.
|
||||||
|
*
|
||||||
|
* @param array $guards
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Auth\AuthenticationException
|
||||||
|
*/
|
||||||
|
protected function authenticate(array $guards)
|
||||||
|
{
|
||||||
|
if (empty($guards)) {
|
||||||
|
return $this->auth->authenticate();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($guards as $guard) {
|
||||||
|
if ($this->auth->guard($guard)->check()) {
|
||||||
|
return $this->auth->shouldUse($guard);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new AuthenticationException('Unauthenticated.', $guards);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -21,7 +21,6 @@ class Checkout
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($identifier = ShoppingInstance::where('identifier', $request->route('identifier'))->first()){
|
if($identifier = ShoppingInstance::where('identifier', $request->route('identifier'))->first()){
|
||||||
//user shop
|
//user shop
|
||||||
$user_shop = $identifier->user_shop;
|
$user_shop = $identifier->user_shop;
|
||||||
|
|
@ -29,7 +28,12 @@ class Checkout
|
||||||
Util::setPostRoute('user.');
|
Util::setPostRoute('user.');
|
||||||
\Session::put('user_shop', $user_shop);
|
\Session::put('user_shop', $user_shop);
|
||||||
\Session::put('isCheckout', true);
|
\Session::put('isCheckout', true);
|
||||||
|
|
||||||
|
if($identifier->auth_user_id){
|
||||||
|
\Session::put('auth_user', $identifier->auth_user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Yard::instance('shopping')->destroy();
|
||||||
//restore yard
|
//restore yard
|
||||||
Yard::instance('shopping')->restore($request->route('identifier'));
|
Yard::instance('shopping')->restore($request->route('identifier'));
|
||||||
Yard::instance('shopping')->setShippingCountryWithPrice($identifier->country_id);
|
Yard::instance('shopping')->setShippingCountryWithPrice($identifier->country_id);
|
||||||
|
|
@ -47,4 +51,4 @@ class Checkout
|
||||||
return redirect(config('app.url'));
|
return redirect(config('app.url'));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -80,6 +80,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
*/
|
*/
|
||||||
class Product extends Model
|
class Product extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
protected $table = 'products';
|
protected $table = 'products';
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|
@ -89,7 +91,8 @@ class Product extends Model
|
||||||
'icons' => 'array',
|
'icons' => 'array',
|
||||||
'trans_description' => 'array',
|
'trans_description' => 'array',
|
||||||
'trans_usage' => 'array',
|
'trans_usage' => 'array',
|
||||||
'trans_ingredients' => 'array'
|
'trans_ingredients' => 'array',
|
||||||
|
'action' => 'array'
|
||||||
];
|
];
|
||||||
use Sluggable;
|
use Sluggable;
|
||||||
|
|
||||||
|
|
@ -114,7 +117,21 @@ class Product extends Model
|
||||||
'ingredients',
|
'ingredients',
|
||||||
'pos',
|
'pos',
|
||||||
'amount',
|
'amount',
|
||||||
'active'
|
'active',
|
||||||
|
'show_at',
|
||||||
|
'action'
|
||||||
|
];
|
||||||
|
|
||||||
|
public $showATs = [
|
||||||
|
0 => 'nur User Shop',
|
||||||
|
1 => 'User + Berater Shop',
|
||||||
|
2 => 'nur Berater Shop',
|
||||||
|
3 => 'Registrierung Shop',
|
||||||
|
];
|
||||||
|
|
||||||
|
public $actions = [
|
||||||
|
0 => 'payment_for_account',
|
||||||
|
1 => 'payment_for_shop',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function sluggable()
|
public function sluggable()
|
||||||
|
|
@ -139,7 +156,12 @@ class Product extends Model
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getActionName($id = 0){
|
||||||
|
if(isset($this->actions[$id])){
|
||||||
|
return $this->actions[$id];
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
public function _format_number($value){
|
public function _format_number($value){
|
||||||
return preg_replace("/[^0-9,]/", "", $value);
|
return preg_replace("/[^0-9,]/", "", $value);
|
||||||
}
|
}
|
||||||
|
|
@ -163,6 +185,9 @@ class Product extends Model
|
||||||
|
|
||||||
public function getFormattedPrice()
|
public function getFormattedPrice()
|
||||||
{
|
{
|
||||||
|
if(!isset($this->attributes['price'])){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if(\App::getLocale() == "en"){
|
if(\App::getLocale() == "en"){
|
||||||
return number_format($this->attributes['price'], 2, '.', ',');
|
return number_format($this->attributes['price'], 2, '.', ',');
|
||||||
}
|
}
|
||||||
|
|
@ -171,6 +196,9 @@ class Product extends Model
|
||||||
|
|
||||||
public function getFormattedPriceEk()
|
public function getFormattedPriceEk()
|
||||||
{
|
{
|
||||||
|
if(!isset($this->attributes['price_ek'])){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if(\App::getLocale() == "en"){
|
if(\App::getLocale() == "en"){
|
||||||
return number_format($this->attributes['price_ek'], 2, '.', ',');
|
return number_format($this->attributes['price_ek'], 2, '.', ',');
|
||||||
}
|
}
|
||||||
|
|
@ -179,6 +207,9 @@ class Product extends Model
|
||||||
|
|
||||||
public function getFormattedTax()
|
public function getFormattedTax()
|
||||||
{
|
{
|
||||||
|
if(!isset($this->attributes['tax'])){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if(\App::getLocale() == "en"){
|
if(\App::getLocale() == "en"){
|
||||||
return number_format($this->attributes['tax'], 2, '.', ',');
|
return number_format($this->attributes['tax'], 2, '.', ',');
|
||||||
}
|
}
|
||||||
|
|
@ -187,6 +218,9 @@ class Product extends Model
|
||||||
|
|
||||||
public function getFormattedPriceOld()
|
public function getFormattedPriceOld()
|
||||||
{
|
{
|
||||||
|
if(!isset($this->attributes['price_old'])){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
if(\App::getLocale() == "en"){
|
if(\App::getLocale() == "en"){
|
||||||
return number_format($this->attributes['price_old'], 2, '.', ',');
|
return number_format($this->attributes['price_old'], 2, '.', ',');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,9 @@ class ShippingPrice extends Model
|
||||||
|
|
||||||
public function getFormattedPrice()
|
public function getFormattedPrice()
|
||||||
{
|
{
|
||||||
|
if ($this->attributes['price'] === NULL) {
|
||||||
|
return $this->attributes['price'];
|
||||||
|
}
|
||||||
if (\App::getLocale() == "en") {
|
if (\App::getLocale() == "en") {
|
||||||
return number_format($this->attributes['price'], 2, '.', ',');
|
return number_format($this->attributes['price'], 2, '.', ',');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class ShoppingInstance extends Model
|
||||||
|
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'identifier', 'user_shop_id', 'subdomain', 'country_id'
|
'identifier', 'user_shop_id', 'auth_user_id', 'subdomain', 'country_id'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function user_shop()
|
public function user_shop()
|
||||||
|
|
@ -23,4 +23,11 @@ class ShoppingInstance extends Model
|
||||||
return $this->belongsTo('App\Models\Country', 'country_id');
|
return $this->belongsTo('App\Models\Country', 'country_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//can null
|
||||||
|
public function auth_user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\User','auth_user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ class ShoppingOrder extends Model
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'shopping_user_id',
|
'shopping_user_id',
|
||||||
|
'auth_user_id',
|
||||||
'country_id',
|
'country_id',
|
||||||
'user_shop_id',
|
'user_shop_id',
|
||||||
'total',
|
'total',
|
||||||
|
|
@ -37,6 +38,13 @@ class ShoppingOrder extends Model
|
||||||
return $this->belongsTo('App\Models\UserShop','user_shop_id');
|
return $this->belongsTo('App\Models\UserShop','user_shop_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//can null
|
||||||
|
public function auth_user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\User','auth_user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function shopping_order_items(){
|
public function shopping_order_items(){
|
||||||
return $this->hasMany('App\Models\ShoppingOrderItem', 'shopping_order_id');
|
return $this->hasMany('App\Models\ShoppingOrderItem', 'shopping_order_id');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,13 @@ class UserAccount extends Model
|
||||||
protected $table = 'user_accounts';
|
protected $table = 'user_accounts';
|
||||||
|
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'company', 'salutation', 'first_name', 'last_name', 'address', 'address_2', 'zipcode', 'city', 'country_id', 'pre_phone_id', 'phone', 'pre_mobil_id', 'mobil',
|
||||||
|
'tax_number', 'tax_identification_number', 'same_as_billing',
|
||||||
|
'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_pre_phone_id', 'shipping_phone',
|
||||||
|
'birthday', 'website', 'facebook', 'facebook_fanpage', 'instagram'
|
||||||
|
];
|
||||||
|
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
|
@ -42,20 +49,14 @@ class UserAccount extends Model
|
||||||
return $this->hasOne('App\User', 'account_id');
|
return $this->hasOne('App\User', 'account_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function company_country()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('App\Models\Country', 'company_country_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function country()
|
public function country()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Country', 'country_id');
|
return $this->belongsTo('App\Models\Country', 'country_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function company_pre_phone()
|
public function shipping_country()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Country', 'company_pre_phone_id');
|
return $this->belongsTo('App\Models\Country', 'shipping_country_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pre_phone()
|
public function pre_phone()
|
||||||
|
|
@ -68,12 +69,9 @@ class UserAccount extends Model
|
||||||
return $this->belongsTo('App\Models\Country', 'pre_mobil_id');
|
return $this->belongsTo('App\Models\Country', 'pre_mobil_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCompanyAttribute(){
|
public function shipping_pre_phone()
|
||||||
|
{
|
||||||
if(empty($this->attributes['company']) && @$this->attributes['company'] !== 0){
|
return $this->belongsTo('App\Models\Country', 'shipping_pre_phone_id');
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return $this->attributes['company'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBirthdayAttribute($value)
|
public function getBirthdayAttribute($value)
|
||||||
|
|
@ -84,13 +82,16 @@ class UserAccount extends Model
|
||||||
return Carbon::parse($value)->format(\Util::formatDateDB());
|
return Carbon::parse($value)->format(\Util::formatDateDB());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setBirthdayAttribute( $value ) {
|
public function setBirthdayAttribute( $value ) {
|
||||||
$this->attributes['birthday'] = (new Carbon($value))->format('Y-m-d');
|
$this->attributes['birthday'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDataProtectionFormat(){
|
public function getDataProtectionFormat(){
|
||||||
if(!$this->attributes['data_protection']){ return ""; }
|
if(!$this->attributes['data_protection']){ return ""; }
|
||||||
return Carbon::parse($this->attributes['data_protection'])->format(\Util::formatDateTimeDB());
|
return Carbon::parse($this->attributes['data_protection'])->format(\Util::formatDateTimeDB());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class UserRepository extends BaseRepository {
|
||||||
public function update($data)
|
public function update($data)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($data['user_id'] == "new"){
|
if($data['user_id'] == "new" || $data['user_id'] == 0){
|
||||||
|
|
||||||
$this->model = User::create([
|
$this->model = User::create([
|
||||||
'email' => $data['email'],
|
'email' => $data['email'],
|
||||||
|
|
@ -35,44 +35,9 @@ class UserRepository extends BaseRepository {
|
||||||
$account = $this->model->account;
|
$account = $this->model->account;
|
||||||
}
|
}
|
||||||
|
|
||||||
$account->company = $data['company'];
|
$data['same_as_billing'] = !isset($data['same_as_billing']) ? 0 : 1;
|
||||||
|
|
||||||
$account->company_name = $data['company_name'];
|
$account->fill($data)->save();
|
||||||
|
|
||||||
$account->company_street = $data['company_street'];
|
|
||||||
$account->company_postal_code = $data['company_postal_code'];
|
|
||||||
$account->company_city = $data['company_city'];
|
|
||||||
$account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : null;
|
|
||||||
$account->company_pre_phone_id = isset($data['company_pre_phone_id']) ? $data['company_pre_phone_id']: null;
|
|
||||||
$account->company_phone = $data['company_phone'];
|
|
||||||
$account->company_homepage = $data['company_homepage'];
|
|
||||||
|
|
||||||
$account->salutation = $data['salutation'];
|
|
||||||
$account->title = $data['title'];
|
|
||||||
$account->first_name = $data['first_name'];
|
|
||||||
$account->last_name = $data['last_name'];
|
|
||||||
|
|
||||||
$account->street = $data['street'];
|
|
||||||
$account->postal_code = $data['postal_code'];
|
|
||||||
$account->city = $data['city'];
|
|
||||||
$account->country_id = isset($data['country_id']) ? $data['country_id'] : null;
|
|
||||||
|
|
||||||
$account->pre_phone_id = isset($data['pre_phone_id']) ? $data['pre_phone_id']: null;
|
|
||||||
$account->phone = $data['phone'];
|
|
||||||
|
|
||||||
$account->pre_mobil_id = isset($data['pre_mobil_id']) ? $data['pre_mobil_id']: null;
|
|
||||||
$account->mobil = $data['mobil'];
|
|
||||||
|
|
||||||
$account->birthday = $data['birthday'];
|
|
||||||
$account->website = $data['website'];
|
|
||||||
$account->instagram = $data['instagram'];
|
|
||||||
$account->facebook = $data['facebook'];
|
|
||||||
$account->facebook_fanpage = $data['facebook_fanpage'];
|
|
||||||
|
|
||||||
//data_protection
|
|
||||||
//active_date
|
|
||||||
//active
|
|
||||||
$account->save();
|
|
||||||
|
|
||||||
if(!$this->model->account_id){
|
if(!$this->model->account_id){
|
||||||
$this->model->account_id = $account->id;
|
$this->model->account_id = $account->id;
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,15 @@ class Util
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getAuthUser(){
|
||||||
|
if(\Session::has('auth_user')){
|
||||||
|
if($auth_user = \Session::get('auth_user')){
|
||||||
|
return $auth_user;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static function addRoute($p = []){
|
public static function addRoute($p = []){
|
||||||
$b = [];
|
$b = [];
|
||||||
|
|
||||||
|
|
@ -73,11 +82,11 @@ class Util
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getUserShopBackUrl(){
|
public static function getUserShopBackUrl($reference = ""){
|
||||||
|
|
||||||
if(\Session::has('user_shop')){
|
if(\Session::has('user_shop')){
|
||||||
if($user_shop = \Session::get('user_shop')){
|
if($user_shop = \Session::get('user_shop')){
|
||||||
return 'http://'.$user_shop->slug.".".Config('app.domain')."/back/to/shop";
|
return 'http://'.$user_shop->slug.".".Config('app.domain')."/back/to/shop/".$reference;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return url("/");
|
return url("/");
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use Illuminate\Support\Collection;
|
||||||
class Yard extends Cart
|
class Yard extends Cart
|
||||||
{
|
{
|
||||||
private $shipping = 0;
|
private $shipping = 0;
|
||||||
private $shipping_country_id = 7; //default de
|
private $shipping_country_id = 0; //default de
|
||||||
private $ysession;
|
private $ysession;
|
||||||
private $yinstance;
|
private $yinstance;
|
||||||
|
|
||||||
|
|
@ -30,9 +30,13 @@ class Yard extends Cart
|
||||||
|
|
||||||
parent::__construct($session, $events);
|
parent::__construct($session, $events);
|
||||||
|
|
||||||
|
if($this->shipping_country_id == 0){
|
||||||
|
$shippingCountry = ShippingCountry::first();
|
||||||
|
$this->shipping_country_id = $shippingCountry->id;
|
||||||
|
|
||||||
|
}
|
||||||
if($this->shipping == 0){
|
if($this->shipping == 0){
|
||||||
self::instance('shopping')->setShippingCountryWithPrice($this->shipping_country_id);
|
self::instance('shopping')->setShippingCountryWithPrice($this->shipping_country_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -90,10 +94,12 @@ class Yard extends Cart
|
||||||
if($shipping_country_id > 0){
|
if($shipping_country_id > 0){
|
||||||
$shippingCountry = ShippingCountry::find($shipping_country_id);
|
$shippingCountry = ShippingCountry::find($shipping_country_id);
|
||||||
$shipping = $shippingCountry->shipping;
|
$shipping = $shippingCountry->shipping;
|
||||||
if($this->weight()){
|
if($this->weight() == 0){
|
||||||
//blance by weigt
|
$price = $shipping->prices->first();
|
||||||
|
$price->price = 0;
|
||||||
|
}else{
|
||||||
|
$price = $shipping->prices->first();
|
||||||
}
|
}
|
||||||
$price = $shipping->prices->first();
|
|
||||||
if($price){
|
if($price){
|
||||||
$this->shipping = floatval($price->price);
|
$this->shipping = floatval($price->price);
|
||||||
$this->putShippingExtra('shipping_price', $this->shipping);
|
$this->putShippingExtra('shipping_price', $this->shipping);
|
||||||
|
|
|
||||||
26
app/User.php
26
app/User.php
|
|
@ -150,6 +150,20 @@ class User extends Authenticatable
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function showSideNav()
|
||||||
|
{
|
||||||
|
if($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
@ -174,6 +188,18 @@ class User extends Authenticatable
|
||||||
return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB());
|
return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPaymentAccountDateFormat(){
|
||||||
|
if(!$this->attributes['payment_account']){ return ""; }
|
||||||
|
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPaymentShopDateFormat(){
|
||||||
|
if(!$this->attributes['payment_shop']){ return ""; }
|
||||||
|
return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'guard' => 'web',
|
'guard' => 'user',
|
||||||
'passwords' => 'users',
|
'passwords' => 'users',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'guards' => [
|
'guards' => [
|
||||||
'web' => [
|
'user' => [
|
||||||
'driver' => 'session',
|
'driver' => 'session',
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,19 @@ class CreateUsersTable extends Migration
|
||||||
$table->dateTime('agreement')->nullable();
|
$table->dateTime('agreement')->nullable();
|
||||||
|
|
||||||
$table->boolean('admin')->default(false);
|
$table->boolean('admin')->default(false);
|
||||||
|
$table->boolean('wizard')->default(false);
|
||||||
|
$table->boolean('blocked')->default(false);
|
||||||
|
|
||||||
|
|
||||||
$table->char('lang', 2)->index();
|
$table->char('lang', 2)->index();
|
||||||
$table->text('notes')->nullable();
|
$table->text('notes')->nullable();
|
||||||
|
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
|
|
||||||
$table->timestamp('last_login')->nullable();
|
$table->timestamp('last_login')->nullable();
|
||||||
|
$table->timestamp('payment_account')->nullable();
|
||||||
|
$table->timestamp('payment_shop')->nullable();
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreateAccountsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('accounts', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
|
|
||||||
$table->boolean('company')->default(true);
|
|
||||||
|
|
||||||
$table->string('company_name')->nullable()->index();
|
|
||||||
$table->string('company_street')->nullable();
|
|
||||||
$table->string('company_postal_code')->nullable();
|
|
||||||
$table->string('company_city')->nullable();
|
|
||||||
$table->unsignedInteger('company_pre_phone_id')->nullable();
|
|
||||||
$table->string('company_phone')->nullable();
|
|
||||||
$table->string('company_homepage')->nullable();
|
|
||||||
$table->unsignedInteger('company_country_id')->nullable()->index();
|
|
||||||
|
|
||||||
$table->char('salutation', 2)->nullable();
|
|
||||||
$table->string('title')->nullable();
|
|
||||||
$table->string('first_name')->nullable();
|
|
||||||
$table->string('last_name')->nullable();
|
|
||||||
$table->string('street')->nullable();
|
|
||||||
$table->string('postal_code')->nullable();
|
|
||||||
$table->string('city')->nullable();
|
|
||||||
|
|
||||||
$table->unsignedInteger('country_id')->nullable()->index();
|
|
||||||
|
|
||||||
$table->unsignedInteger('pre_phone_id')->nullable();
|
|
||||||
$table->string('phone')->nullable();
|
|
||||||
|
|
||||||
$table->unsignedInteger('pre_mobil_id')->nullable();
|
|
||||||
$table->string('mobil')->nullable();
|
|
||||||
|
|
||||||
$table->date('birthday')->nullable();
|
|
||||||
$table->string('website')->nullable();
|
|
||||||
$table->string('facebook')->nullable();
|
|
||||||
$table->string('facebook_fanpage')->nullable();
|
|
||||||
$table->string('instagram')->nullable();
|
|
||||||
$table->timestamp('data_protection')->nullable();
|
|
||||||
$table->timestamps();
|
|
||||||
$table->softDeletes();
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('accounts');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -52,6 +52,10 @@ class CreateProductsTable extends Migration
|
||||||
|
|
||||||
$table->unsignedInteger('amount')->nullable(); //for shop
|
$table->unsignedInteger('amount')->nullable(); //for shop
|
||||||
|
|
||||||
|
$table->tinyInteger('show_at')->unsigned()->nullable()->default(0);
|
||||||
|
$table->string('action')->nullable();
|
||||||
|
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class CreateShoppingInstancesTable extends Migration
|
||||||
Schema::create('shopping_instances', function (Blueprint $table) {
|
Schema::create('shopping_instances', function (Blueprint $table) {
|
||||||
$table->string('identifier')->unique()->index();
|
$table->string('identifier')->unique()->index();
|
||||||
$table->unsignedInteger('user_shop_id');
|
$table->unsignedInteger('user_shop_id');
|
||||||
|
$table->unsignedInteger('auth_user_id');
|
||||||
$table->unsignedInteger('country_id');
|
$table->unsignedInteger('country_id');
|
||||||
$table->string('subdomain');
|
$table->string('subdomain');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ class CreateShoppingUsersTable extends Migration
|
||||||
Schema::create('shopping_users', function (Blueprint $table) {
|
Schema::create('shopping_users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->unsignedInteger('auth_user_id');
|
||||||
|
|
||||||
$table->char('billing_salutation', 2)->nullable();
|
$table->char('billing_salutation', 2)->nullable();
|
||||||
$table->string('billing_company')->nullable();
|
$table->string('billing_company')->nullable();
|
||||||
$table->string('billing_firstname')->nullable();
|
$table->string('billing_firstname')->nullable();
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ class CreateShoppingOrdersTable extends Migration
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
|
||||||
$table->unsignedInteger('shopping_user_id');
|
$table->unsignedInteger('shopping_user_id');
|
||||||
|
$table->unsignedInteger('auth_user_id');
|
||||||
|
|
||||||
$table->unsignedInteger('country_id');
|
$table->unsignedInteger('country_id');
|
||||||
$table->unsignedInteger('user_shop_id');
|
$table->unsignedInteger('user_shop_id');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateUserAccountsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('user_accounts', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
|
||||||
|
$table->string('company')->nullable();
|
||||||
|
$table->char('salutation', 2)->nullable();
|
||||||
|
$table->string('first_name')->nullable();
|
||||||
|
$table->string('last_name')->nullable();
|
||||||
|
$table->string('address')->nullable();
|
||||||
|
$table->string('address_2')->nullable();
|
||||||
|
$table->string('zipcode', 10)->nullable();
|
||||||
|
$table->string('city')->nullable();
|
||||||
|
|
||||||
|
$table->unsignedInteger('country_id')->index()->default(1);
|
||||||
|
|
||||||
|
$table->unsignedInteger('pre_phone_id')->nullable();
|
||||||
|
$table->string('phone')->nullable();
|
||||||
|
$table->unsignedInteger('pre_mobil_id')->nullable();
|
||||||
|
$table->string('mobil')->nullable();
|
||||||
|
|
||||||
|
$table->string('tax_number', 20)->nullable();
|
||||||
|
$table->string('tax_identification_number', 20)->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->boolean('same_as_billing')->default(true);
|
||||||
|
|
||||||
|
$table->char('shipping_salutation', 2)->nullable();
|
||||||
|
$table->string('shipping_company')->nullable();
|
||||||
|
$table->string('shipping_firstname')->nullable();
|
||||||
|
$table->string('shipping_lastname')->nullable();
|
||||||
|
$table->string('shipping_address')->nullable();
|
||||||
|
$table->string('shipping_address_2')->nullable();
|
||||||
|
$table->string('shipping_zipcode')->nullable();
|
||||||
|
$table->string('shipping_city')->nullable();
|
||||||
|
|
||||||
|
$table->unsignedInteger('shipping_country_id')->default(1);
|
||||||
|
|
||||||
|
$table->unsignedInteger('shipping_pre_phone_id')->nullable();
|
||||||
|
$table->string('shipping_phone')->nullable();
|
||||||
|
|
||||||
|
$table->date('birthday')->nullable();
|
||||||
|
$table->string('website')->nullable();
|
||||||
|
$table->string('facebook')->nullable();
|
||||||
|
$table->string('facebook_fanpage')->nullable();
|
||||||
|
$table->string('instagram')->nullable();
|
||||||
|
|
||||||
|
$table->timestamp('data_protection')->nullable();
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
|
||||||
|
|
||||||
|
$table->foreign('country_id')
|
||||||
|
->references('id')
|
||||||
|
->on('countries');
|
||||||
|
|
||||||
|
$table->foreign('shipping_country_id')
|
||||||
|
->references('id')
|
||||||
|
->on('countries');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('user_accounts');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
.alert ul {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
"Reset Password": "Passwort zur\u00fccksetzen",
|
"Reset Password": "Passwort zur\u00fccksetzen",
|
||||||
"Send Password Reset Link": "Link zum Zur\u00fccksetzen des Passworts senden",
|
"Send Password Reset Link": "Link zum Zur\u00fccksetzen des Passworts senden",
|
||||||
"save": "speichern",
|
"save": "speichern",
|
||||||
|
"save and next": "speichern und weiter",
|
||||||
"save changes": "\u00c4nderungen speichern",
|
"save changes": "\u00c4nderungen speichern",
|
||||||
"abort": "abbrechen",
|
"abort": "abbrechen",
|
||||||
"This field is required.": "Dieses Feld ist ein Pflichtfeld.",
|
"This field is required.": "Dieses Feld ist ein Pflichtfeld.",
|
||||||
|
|
@ -82,7 +83,7 @@
|
||||||
"Here you can adjust your data.": "Hier k\u00f6nnen Sie Ihre Daten anpassen.",
|
"Here you can adjust your data.": "Hier k\u00f6nnen Sie Ihre Daten anpassen.",
|
||||||
"Overview": "\u00dcbersicht",
|
"Overview": "\u00dcbersicht",
|
||||||
"Adjust data": "Daten anpassen",
|
"Adjust data": "Daten anpassen",
|
||||||
"Login & Security": "Anmeldung & Sicherheit",
|
"Data, Login & Security": "Daten, Anmeldung & Sicherheit",
|
||||||
"Sign in with your e-mail:": "Anmeldung mit Ihrer E-Mail:",
|
"Sign in with your e-mail:": "Anmeldung mit Ihrer E-Mail:",
|
||||||
"Change your password here to access your account.": "\u00c4ndern Sie hier Ihr Passwort f\u00fcr den Zugriff auf Ihren Account.",
|
"Change your password here to access your account.": "\u00c4ndern Sie hier Ihr Passwort f\u00fcr den Zugriff auf Ihren Account.",
|
||||||
"Activities": "Aktivit\u00e4ten",
|
"Activities": "Aktivit\u00e4ten",
|
||||||
|
|
|
||||||
|
|
@ -17,26 +17,26 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<h4 class="font-weight-bold py-2 mb-2">
|
<h4 class="font-weight-bold py-2 mb-2">
|
||||||
{{ __('Create/Edit Contact') }}
|
@if(!$user->id || $user->id == 'new')
|
||||||
|
{{ __('Neuen Berater erstellen') }}
|
||||||
|
@else
|
||||||
|
{{ __('Berater bearbeiten') }}
|
||||||
|
@endif
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||||
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
@if(!$user->id || $user->id == 'new')
|
||||||
|
@include('user.user_new_form')
|
||||||
@include('user.form')
|
@include('user.data_verify')
|
||||||
|
@else
|
||||||
@if(!$user->id || $user->id == 'new')
|
@include('user.user_form')
|
||||||
@include('user.data_verify')
|
@endif
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
<div class="text-left mt-3">
|
<div class="text-left mt-3">
|
||||||
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>
|
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>
|
||||||
|
|
||||||
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('abort') }}</a>
|
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('abort') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
|
|
||||||
<h4 class="font-weight-bold py-2 mb-2">
|
<h4 class="font-weight-bold py-2 mb-2">
|
||||||
{{ __('Contacts') }}
|
{{ __('Berater') }}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-datatable table-responsive">
|
<div class="card-datatable table-responsive">
|
||||||
<div class="ml-4">
|
<div class="ml-4">
|
||||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('create new Contact')}}</a>
|
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
|
||||||
</div>
|
</div>
|
||||||
<table class="datatables-leads table table-striped table-bordered">
|
<table class="datatables-leads table table-striped table-bordered">
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<div class="mt-4 ml-4">
|
<div class="mt-4 ml-4">
|
||||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('create new Contact')}}</a>
|
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -62,44 +62,3 @@
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
<?php /*
|
|
||||||
<!-- Filters -->
|
|
||||||
<!-- <div class="ui-bordered px-4 pt-4 mb-4">
|
|
||||||
<div class="form-row align-items-center">
|
|
||||||
<div class="col-md mb-4">
|
|
||||||
<label class="form-label">Filter1</label>
|
|
||||||
<select class="custom-select">
|
|
||||||
<option>Any</option>
|
|
||||||
<option>Yes</option>
|
|
||||||
<option>No</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-md mb-4">
|
|
||||||
<label class="form-label">Filter2</label>
|
|
||||||
<select class="custom-select">
|
|
||||||
<option>Any</option>
|
|
||||||
<option>Yes</option>
|
|
||||||
<option>No</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-md mb-4">
|
|
||||||
<label class="form-label">Filter3</label>
|
|
||||||
<select class="custom-select">
|
|
||||||
<option>Any</option>
|
|
||||||
<option>Yes</option>
|
|
||||||
<option>No</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-md mb-4">
|
|
||||||
<label class="form-label">Filter4</label>
|
|
||||||
<input type="text" id="user-list-latest-activity" class="form-control" placeholder="Any">
|
|
||||||
</div>
|
|
||||||
<div class="col-md col-xl-2 mb-4">
|
|
||||||
<label class="form-label d-none d-md-block"> </label>
|
|
||||||
<button type="button" class="btn btn-secondary btn-block">Show</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
*/?>
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,21 @@
|
||||||
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
<label class="form-label" for="name">{{ __('Name') }}*</label>
|
||||||
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
|
{{ Form::text('name', $product->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required')) }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-8">
|
||||||
|
<label class="form-label" for="title">{{ __('Title') }}</label>
|
||||||
|
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
|
||||||
|
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="form-label" for="title">{{ __('Title') }}</label>
|
|
||||||
{{ Form::text('title', $product->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title')) }}
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="title">{{ __('Anzeigen') }}</label>
|
||||||
|
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-sm-8">
|
<div class="form-group col-sm-8">
|
||||||
<label class="form-label" for="title">{{ __('Kategorie(n)') }}</label>
|
<label class="form-label" for="title">{{ __('Kategorie(n)') }}</label>
|
||||||
|
|
@ -39,6 +48,12 @@
|
||||||
<label class="form-label" for="copy">{{ __('copy') }}</label>
|
<label class="form-label" for="copy">{{ __('copy') }}</label>
|
||||||
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Leistungen'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
|
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Leistungen'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<label class="form-label" for="title">{{ __('Action') }}</label>
|
||||||
|
{{ Form::select('action[]', $product->actions, $product->action, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'action', 'multiple') ) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,60 +15,33 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
|
||||||
<h4>{{ __('Your Data') }}</h4>
|
|
||||||
|
|
||||||
@if($user->active == 0)
|
|
||||||
<p>{{__('If you have checked your data, share your data here!')}}</p>
|
|
||||||
|
|
||||||
<div class="card mb-2">
|
|
||||||
|
|
||||||
<div class="card-body" style="background-color: #f5f5f5;">
|
|
||||||
{!! Form::open(['url' => route('user_data_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
|
||||||
|
|
||||||
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
|
||||||
|
|
||||||
@include('user.form')
|
|
||||||
@if(!$user->account->data_protection)
|
|
||||||
@include('user.data_confirm')
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="text-left mt-3">
|
|
||||||
<button type="submit" class="btn btn-warning">{{ __('yes, data checked and share') }}</button>
|
|
||||||
</div>
|
|
||||||
{!! Form::close() !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@else
|
|
||||||
<a href="{{ route('user_edit') }}" class="btn btn-secondary">{{ __('Adjust data') }}</a>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
@if($user->active == 1 && !$user->user_shop)
|
@if($user->active == 1)
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
<h4>{{__('Your Shop') }}</h4>
|
<h4>{{__('Your Shop') }}</h4>
|
||||||
@if($user->shop)
|
|
||||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
|
||||||
<strong>{{__('open since')}}</strong> {{__('at')}} {{ $user->shop->getActiveDateFormat() }}</p>
|
|
||||||
@if($user->shop->active)
|
|
||||||
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
|
||||||
<strong>{{__('Status')}}</strong> {{ __('active') }}</p>
|
|
||||||
@else
|
|
||||||
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
|
||||||
<strong>{{__('Status')}}</strong> {{ __('inactive') }}</p>
|
|
||||||
@endif
|
|
||||||
<a href="{{route('user_shop')}}" class="btn btn-secondary">{{__('settings your shop')}}</a>
|
|
||||||
|
|
||||||
@else
|
@if($user->payment_shop)
|
||||||
<a href="{{route('user_shop')}}" class="btn btn-secondary">{{__('open your shop')}}</a>
|
@if($user->shop)
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('open since')}}</strong> {{__('at')}} {{ $user->shop->getActiveDateFormat() }}</p>
|
||||||
|
@if($user->shop->active)
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('Status')}}</strong> {{ __('active') }}</p>
|
||||||
|
@else
|
||||||
|
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||||
|
<strong>{{__('Status')}}</strong> {{ __('inactive') }}</p>
|
||||||
|
@endif
|
||||||
|
<a href="{{route('user_shop')}}" class="btn btn-secondary">{{__('settings your shop')}}</a>
|
||||||
|
|
||||||
|
@else
|
||||||
|
<a href="{{route('user_shop')}}" class="btn btn-secondary">{{__('open your shop')}}</a>
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
|
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||||
|
<strong>{{__('Shop nicht gebucht')}}</strong></p>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -76,38 +49,56 @@
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
<h4>{{__('Activities') }}</h4>
|
<h4>{{__('Activities') }}</h4>
|
||||||
|
|
||||||
|
@if($user->payment_account )
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
|
||||||
|
@else
|
||||||
|
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||||
|
<strong>{{__('Account inaktiv')}}</strong></p>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($user->payment_shop)
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('Shop aktiv')}}</strong> {{__('bis zum')}}: {{ $user->getPaymentShopDateFormat() }}</p>
|
||||||
|
@else
|
||||||
|
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||||
|
<strong>{{__('Shop inaktiv')}}</strong></p>
|
||||||
|
@endif
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
@if($user->active == 1)
|
@if($user->active == 1)
|
||||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
<strong>{{__('Data released')}}</strong> {{__('at')}} {{ $user->getActiveDateFormat() }}</p>
|
<strong>{{__('Daten vervollständigt')}}</strong> {{__('at')}}: {{ $user->getActiveDateFormat() }}</p>
|
||||||
@endif
|
|
||||||
@if($user->confirmed == 1)
|
|
||||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
|
||||||
<strong>{{__('E-Mail verified')}}</strong> {{__('at')}} {{ $user->getConfirmationDateFormat() }}</p>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($user->account_id)
|
@if($user->account_id)
|
||||||
@if($user->account->data_protection)
|
|
||||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
|
||||||
<strong>{{__('Privacy policy approved')}}</strong> {{__('at')}} {{ $user->account->getDataProtectionFormat() }}
|
|
||||||
</p>
|
|
||||||
@endif
|
|
||||||
@if($user->active == 1)
|
@if($user->active == 1)
|
||||||
@if($user->agreement)
|
@if($user->agreement)
|
||||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
<strong>{{__('Einverständniserklärung')}}</strong> {{__('at')}} {{ $user->getAgreementFormat() }}
|
<strong>{{__('Einverständniserklärung')}}</strong> {{__('at')}}: {{ $user->getAgreementFormat() }}
|
||||||
</p>
|
</p>
|
||||||
@else
|
@else
|
||||||
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||||
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
|
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
@if($user->account->data_protection)
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('Privacy policy approved')}}</strong> {{__('at')}}: {{ $user->account->getDataProtectionFormat() }}
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@if($user->confirmed == 1)
|
||||||
|
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||||
|
<strong>{{__('E-Mail verified')}}</strong> {{__('at')}}: {{ $user->getConfirmationDateFormat() }}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($user->active == 1)
|
@if($user->active == 1)
|
||||||
|
|
||||||
|
{{-- <div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
|
||||||
<h4>{{ __('Einwilligung & Datenschutz') }}</h4>
|
<h4>{{ __('Einwilligung & Datenschutz') }}</h4>
|
||||||
|
|
||||||
{!! Form::open(['url' => route('user_data_accepted_form'), 'class' => 'form-horizontal' , 'id'=>'data-privacy-form-validations']) !!}
|
{!! Form::open(['url' => route('user_data_accepted_form'), 'class' => 'form-horizontal' , 'id'=>'data-privacy-form-validations']) !!}
|
||||||
|
|
@ -128,12 +119,16 @@
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
--}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
<h4>{{__('Login & Security') }}</h4>
|
<h4>{{__('Data, Login & Security') }}</h4>
|
||||||
<p>{{__('Sign in with your e-mail:')}} {{ Auth::user()->email }}</p>
|
<p>{{__('Sign in with your e-mail:')}} {{ Auth::user()->email }}</p>
|
||||||
|
<a href="{{ route('user_edit') }}" class="btn btn-secondary">{{ __('Adjust data') }}</a>
|
||||||
|
<a href="{{route('user_update_email')}}" class="btn btn-secondary">{{__('Change E-Mail')}}</a>
|
||||||
|
<br><br>
|
||||||
@if(!$user->isPasswort())
|
@if(!$user->isPasswort())
|
||||||
<p>{{__('Assign a password for your account.')}}</p>
|
<p>{{__('Assign a password for your account.')}}</p>
|
||||||
<a href="{{route('user_update_password_first')}}" class="btn btn-submit">{{__('Create Password')}}</a>
|
<a href="{{route('user_update_password_first')}}" class="btn btn-submit">{{__('Create Password')}}</a>
|
||||||
|
|
@ -141,9 +136,7 @@
|
||||||
<p>{{__('Change your password here to access your account.')}}</p>
|
<p>{{__('Change your password here to access your account.')}}</p>
|
||||||
<a href="{{route('user_update_password')}}" class="btn btn-secondary">{{__('Change password')}}</a>
|
<a href="{{route('user_update_password')}}" class="btn btn-secondary">{{__('Change password')}}</a>
|
||||||
@endif
|
@endif
|
||||||
<a href="{{route('user_update_email')}}" class="btn btn-secondary">{{__('Change E-Mail')}}</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
|
|
@ -152,11 +145,13 @@
|
||||||
{{ __('Logout') }}</a>
|
{{ __('Logout') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
{{--
|
||||||
|
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
|
||||||
<h4>{{__('Delete') }}</h4>
|
<h4>{{__('Delete') }}</h4>
|
||||||
<p>{{__('If you no longer want to use our offer, you can delete your account here.')}}</p>
|
<p>{{__('If you no longer want to use our offer, you can delete your account here.')}}</p>
|
||||||
<a href="{{route('user_delete_account')}}" class="btn btn-default">{{__('Delete Account')}}</a>
|
<a href="{{route('user_delete_account')}}" class="btn btn-default">{{__('Delete Account')}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
--}}
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
|
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
|
||||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
|
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css') }}">
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css') }}">
|
||||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/slim-image-cropper/slim/slim.css') }}">
|
<link rel="stylesheet" href="{{ asset('/vendor/libs/slim-image-cropper/slim/slim.css') }}">
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -110,7 +110,6 @@
|
||||||
<script src="{{ mix('/vendor/libs/select2/select2.js') }}"></script>
|
<script src="{{ mix('/vendor/libs/select2/select2.js') }}"></script>
|
||||||
<script src="{{ mix('/vendor/libs/datatables/datatables.js') }}"></script>
|
<script src="{{ mix('/vendor/libs/datatables/datatables.js') }}"></script>
|
||||||
|
|
||||||
|
|
||||||
<script src="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.js') }}"></script>
|
<script src="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.js') }}"></script>
|
||||||
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
|
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
|
||||||
|
|
||||||
|
|
@ -135,6 +134,22 @@
|
||||||
<script src="{{ asset('/js/custom.js') }}"></script>
|
<script src="{{ asset('/js/custom.js') }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
|
$('.datepicker-base').datepicker({
|
||||||
|
orientation: 'auto right',
|
||||||
|
calendarWeeks: true,
|
||||||
|
todayBtn: 'linked',
|
||||||
|
daysOfWeekDisabled: '1',
|
||||||
|
todayHighlight: true,
|
||||||
|
multidate: false,
|
||||||
|
daysOfWeekHighlighted: '0,6',
|
||||||
|
autoclose: true,
|
||||||
|
format: 'dd.mm.yyyy',
|
||||||
|
language: 'de',
|
||||||
|
clearBtn: true,
|
||||||
|
|
||||||
|
});
|
||||||
$('.summernote').summernote({
|
$('.summernote').summernote({
|
||||||
height: 140,
|
height: 140,
|
||||||
lang: 'de-DE',
|
lang: 'de-DE',
|
||||||
|
|
@ -186,226 +201,12 @@
|
||||||
$('.note-status-output').hide();
|
$('.note-status-output').hide();
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
|
||||||
|
|
||||||
|
function _scrollTo(to, offset) {
|
||||||
|
|
||||||
<script>
|
$('html,body').animate({scrollTop: $(to).offset().top - offset}, 800);
|
||||||
|
|
||||||
function trigger_company($ele, $speed){
|
|
||||||
if($ele.val() == 1){
|
|
||||||
$('.show_company_holder').show($speed);
|
|
||||||
$('.show_company_holder').find('#company_name').prop('required', true);
|
|
||||||
$('.show_company_holder').find('#company_country_id').prop('required', true);
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$('.show_company_holder').hide($speed);
|
|
||||||
$('.show_company_holder').find('#company_name').prop('required', false);
|
|
||||||
$('.show_company_holder').find('#company_country_id').prop('required', false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$( document ).ready(function() {
|
|
||||||
|
|
||||||
$('.datepicker-birthday').datepicker({
|
|
||||||
todayBtn: 'linked',
|
|
||||||
daysOfWeekDisabled: '1',
|
|
||||||
multidate: false,
|
|
||||||
daysOfWeekHighlighted: '0,6',
|
|
||||||
autoclose: true,
|
|
||||||
format: 'dd.mm.yyyy',
|
|
||||||
language: 'de',
|
|
||||||
clearBtn: true,
|
|
||||||
startView:2,
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.datepicker-base').datepicker({
|
|
||||||
orientation: 'auto right',
|
|
||||||
calendarWeeks: true,
|
|
||||||
todayBtn: 'linked',
|
|
||||||
daysOfWeekDisabled: '1',
|
|
||||||
todayHighlight: true,
|
|
||||||
multidate: false,
|
|
||||||
daysOfWeekHighlighted: '0,6',
|
|
||||||
autoclose: true,
|
|
||||||
format: 'dd.mm.yyyy',
|
|
||||||
language: 'de',
|
|
||||||
clearBtn: true,
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// Set up validator
|
|
||||||
|
|
||||||
var message = 'Default error message';
|
|
||||||
$('#data-shop-form-validations').validate({
|
|
||||||
rules: {
|
|
||||||
'user_shop_name': {
|
|
||||||
required: true,
|
|
||||||
remote:
|
|
||||||
{
|
|
||||||
url: "{{ route('user_shop_name_check') }}",
|
|
||||||
type: "post",
|
|
||||||
data:
|
|
||||||
{
|
|
||||||
user_shop_name: function()
|
|
||||||
{
|
|
||||||
return $('#data-shop-form-validations :input[name="user_shop_name"]').val();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
encode: true,
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
||||||
},
|
|
||||||
dataFilter: function(response) {
|
|
||||||
response = $.parseJSON(response);
|
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
if (response.success === true) return true;
|
|
||||||
else {
|
|
||||||
message = response.errors.user_shop_name;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
errorPlacement: function errorPlacement(error, element) {
|
|
||||||
$(element).parents('.form-group').find('.input-group').after(
|
|
||||||
error.addClass('invalid-feedback d-block font-weight-bold')
|
|
||||||
)
|
|
||||||
},
|
|
||||||
highlight: function (element) {
|
|
||||||
|
|
||||||
$(element).parent().find('button').removeClass('btn-success');
|
|
||||||
$(element).parent().find('button').addClass('btn-danger');
|
|
||||||
$(element).parent().find('button i').removeClass('fa-check');
|
|
||||||
$(element).parent().find('button i').addClass('fa-times');
|
|
||||||
|
|
||||||
$(element).removeClass('is-valid');
|
|
||||||
$(element).addClass('is-invalid');
|
|
||||||
},
|
|
||||||
unhighlight: function (element) {
|
|
||||||
$(element).removeClass('is-invalid');
|
|
||||||
$(element).addClass('is-valid');
|
|
||||||
|
|
||||||
$(element).parent().find('button').removeClass('btn-danger');
|
|
||||||
$(element).parent().find('button').addClass('btn-success');
|
|
||||||
$(element).parent().find('button i').removeClass('fa-times');
|
|
||||||
$(element).parent().find('button i').addClass('fa-check');
|
|
||||||
|
|
||||||
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
|
||||||
},
|
|
||||||
messages : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
user_shop_name: {
|
|
||||||
email: "{{ __('Please enter a valid email address.') }}",
|
|
||||||
remote : function(){ return message; }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onkeyup: function(element) {$(element).valid()},
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// With validation
|
|
||||||
var $lead_form = $('#lead-form-validation');
|
|
||||||
$lead_form.find('#company').on('change', function () {
|
|
||||||
trigger_company($(this), 'slow');
|
|
||||||
});
|
|
||||||
|
|
||||||
trigger_company($lead_form.find('#company'), 0);
|
|
||||||
|
|
||||||
// Set up validator
|
|
||||||
$lead_form.validate({
|
|
||||||
rules: {
|
|
||||||
'email': {
|
|
||||||
required: true,
|
|
||||||
email: true,
|
|
||||||
remote:
|
|
||||||
{
|
|
||||||
url: "{{ route('user_check_mail') }}",
|
|
||||||
type: "post",
|
|
||||||
data:
|
|
||||||
{
|
|
||||||
user_id: function()
|
|
||||||
{
|
|
||||||
return $('#lead-form-validation :input[name="user_id"]').val();
|
|
||||||
},
|
|
||||||
email: function()
|
|
||||||
{
|
|
||||||
return $('#lead-form-validation :input[name="email"]').val();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
encode: true,
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'email-confirm': {
|
|
||||||
required: true,
|
|
||||||
equalTo: "#email"
|
|
||||||
},
|
|
||||||
'accepted_data_protection': {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
'accepted_active': {
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
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.')}}",
|
|
||||||
company_country_id : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
salutation : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
accepted_data_protection : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
accepted_active : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
company_name : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
last_name : {
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
equalTo : "{{__('Please enter the same value again.')}}",
|
|
||||||
'email-confirm' : {
|
|
||||||
equalTo : "{{__('Please enter the same value again.')}}",
|
|
||||||
required: "{{__('This field is required.')}}",
|
|
||||||
},
|
|
||||||
email: {
|
|
||||||
required : "{{__('This field is required.')}}",
|
|
||||||
email: "{{ __('Please enter a valid email address.') }}",
|
|
||||||
remote : "{{ __('This E-mail is already in use.') }}"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onkeyup: false
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -12,16 +12,14 @@
|
||||||
<a href="{{ route('home') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-home"></i><div>{{__('Home')}}</div></a>
|
<a href="{{ route('home') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-home"></i><div>{{__('Home')}}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@if(Auth::user()->active == 1)
|
@if(Auth::user()->showSideNav())
|
||||||
|
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
|
||||||
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
|
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('Your Data') }}</div></a>
|
||||||
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('Your Data') }}</div></a>
|
</li>
|
||||||
</li>
|
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('user/shop') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('user/shop') ? ' active' : '' }}">
|
||||||
<a href="{{ route('user_shop') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-basket"></i><div>{{ __('Your Shop') }}</div></a>
|
<a href="{{ route('user_shop') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-basket"></i><div>{{ __('Your Shop') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(Auth::user()->isAdmin())
|
@if(Auth::user()->isAdmin())
|
||||||
|
|
@ -48,7 +46,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('admin/leads') ? ' active' : '' }} {{ Request::is('admin/lead/edit/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/leads') ? ' active' : '' }} {{ Request::is('admin/lead/edit/*') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Leads') }}</div></a>
|
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Berater') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
36
resources/views/status/user_blocked.blade.php
Executable file
36
resources/views/status/user_blocked.blade.php
Executable file
|
|
@ -0,0 +1,36 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
|
||||||
|
<div class="authentication-inner py-5">
|
||||||
|
|
||||||
|
<!-- Form -->
|
||||||
|
<div class="card">
|
||||||
|
<div class="p-4 p-sm-5">
|
||||||
|
<style>
|
||||||
|
.ui-icon {
|
||||||
|
width: 90px;
|
||||||
|
height: 90px;
|
||||||
|
font-size: 50px;
|
||||||
|
line-height: calc(90px - 4px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="text-primary mx-auto mb-4 text-center">
|
||||||
|
<span class="ui-icon font-weight-bolder">
|
||||||
|
<i class="ion ion-md-close" style="color: #e48800;"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center text-big mb-4"><strong>{{ __('Dein Account wurde gespeert') }}</strong></p>
|
||||||
|
|
||||||
|
<a href="{{route('logout')}}" class="btn btn-primary btn-block">{{ __('Logout') }}</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- / Form -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
@ -66,3 +66,95 @@
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="application/javascript">
|
||||||
|
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$.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
|
||||||
|
var message = 'Default error message';
|
||||||
|
$('#data-shop-form-validations').validate({
|
||||||
|
rules: {
|
||||||
|
'user_shop_name': {
|
||||||
|
required: true,
|
||||||
|
remote:
|
||||||
|
{
|
||||||
|
url: "{{ route('user_shop_name_check') }}",
|
||||||
|
type: "post",
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
user_shop_name: function()
|
||||||
|
{
|
||||||
|
return $('#data-shop-form-validations :input[name="user_shop_name"]').val();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
encode: true,
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
dataFilter: function(response) {
|
||||||
|
response = $.parseJSON(response);
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
if (response.success === true) return true;
|
||||||
|
else {
|
||||||
|
message = response.errors.user_shop_name;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
errorPlacement: function errorPlacement(error, element) {
|
||||||
|
$(element).parents('.form-group').find('.input-group').after(
|
||||||
|
error.addClass('invalid-feedback d-block font-weight-bold')
|
||||||
|
)
|
||||||
|
},
|
||||||
|
highlight: function (element) {
|
||||||
|
|
||||||
|
$(element).parent().find('button').removeClass('btn-success');
|
||||||
|
$(element).parent().find('button').addClass('btn-danger');
|
||||||
|
$(element).parent().find('button i').removeClass('fa-check');
|
||||||
|
$(element).parent().find('button i').addClass('fa-times');
|
||||||
|
|
||||||
|
$(element).removeClass('is-valid');
|
||||||
|
$(element).addClass('is-invalid');
|
||||||
|
},
|
||||||
|
unhighlight: function (element) {
|
||||||
|
$(element).removeClass('is-invalid');
|
||||||
|
$(element).addClass('is-valid');
|
||||||
|
|
||||||
|
$(element).parent().find('button').removeClass('btn-danger');
|
||||||
|
$(element).parent().find('button').addClass('btn-success');
|
||||||
|
$(element).parent().find('button i').removeClass('fa-times');
|
||||||
|
$(element).parent().find('button i').addClass('fa-check');
|
||||||
|
|
||||||
|
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
|
||||||
|
},
|
||||||
|
messages : {
|
||||||
|
required: "{{__('This field is required.')}}",
|
||||||
|
user_shop_name: {
|
||||||
|
email: "{{ __('Please enter a valid email address.') }}",
|
||||||
|
remote : function(){ return message; }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onkeyup: function(element) {$(element).valid()},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,62 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="custom-control custom-checkbox m-0">
|
<label class="custom-control custom-checkbox m-0">
|
||||||
<input type="checkbox" class="custom-control-input" name="accepted_data_protection" id="accepted_data_protection" required>
|
<input type="checkbox" class="custom-control-input" name="accepted_data_protection" id="accepted_data_protection" @if($user->account && $user->account->data_protection) checked="checked" @endif>
|
||||||
<span class="custom-control-label">{!! __('I have read the :link and accept it.*', ['link' => '<a href="#" class="update_modal_data_load" data-url="'.route('loading_modal').'" data-data="data_protection" data-target="#modal-loading">'.__('data protection').'</a>']) !!}</span>
|
<span class="custom-control-label">{!! __('I have read the :link and accept it.*', ['link' => '<a href="#" class="update_modal_data_load" data-url="'.route('loading_modal').'" data-data="data_protection" data-target="#modal-loading">'.__('data protection').'</a>']) !!}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="custom-control custom-checkbox m-0">
|
<label class="custom-control custom-checkbox m-0">
|
||||||
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" required>
|
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" @if($user->agreement) checked="checked" @endif required>
|
||||||
<span class="custom-control-label">{!! __('Declaration of consent') !!}</span>
|
<span class="custom-control-label">{!! __('Declaration of consent') !!}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="application/javascript">
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
// Set up validator
|
||||||
|
$('#lead-form-validation-confirm').validate({
|
||||||
|
rules: {
|
||||||
|
'accepted_data_protection': {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
'accepted_active': {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
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.')}}",
|
||||||
|
accepted_data_protection : {
|
||||||
|
required: "{{__('This field is required.')}}",
|
||||||
|
},
|
||||||
|
accepted_active : {
|
||||||
|
required: "{{__('This field is required.')}}",
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
onkeyup: false
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
{{ __('Kontakt verifizieren') }}
|
{{ __('Berater einladen') }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="custom-control custom-checkbox m-0">
|
<label class="custom-control custom-checkbox m-0">
|
||||||
<input type="checkbox" class="custom-control-input" name="contact_verify" id="contact_verify" checked>
|
<input type="checkbox" class="custom-control-input" name="contact_verify" id="contact_verify" checked>
|
||||||
<span class="custom-control-label"> {{ __('Kontakt anlegen und dem Kontakt eine E-Mail zur Verifizierung senden!') }}</span>
|
<span class="custom-control-label"> {{ __('Berater erstellen und eine E-Mail zur Einladung senden!') }}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,9 @@
|
||||||
{{ __('Your Data') }}
|
{{ __('Your Data') }}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
|
|
||||||
{!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
{!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||||
|
|
||||||
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
||||||
@include('user.form')
|
@include('user.form')
|
||||||
|
|
||||||
<div class="text-left mt-3">
|
<div class="text-left mt-3">
|
||||||
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>
|
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>
|
||||||
|
|
|
||||||
|
|
@ -1,89 +1,11 @@
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
{{ __('use') }}
|
{{ __('Rechnungsdaten') }}
|
||||||
</h5>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-label">{{ __('business or private') }}*</label>
|
|
||||||
<select class="selectpicker" name="company" id="company" data-style="btn-light" data-live-search="false" required, tabindex="0">
|
|
||||||
{!! HTMLHelper::getCompanyOptions($user->account->company) !!}
|
|
||||||
</select>
|
|
||||||
@if ($errors->has('company'))
|
|
||||||
<span class="help-block">
|
|
||||||
<strong>{{ $errors->first('company') }}</strong>
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card mb-4 show_company_holder">
|
|
||||||
<h5 class="card-header">
|
|
||||||
{{ __('Company data') }}
|
|
||||||
</h5>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="company_name" class="form-label">{{ __('Company name') }}*</label>
|
|
||||||
{{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-label" for="company_street">{{ __('Street') }} / {{ __('House number') }}</label>
|
|
||||||
{{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="form-group col-md-2">
|
|
||||||
<label class="form-label" for="company_postal_code">{{ __('Postcode') }}</label>
|
|
||||||
{{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-6">
|
|
||||||
<label class="form-label" for="company_city">{{ __('City') }}</label>
|
|
||||||
{{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-md-4 {{ $errors->has('company_country_id') ? 'has-error' : '' }}">
|
|
||||||
<label class="form-label">{{ __('Country') }}*</label>
|
|
||||||
<select class="selectpicker" name="company_country_id" id="company_country_id" data-style="btn-light" data-live-search="true" required tabindex="5">
|
|
||||||
{!! HTMLHelper::getContriesWithMore($user->account->company_country_id) !!}
|
|
||||||
</select>
|
|
||||||
@if ($errors->has('company_country_id'))
|
|
||||||
<span class="help-block">
|
|
||||||
<strong>{{ $errors->first('company_country_id') }}</strong>
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-row">
|
|
||||||
<div class="form-group col-md-4">
|
|
||||||
<label class="form-label" for="company_pre_phone_id">{{ __('Country code') }}</label>
|
|
||||||
<select class="selectpicker" name="company_pre_phone_id" id="company_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="19">
|
|
||||||
{!! HTMLHelper::getContriesCodes($user->account->company_pre_phone_id) !!}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-8">
|
|
||||||
<label class="form-label" for="company_phone">{{ __('Phone') }}</label>
|
|
||||||
{{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-label" for="company_homepage">{{ __('Homepage') }}</label>
|
|
||||||
{{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card mb-4">
|
|
||||||
<h5 class="card-header">
|
|
||||||
{{ __('Personal Data') }}
|
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label class="form-label">{{ __('Salutation') }}*</label>
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||||
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="10">
|
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="10">
|
||||||
|
|
@ -100,8 +22,8 @@
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label" for="first_name">{{ __('First name') }}</label>
|
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
||||||
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'tabindex' => 12)) }}
|
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 12)) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
@ -173,8 +95,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
@if(!isset($step))
|
||||||
@if($user->email)
|
@if($user->email)
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||||
|
|
@ -190,13 +112,9 @@
|
||||||
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
|
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
|
||||||
@endif
|
@endif
|
||||||
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
|
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
|
||||||
|
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
|
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
|
|
@ -210,10 +128,91 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('use') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">{{ __('business or private') }}*</label>
|
||||||
|
<select class="selectpicker" name="company" id="company" data-style="btn-light" data-live-search="false" required tabindex="0">
|
||||||
|
{!! HTMLHelper::getCompanyOptions($user->account->company) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('company'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('company') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mb-4 show_company_holder">
|
<div class="card mb-4 show_company_holder">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('Company data') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="company_name" class="form-label">{{ __('Company name') }}*</label>
|
||||||
|
{{ Form::text('company_name', $user->account->company_name, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="company_street">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||||
|
{{ Form::text('company_street', $user->account->company_street, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-2">
|
||||||
|
<label class="form-label" for="company_postal_code">{{ __('Postcode') }}</label>
|
||||||
|
{{ Form::text('company_postal_code', $user->account->company_postal_code, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="company_city">{{ __('City') }}</label>
|
||||||
|
{{ Form::text('company_city', $user->account->company_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4 {{ $errors->has('company_country_id') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Country') }}*</label>
|
||||||
|
<select class="selectpicker" name="company_country_id" id="company_country_id" data-style="btn-light" data-live-search="true" required tabindex="5">
|
||||||
|
{!! HTMLHelper::getContriesWithMore($user->account->company_country_id) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('company_country_id'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('company_country_id') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="company_pre_phone_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="company_pre_phone_id" id="company_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="19">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->company_pre_phone_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="company_phone">{{ __('Phone') }}</label>
|
||||||
|
{{ Form::text('company_phone', $user->account->company_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="company_homepage">{{ __('Homepage') }}</label>
|
||||||
|
{{ Form::text('company_homepage', $user->account->company_homepage, array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-4">
|
||||||
<h5 class="card-header">
|
<h5 class="card-header">
|
||||||
{{ __('weiteres') }}
|
{{ __('weiteres') }}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
@ -222,17 +221,17 @@
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="birthday" class="form-label">{{ __('birthday') }}</label>
|
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||||
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label class="form-label" for="website">{{ __('website') }}</label>
|
<label class="form-label" for="website">{{ __('Webseite') }}</label>
|
||||||
{{ Form::text('website', $user->account->website, array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}
|
{{ Form::text('website', $user->account->website, array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label class="form-label" for="instagram">{{ __('instagram') }}</label>
|
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
|
||||||
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
|
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -241,12 +240,12 @@
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label" for="facebook">{{ __('facebook') }}</label>
|
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
|
||||||
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
|
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label class="form-label" for="facebook_fanpage">{{ __('facebook_fanpage') }}</label>
|
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
|
||||||
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
|
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
30
resources/views/user/update_password_first_form.blade.php
Normal file
30
resources/views/user/update_password_first_form.blade.php
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{__('Create Password')}}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-form-label col-sm-2 text-sm-right">{{__('New Password')}}*</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}" type="password" name="password" placeholder="{{__('New Password')}}*" required>
|
||||||
|
@if ($errors->has('password'))
|
||||||
|
<span class="invalid-feedback" role="alert">
|
||||||
|
<strong>{{ $errors->first('password') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-form-label col-sm-2 text-sm-right">{{__('Confirm new Password')}}*</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input class="form-control" {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }} type="password" name="password_confirmation" placeholder="{{__('Confirm new Password')}}*" required>
|
||||||
|
@if ($errors->has('password_confirmation'))
|
||||||
|
<span class="invalid-feedback" role="alert">
|
||||||
|
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
458
resources/views/user/user_form.blade.php
Normal file
458
resources/views/user/user_form.blade.php
Normal file
|
|
@ -0,0 +1,458 @@
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('Rechnungsdaten') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<input type="hidden" name="user_id" value="{{$user->id}}">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
|
||||||
|
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('salutation') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
|
||||||
|
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('salutation'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('salutation') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
||||||
|
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
|
||||||
|
@if ($errors->has('first_name'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('first_name') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
|
||||||
|
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
|
||||||
|
@if ($errors->has('last_name'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('last_name') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}*</label>
|
||||||
|
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'address', 'tabindex' => 6)) }}
|
||||||
|
@if ($errors->has('address'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('address') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('address_2') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||||
|
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="zipcode">{{ __('Postcode') }}*</label>
|
||||||
|
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'zipcode', 'tabindex' => 7)) }}
|
||||||
|
@if ($errors->has('zipcode'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('zipcode') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="city">{{ __('City') }}*</label>
|
||||||
|
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'city', 'tabindex' => 8)) }}
|
||||||
|
@if ($errors->has('city'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('city') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4 {{ $errors->has('country_id') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Country') }}*</label>
|
||||||
|
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
|
||||||
|
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('country_id'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('country_id') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="phone">{{ __('Phone') }}</label>
|
||||||
|
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
|
||||||
|
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@if(!isset($step))
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
@if($user->email)
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||||
|
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 14)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
|
||||||
|
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 15)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@if(isset($can_change_mail))
|
||||||
|
@if(count($user->user_update_email) > 0)
|
||||||
|
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
|
||||||
|
@endif
|
||||||
|
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||||
|
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 14)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
|
||||||
|
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 15)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-4">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="tax_number">{{ __('Steuernummer') }}</label>
|
||||||
|
{{ Form::text('tax_number', $user->account->tax_number, array('placeholder'=>__('Steuernummer'), 'class'=>'form-control', 'id'=>'tax_number')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for=" tax_identification_number">{{ __('USt-ID Nummer') }}</label>
|
||||||
|
{{ Form::text(' tax_identification_number', $user->account-> tax_identification_number, array('placeholder'=>__('USt-ID Nummer'), 'class'=>'form-control', 'id'=>' tax_identification_number')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="custom-control custom-checkbox m-0">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="same_as_billing" id="same_as_billing" @if($user->account->same_as_billing) checked="checked" @endif>
|
||||||
|
<span class="custom-control-label">{{__('Versand an die gleiche Adresse')}}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-4" id="show_shipping_address" style="@if($user->account->same_as_billing) display:none @endif">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('Versand Adresse') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="shipping_company" class="form-label">{{ __('Company name') }} (optional)</label>
|
||||||
|
{{ Form::text('shipping_company', $user->account->shipping_company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'shipping_company', 'tabindex' => 16)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('shipping_salutation') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="shipping_salutation" id="shipping_salutation" required tabindex="17">
|
||||||
|
{!! HTMLHelper::getSalutation($user->account->shipping_salutation) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('shipping_salutation'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_salutation') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('shipping_firstname') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_firstname">{{ __('First name') }}*</label>
|
||||||
|
{{ Form::text('shipping_firstname', $user->account->shipping_firstname, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_firstname', 'tabindex' => 18)) }}
|
||||||
|
@if ($errors->has('shipping_firstname'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_firstname') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('shipping_lastname') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_lastname">{{ __('Last Name') }}*</label>
|
||||||
|
{{ Form::text('shipping_lastname', $user->account->shipping_lastname, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_lastname', 'tabindex' => 19)) }}
|
||||||
|
@if ($errors->has('shipping_lastname'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_lastname') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('shipping_address') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_address">{{ __('Street') }} / {{ __('House number') }}*</label>
|
||||||
|
{{ Form::text('shipping_address', $user->account->shipping_address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_address', 'tabindex' => 20)) }}
|
||||||
|
@if ($errors->has('shipping_address'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_address') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('shipping_address_2') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||||
|
{{ Form::text('shipping_address_2', $user->account->shipping_address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'shipping_address_2', 'tabindex' => 21)) }}
|
||||||
|
@if ($errors->has('shipping_address_2'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_address_2') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('shipping_zipcode') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_zipcode">{{ __('Postcode') }}*</label>
|
||||||
|
{{ Form::text('shipping_zipcode', $user->account->shipping_zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_zipcode', 'tabindex' => 22)) }}
|
||||||
|
@if ($errors->has('shipping_zipcode'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_zipcode') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 {{ $errors->has('shipping_city') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="shipping_city">{{ __('City') }}*</label>
|
||||||
|
{{ Form::text('shipping_city', $user->account->shipping_city, array('placeholder'=>__('City'), 'class'=>'form-control', 'required'=>true, 'id'=>'shipping_city', 'tabindex' => 23)) }}
|
||||||
|
@if ($errors->has('shipping_city'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_city') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4 {{ $errors->has('shipping_country_id') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Country') }}*</label>
|
||||||
|
<select class="selectpicker" name="shipping_country_id" id="shipping_country_id" data-style="btn-light" data-live-search="true" required tabindex="24">
|
||||||
|
{!! HTMLHelper::getContriesWithMore($user->account->shipping_country_id) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('shipping_country_id'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('shipping_country_id') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="shipping_pre_phone_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="shipping_pre_phone_id" id="shipping_pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="25">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->shipping_pre_phone_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="shipping_phone">{{ __('Phone') }}</label>
|
||||||
|
{{ Form::text('shipping_phone', $user->account->shipping_phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'shipping_phone', 'tabindex' => 26)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('weiteres') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||||
|
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="website">{{ __('Webseite') }}</label>
|
||||||
|
{{ Form::text('website', $user->account->website, array('placeholder'=>__('Webseite'), 'class'=>'form-control', 'id'=>'website')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="instagram">{{ __('Instagram') }}</label>
|
||||||
|
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('Instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="facebook">{{ __('Facebook') }}</label>
|
||||||
|
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('Facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
|
||||||
|
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('Facebook Fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.datepicker-birthday').datepicker({
|
||||||
|
todayBtn: 'linked',
|
||||||
|
daysOfWeekDisabled: '1',
|
||||||
|
multidate: false,
|
||||||
|
daysOfWeekHighlighted: '0,6',
|
||||||
|
autoclose: true,
|
||||||
|
format: 'dd.mm.yyyy',
|
||||||
|
language: 'de',
|
||||||
|
clearBtn: true,
|
||||||
|
startView: 2,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$.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
|
||||||
|
$('#lead-form-validation').validate({
|
||||||
|
rules: {
|
||||||
|
'email': {
|
||||||
|
required: true,
|
||||||
|
email: true,
|
||||||
|
remote:
|
||||||
|
{
|
||||||
|
url: "{{ route('user_check_mail') }}",
|
||||||
|
type: "post",
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
user_id: function()
|
||||||
|
{
|
||||||
|
return $('#lead-form-validation :input[name="user_id"]').val();
|
||||||
|
},
|
||||||
|
email: function()
|
||||||
|
{
|
||||||
|
return $('#lead-form-validation :input[name="email"]').val();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
encode: true,
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'email-confirm': {
|
||||||
|
required: true,
|
||||||
|
equalTo: "#email"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
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.')}}",
|
||||||
|
},
|
||||||
|
equalTo : "{{__('Please enter the same value again.')}}",
|
||||||
|
'email-confirm' : {
|
||||||
|
equalTo : "{{__('Please enter the same value again.')}}",
|
||||||
|
required: "{{__('This field is required.')}}",
|
||||||
|
},
|
||||||
|
email: {
|
||||||
|
required : "{{__('This field is required.')}}",
|
||||||
|
email: "{{ __('Please enter a valid email address.') }}",
|
||||||
|
remote : "{{ __('This E-mail is already in use.') }}"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onkeyup: false
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
254
resources/views/user/user_new_form.blade.php
Normal file
254
resources/views/user/user_new_form.blade.php
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h5 class="card-header">
|
||||||
|
{{ __('Rechnungsdaten') }}
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<input type="hidden" name="user_id" value="{{$user->id}}">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-12">
|
||||||
|
<label for="company" class="form-label">{{ __('Company name') }} (optional)</label>
|
||||||
|
{{ Form::text('company', $user->account->company, array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company', 'tabindex' => 1)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('salutation') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="2">
|
||||||
|
{!! HTMLHelper::getSalutation($user->account->salutation) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('salutation'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('salutation') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
||||||
|
{{ Form::text('first_name', $user->account->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 4)) }}
|
||||||
|
@if ($errors->has('first_name'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('first_name') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-5 {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
|
||||||
|
{{ Form::text('last_name', $user->account->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 5)) }}
|
||||||
|
@if ($errors->has('last_name'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('last_name') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="address">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||||
|
{{ Form::text('address', $user->account->address, array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'address', 'tabindex' => 6)) }}
|
||||||
|
@if ($errors->has('address'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('address') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group {{ $errors->has('address_2') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="address_2">{{ __('Wohnung / Gebäude (optional)') }}</label>
|
||||||
|
{{ Form::text('address_2', $user->account->address_2, array('placeholder'=>__('Wohnung / Gebäude (optional)'), 'class'=>'form-control', 'id'=>'address_2', 'tabindex' => 6)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-2 {{ $errors->has('zipcode') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="zipcode">{{ __('Postcode') }}</label>
|
||||||
|
{{ Form::text('zipcode', $user->account->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'zipcode', 'tabindex' => 7)) }}
|
||||||
|
@if ($errors->has('zipcode'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('zipcode') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6 {{ $errors->has('city') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label" for="city">{{ __('City') }}</label>
|
||||||
|
{{ Form::text('city', $user->account->city, array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'city', 'tabindex' => 8)) }}
|
||||||
|
@if ($errors->has('city'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('city') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4 {{ $errors->has('country_id') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Country') }}*</label>
|
||||||
|
<select class="selectpicker" name="country_id" id="country_id" data-style="btn-light" data-live-search="true" required tabindex="9">
|
||||||
|
{!! HTMLHelper::getContriesWithMore($user->account->country_id) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('country_id'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('country_id') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="pre_phone_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="pre_phone_id" id="pre_phone_id" data-style="btn-light" data-live-search="true" tabindex="10">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="phone">{{ __('Phone') }}</label>
|
||||||
|
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
|
||||||
|
<select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id" data-style="btn-light" data-live-search="true" tabindex="12">
|
||||||
|
{!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-8">
|
||||||
|
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
|
||||||
|
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||||
|
{{ Form::text('email', $user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'required'=>true, 'id'=>'email', 'tabindex' => 14)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}*</label>
|
||||||
|
{{ Form::text('email-confirm', $user->email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'required'=>true, 'id'=>'email-confirm', 'tabindex' => 15)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ Form::hidden('same_as_billing', 1) }}
|
||||||
|
|
||||||
|
<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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.datepicker-birthday').datepicker({
|
||||||
|
todayBtn: 'linked',
|
||||||
|
daysOfWeekDisabled: '1',
|
||||||
|
multidate: false,
|
||||||
|
daysOfWeekHighlighted: '0,6',
|
||||||
|
autoclose: true,
|
||||||
|
format: 'dd.mm.yyyy',
|
||||||
|
language: 'de',
|
||||||
|
clearBtn: true,
|
||||||
|
startView: 2,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$.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
|
||||||
|
$('#lead-form-validation').validate({
|
||||||
|
rules: {
|
||||||
|
'email': {
|
||||||
|
required: true,
|
||||||
|
email: true,
|
||||||
|
remote:
|
||||||
|
{
|
||||||
|
url: "{{ route('user_check_mail') }}",
|
||||||
|
type: "post",
|
||||||
|
data:
|
||||||
|
{
|
||||||
|
user_id: function()
|
||||||
|
{
|
||||||
|
return $('#lead-form-validation :input[name="user_id"]').val();
|
||||||
|
},
|
||||||
|
email: function()
|
||||||
|
{
|
||||||
|
return $('#lead-form-validation :input[name="email"]').val();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
encode: true,
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'email-confirm': {
|
||||||
|
required: true,
|
||||||
|
equalTo: "#email"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
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.')}}",
|
||||||
|
},
|
||||||
|
equalTo : "{{__('Please enter the same value again.')}}",
|
||||||
|
'email-confirm' : {
|
||||||
|
equalTo : "{{__('Please enter the same value again.')}}",
|
||||||
|
required: "{{__('This field is required.')}}",
|
||||||
|
},
|
||||||
|
email: {
|
||||||
|
required : "{{__('This field is required.')}}",
|
||||||
|
email: "{{ __('Please enter a valid email address.') }}",
|
||||||
|
remote : "{{ __('This E-mail is already in use.') }}"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onkeyup: false
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
188
resources/views/user/wizard/show.blade.php
Normal file
188
resources/views/user/wizard/show.blade.php
Normal file
|
|
@ -0,0 +1,188 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-2 mb-2">
|
||||||
|
{{ __('Registrierung abschließen') }}
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div id="smartwizard-3" class="smartwizard-register">
|
||||||
|
<ul class="card px-4 pt-3 mb-3">
|
||||||
|
<li>
|
||||||
|
<a href="#smartwizard-3-step-1" class="mb-3">
|
||||||
|
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||||
|
<span class="sw-number">1</span>
|
||||||
|
Datenschutz
|
||||||
|
<div class="text-muted small">zustimmen</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#smartwizard-3-step-2" class="mb-3">
|
||||||
|
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||||
|
<span class="sw-number">2</span>
|
||||||
|
Passwort
|
||||||
|
<div class="text-muted small">vergeben</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#smartwizard-3-step-3" class="mb-3">
|
||||||
|
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||||
|
<span class="sw-number">3</span>
|
||||||
|
Daten
|
||||||
|
<div class="text-muted small">anpassen</div>
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#smartwizard-3-step-4" class="mb-3">
|
||||||
|
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||||
|
<span class="sw-number">4</span>
|
||||||
|
Paket
|
||||||
|
<div class="text-muted small">auswählen</div>
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#smartwizard-3-step-5" class="mb-3">
|
||||||
|
<span class="sw-done-icon ion ion-md-checkmark"></span>
|
||||||
|
<span class="sw-number">5</span>
|
||||||
|
Registrierung
|
||||||
|
<div class="text-muted small">abgeschlossen</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<div id="smartwizard-3-step-1" class="card animated fadeIn">
|
||||||
|
<div class="card-body">
|
||||||
|
{!! Form::open(['url' => route('wizard_store', [0]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation-confirm']) !!}
|
||||||
|
@include('user.data_confirm')
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" class="btn btn-secondary">{{ __('zustimmen und weiter') }}</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="smartwizard-3-step-2" class="card animated fadeIn">
|
||||||
|
<div class="card-body">
|
||||||
|
@if(!$user->isPasswort())
|
||||||
|
{!! Form::open(['url' => route('wizard_store', [1])]) !!}
|
||||||
|
@include('user.update_password_first_form')
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" class="btn btn-secondary">{{ __('erstellen und weiter') }}</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
@else
|
||||||
|
{!! Form::open(['url' => route('wizard_store', [1])]) !!}
|
||||||
|
<p>Passwort wurde bereits erstellt.</p>
|
||||||
|
<button type="submit" class="btn btn-secondary">{{ __('weiter') }}</button>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="smartwizard-3-step-3" class="card animated fadeIn">
|
||||||
|
<div class="card-body">
|
||||||
|
{!! Form::open(['url' => route('wizard_store', [2]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||||
|
@include('user.user_form')
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" class="btn btn-secondary">{{ __('speichern und weiter') }}</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="smartwizard-3-step-4" class="card animated fadeIn">
|
||||||
|
<div class="card-body">
|
||||||
|
{!! Form::open(['url' => route('wizard_store', [3]), 'class' => 'form-horizontal']) !!}
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table- m-0">
|
||||||
|
<tbody>
|
||||||
|
<div class="switchers-stacked">
|
||||||
|
@php($counter = 1)
|
||||||
|
@foreach($products as $product)
|
||||||
|
<tr>
|
||||||
|
<td class="text-center align-middle px-0">
|
||||||
|
<label class="switcher switcher-secondary">
|
||||||
|
<input type="radio" class="switcher-input" value="{{$product->id}}" name="switchers-package-wizard" @if($counter == 2) checked @endif >
|
||||||
|
<span class="switcher-indicator">
|
||||||
|
<span class="switcher-yes"></span>
|
||||||
|
<span class="switcher-no"></span>
|
||||||
|
</span>
|
||||||
|
<span class="switcher-label"></span>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td class="p-4">
|
||||||
|
<div class="media align-items-center">
|
||||||
|
@if(count($product->images))
|
||||||
|
<img src="{{ route('product_image', [$product->images->first()->slug]) }}" class="d-block ui-w-60 ui-bordered mr-4" alt="">
|
||||||
|
@endif
|
||||||
|
<div class="media-body">
|
||||||
|
<h5 class="d-block text-dark">{{$product->name}}</h5>
|
||||||
|
{!! $product->getLang('copy') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="text-right font-weight-semibold align-middle p-4">{{$product->getFormattedPrice()}} EUR / p.a.</td>
|
||||||
|
</tr>
|
||||||
|
@php($counter++)
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||||
|
<br><br>
|
||||||
|
<em class="small text-center"> <i class="fa fa-lock"></i> Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="smartwizard-3-step-5" class="card animated fadeIn">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4>Vielen Dank,</h4>
|
||||||
|
<p>Deine Registrierung ist abgeschlossen!</p>
|
||||||
|
<p>Sobald die Zahlung bei uns eingegangen ist, erhälst du automatisch eine E-Mail und dein Account wird freigeschaltet.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ mix('/vendor/libs/smartwizard/smartwizard.css') }}">
|
||||||
|
<script src="{{ mix('/vendor/libs/smartwizard/smartwizard.js') }}"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('.smartwizard-register').smartWizard({
|
||||||
|
autoAdjustHeight: true,
|
||||||
|
backButtonSupport: true,
|
||||||
|
useURLhash: false,
|
||||||
|
showStepURLhash: false,
|
||||||
|
selected: '{{$step}}',
|
||||||
|
toolbarSettings: {
|
||||||
|
showNextButton: false,
|
||||||
|
showPreviousButton: false,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -99,35 +99,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<!-- -->
|
|
||||||
<!-- CART -->
|
|
||||||
<!-- CHECKOUT -->
|
|
||||||
<section>
|
<section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{-- @if ($errors->any())
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
<ul>
|
|
||||||
@foreach ($errors->all() as $error)
|
|
||||||
<li>{{ $error }}</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
--}}
|
|
||||||
{{--
|
|
||||||
<!-- NOT LOGGED IN -->
|
|
||||||
<!-- <div class="mb-30 box-border-shadow p-20">
|
|
||||||
<strong>You are not logged in!</strong>
|
|
||||||
Please, <a href="pack-megashop-sign-in.html">login</a> or <a href="javascript:;" onclick="jQuery('#accountswitch').trigger('click'); _scrollTo('#newaccount', 200);">create an account</a> for later use.
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
<!-- /NOT LOGGED IN -->
|
|
||||||
--}}<!-- CHECKOUT -->
|
|
||||||
|
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
|
|
@ -158,9 +132,6 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="m-checkout">
|
<div class="m-checkout">
|
||||||
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'']) !!}
|
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'']) !!}
|
||||||
<div class="col-lg-7 col-sm-7">
|
<div class="col-lg-7 col-sm-7">
|
||||||
|
|
@ -317,7 +288,7 @@
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12">
|
<div class="col-md-12 col-sm-12">
|
||||||
<label class="mt-0 fs-14 fw-400" for="shipping_company">Firmenname (optional)</label>
|
<label class="mt-0 fs-14 fw-400" for="shipping_company">Firmenname (optional)</label>
|
||||||
{!! Form::text('shipping_company', $shopping_user->shipping_company, ['class' => 'form-control', 'id'=>'billing_company']) !!}
|
{!! Form::text('shipping_company', $shopping_user->shipping_company, ['class' => 'form-control', 'id'=>'shipping_company']) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
@if(Util::isCheckout())
|
@if(Util::isCheckout())
|
||||||
@if(isset($order_reference))
|
@if(isset($order_reference))
|
||||||
<h3>
|
<h3>
|
||||||
<a href="{{ Util::getUserShopBackUrl('') }}" rel="nofollow" class="btn btn-primary btn-lg">zurück zum Shop</a>
|
<a href="{{ Util::getUserShopBackUrl($order_reference) }}" rel="nofollow" class="btn btn-primary btn-lg">zurück zum Shop</a>
|
||||||
</h3>
|
</h3>
|
||||||
@else
|
@else
|
||||||
<h3>
|
<h3>
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
<h4 class="letter-spacing-1"> </h4>
|
<h4 class="letter-spacing-1"> </h4>
|
||||||
|
|
||||||
@if(isset($order_reference))
|
@if(isset($order_reference))
|
||||||
<a href="{{ Util::getUserShopBackUrl('') }}">
|
<a href="{{ Util::getUserShopBackUrl($order_reference) }}">
|
||||||
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
@if(Util::isCheckout())
|
@if(Util::isCheckout())
|
||||||
|
|
||||||
@if(isset($order_reference))
|
@if(isset($order_reference))
|
||||||
<a class="logo pull-left" href="{{ Util::getUserShopBackUrl('/') }}">
|
<a class="logo pull-left" href="{{ Util::getUserShopBackUrl($order_reference) }}">
|
||||||
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
|
<img class="fixed_top" src="/assets/images/logo_mivita.png" alt="mivita" />
|
||||||
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
|
<img class="fixed_scroll" src="/assets/images/logo_mivita_fixed.png" alt="mivita" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
<ul id="topMain" class="nav nav-pills nav-main nav-onepage">
|
<ul id="topMain" class="nav nav-pills nav-main nav-onepage">
|
||||||
<li class="">
|
<li class="">
|
||||||
@if(isset($order_reference))
|
@if(isset($order_reference))
|
||||||
<a href="{{ Util::getUserShopBackUrl('') }}">
|
<a href="{{ Util::getUserShopBackUrl($order_reference) }}">
|
||||||
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,8 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
||||||
Route::get('/imprint', 'HomeController@legalImprint')->name('imprint');
|
Route::get('/imprint', 'HomeController@legalImprint')->name('imprint');
|
||||||
Route::post('/loading/modal', 'HomeController@loadingModal')->name('loading_modal');
|
Route::post('/loading/modal', 'HomeController@loadingModal')->name('loading_modal');
|
||||||
Route::get('/', 'HomeController@index')->name('home');
|
Route::get('/', 'HomeController@index')->name('home');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/user/update_email_confirm/{token}', 'UserUpdateEmailController@activateMail')->name('user_update_email_confirm');
|
Route::get('/user/update_email_confirm/{token}', 'UserUpdateEmailController@activateMail')->name('user_update_email_confirm');
|
||||||
Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail');
|
Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail');
|
||||||
|
|
||||||
|
|
@ -107,9 +109,21 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
||||||
Route::get('/status/error', 'HomeController@statusError')->name('status_error');
|
Route::get('/status/error', 'HomeController@statusError')->name('status_error');
|
||||||
Route::get('/status/not/found', 'HomeController@notFound')->name('not_found');
|
Route::get('/status/not/found', 'HomeController@notFound')->name('not_found');
|
||||||
|
|
||||||
|
Route::get('/card/show', 'HomeController@index')->name('my.card_show');
|
||||||
|
Route::get('/back/to/shop/{reference?}', 'HomeController@backToShop')->name('my.back_to_shop');
|
||||||
|
|
||||||
Route::group(['middleware' => ['auth']], function()
|
|
||||||
|
Route::group(['middleware' => ['auth']], function() {
|
||||||
|
Route::get('/user_blocked', 'HomeController@blocked')->name('user_blocked');
|
||||||
|
Route::get('/wizard/{step?}', 'WizardController@show')->name('wizard');
|
||||||
|
Route::post('/wizard/store/{step?}', 'WizardController@store')->name('wizard_store');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Route::group(['middleware' => ['auth:user']], function()
|
||||||
{
|
{
|
||||||
|
|
||||||
Route::get('storage/{type?}/{file?}', function($type = null, $file = null)
|
Route::get('storage/{type?}/{file?}', function($type = null, $file = null)
|
||||||
{
|
{
|
||||||
if($type == 'xls'){
|
if($type == 'xls'){
|
||||||
|
|
@ -124,7 +138,6 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
||||||
|
|
||||||
Route::get('/home', 'HomeController@show')->name('home');
|
Route::get('/home', 'HomeController@show')->name('home');
|
||||||
|
|
||||||
|
|
||||||
/* Route::get('/user/edit', 'UserController@userEdit')->name('user_edit');
|
/* Route::get('/user/edit', 'UserController@userEdit')->name('user_edit');
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
@ -233,6 +246,9 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
||||||
|
|
||||||
Route::domain(config('app.checkout_url').config('app.domain'))->group(function () {
|
Route::domain(config('app.checkout_url').config('app.domain'))->group(function () {
|
||||||
|
|
||||||
|
Route::get('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||||
|
Route::post('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||||
|
|
||||||
Route::group(['middleware' => ['checkout']], function() {
|
Route::group(['middleware' => ['checkout']], function() {
|
||||||
|
|
||||||
Route::get('/checkout/card/{identifier?}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
|
Route::get('/checkout/card/{identifier?}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
|
||||||
|
|
@ -243,15 +259,6 @@ Route::domain(config('app.checkout_url').config('app.domain'))->group(function (
|
||||||
|
|
||||||
Route::get('/transaction/approved/{transactionId}/{reference}', 'Web\CheckoutController@transactionApproved')->name('checkout.transaction_approved');
|
Route::get('/transaction/approved/{transactionId}/{reference}', 'Web\CheckoutController@transactionApproved')->name('checkout.transaction_approved');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
|
||||||
Route::post('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -273,7 +280,7 @@ Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
|
||||||
Route::post('/card/update', 'Web\CardController@updateCard')->name('user.card_update');
|
Route::post('/card/update', 'Web\CardController@updateCard')->name('user.card_update');
|
||||||
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
||||||
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
||||||
Route::get('/back/to/shop', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
Route::get('/back/to/shop/{reference?}', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
||||||
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site');
|
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue