@extends('Shared.Layouts.MasterWithoutMenus')

@section('title')
    @lang("Organiser.create_organiser")
@stop

@section('head')
    <style>
        .modal-header {
            background-color: transparent !important;
            color: #666 !important;
            text-shadow: none !important;
        }
        /* Create Organiser page: wider panel, TamashaTix styling */
        .panel-create-organiser {
            max-width: 680px !important;
            width: 100% !important;
        }
        .panel-create-organiser .logo-text {
            font-size: 32px;
            font-weight: 800;
            letter-spacing: -0.5px;
            color: #8B5CF6;
            margin: 0;
        }
        .panel-create-organiser .logo-text .tix { color: #FF6B35; }
        .panel-create-organiser .logo-tagline {
            font-size: 13px;
            color: #666;
            margin-top: 4px;
        }
        .panel-create-organiser h2 {
            margin-bottom: 24px;
            font-size: 20px;
            letter-spacing: 2px;
            color: #374151;
        }
        .panel-create-organiser .form-group {
            margin-bottom: 20px;
        }
        .panel-create-organiser .form-control {
            border-radius: 8px;
            border: 2px solid #e5e7eb;
            padding: 10px 14px;
        }
        .panel-create-organiser .form-control:focus {
            border-color: #8B5CF6;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
        }
        .panel-create-organiser .input-group-addon {
            border-radius: 8px 0 0 8px;
            border: 2px solid #e5e7eb;
            background: #f9fafb !important;
            color: #6b7280;
        }
        .panel-create-organiser .input-group .form-control {
            border-radius: 0 8px 8px 0;
        }
        .panel-create-organiser .control-label { font-weight: 600; color: #374151; }
        .panel-create-organiser .tax-options label { font-weight: 500; margin-right: 16px; cursor: pointer; }
        .panel-create-organiser .tax-options input[type="radio"] { margin-right: 6px; accent-color: #8B5CF6; }
        .panel-create-organiser #tax_fields { margin-top: 12px; }
        .panel-create-organiser .btn-success {
            background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
            border: none;
            padding: 14px;
            font-size: 16px;
            font-weight: 600;
            border-radius: 8px;
            margin-top: 8px;
            transition: all 0.3s ease;
        }
        .panel-create-organiser .btn-success:hover {
            background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
        }
        .panel-create-organiser .alert-info {
            border-radius: 8px;
            border-color: #c4b5fd;
            background: #f5f3ff;
        }
        .panel-create-organiser textarea.form-control {
            min-height: 100px;
            resize: vertical;
        }
    </style>
    @include('ManageOrganiser.Partials.OrganiserCreateAndEditJS')
@stop

@section('content')
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-create-organiser">
                <div class="panel-body">
                    <div class="logo">
                        <h1 class="logo-text">Tamasha<span class="tix">Tix</span></h1>
                        <p class="logo-tagline">Tiketi Yako, Tamasha Yako!</p>
                    </div>
                    <h2>@lang("Organiser.create_organiser")</h2>

                    {!! Form::open(array('url' => route('postCreateOrganiser'), 'class' => 'ajax')) !!}
                    @if(@$_GET['first_run'] == '1')
                        <div class="alert alert-info">
                            @lang("Organiser.create_organiser_text")
                        </div>
                    @endif

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                {!! Form::label('name', trans("Organiser.organiser_name"), array('class'=>'required control-label ')) !!}
                                {!!  Form::text('name', old('name'),
                                            array(
                                            'class'=>'form-control'
                                            ))  !!}
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                {!! Form::label('email', trans("Organiser.organiser_email"), array('class'=>'control-label required')) !!}
                                {!!  Form::text('email', old('email'),
                                            array(
                                            'class'=>'form-control ',
                                            'placeholder'=>trans("Organiser.organiser_email_placeholder")
                                            ))  !!}
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        {!! Form::label('about', trans("Organiser.organiser_description"), array('class'=>'control-label')) !!}
                        {!!  Form::textarea('about', old('about'),
                                    array(
                                    'class'=>'form-control editable',
                                    'placeholder'=>trans("Organiser.organiser_description_placeholder"),
                                    'rows' => 4
                                    ))  !!}
                    </div>
                    <div class="form-group">
                        <p class="control-label">{!! trans("Organiser.organiser_tax_prompt") !!}</p>
                        <div class="tax-options">
                            {!! Form::label('charge_yes', 'Yes', array('class'=>'control-label')) !!}
                            {{ Form::radio('charge_tax', '1', false, ['id' => 'charge_yes']) }}
                            {!! Form::label('charge_no', 'No', array('class'=>'control-label')) !!}
                            {{ Form::radio('charge_tax', '0', true, ['id' => 'charge_no']) }}
                        </div>
                    </div>

                    <div id="tax_fields" class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                {!! Form::label('tax_id', trans("Organiser.organiser_tax_id"), array('class'=>'control-label')) !!}
                                {!! Form::text('tax_id', old('tax_id'), array('class'=>'form-control', 'placeholder'=>'Tax ID'))  !!}
                            </div>
                        </div>

                        <div class="col-md-3">
                            <div class="form-group">
                                {!! Form::label('tax_name', trans("Organiser.organiser_tax_name"), array('class'=>'control-label')) !!}
                                {!! Form::text('tax_name', old('tax_name'), array('class'=>'form-control', 'placeholder'=>'Tax name'))  !!}
                            </div>
                        </div>

                        <div class="col-md-3">
                            <div class="form-group">
                                {!! Form::label('tax_value', trans("Organiser.organiser_tax_value"), array('class'=>'control-label')) !!}
                                {!! Form::text('tax_value', old('tax_value'), array('class'=>'form-control', 'placeholder'=>'Tax Value'))  !!}
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                {!! Form::label('facebook', trans("Organiser.organiser_facebook"), array('class'=>'control-label ')) !!}

                                <div class="input-group">
                                    <span class="input-group-addon">facebook.com/</span>
                                    {!!  Form::text('facebook', old('facebook'),
                                                    array(
                                                    'class'=>'form-control ',
                                                    'placeholder'=>trans("Organiser.organiser_username_facebook_placeholder")
                                                    ))  !!}
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                {!! Form::label('twitter', trans("Organiser.organiser_twitter"), array('class'=>'control-label ')) !!}

                                <div class="input-group">
                                    <span class="input-group-addon">twitter.com/</span>
                                    {!!  Form::text('twitter', old('twitter'),
                                             array(
                                             'class'=>'form-control ',
                                                    'placeholder'=>trans("Organiser.organiser_username_twitter_placeholder")
                                             ))  !!}
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        {!! Form::label('organiser_logo', trans("Organiser.organiser_logo"), array('class'=>'control-label ')) !!}
                        {!! Form::styledFile('organiser_logo') !!}
                    </div>

                    {!! Form::submit(trans("Organiser.create_organiser"), ['class'=>" btn-block btn btn-success"]) !!}
                    {!! Form::close() !!}
                </div>
            </div>
        </div>
    </div>
@stop
