JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "membersedit.blade.php"

Full Path: /var/www/lionsclub/core/resources/views/dashboard/topics/membersedit.blade.php
File size: 23.55 KB
MIME-type: text/html
Charset: utf-8

@extends('dashboard.layouts.master')
<?php
$title_var = "title_" . @Helper::currentLanguage()->code;
$title_var2 = "title_" . env('DEFAULT_LANGUAGE');
if ($WebmasterSection->$title_var != "") {
    $WebmasterSectionTitle = $WebmasterSection->$title_var;
} else {
    $WebmasterSectionTitle = $WebmasterSection->$title_var2;
}
?>
@section('title', $WebmasterSectionTitle)
@push("after-styles")
    <link rel="stylesheet" href="{{ asset('assets/dashboard/js/datatables/datatables.min.css') }}">
 <!-- css for summernote -->
 <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote.min.css" rel="stylesheet">
    
 <!-- css for summernote -->
@endpush
@section('content')
<style>
.summernote {
    width: 100%; /* Adjust width as needed */
}
</style>
    <div class="padding">
        <div class="box">   
        <div  class="box-body">
            <form action="{{ route('membersUpdate', $member->id) }}" method="POST" enctype="multipart/form-data">
                    @csrf
                    @method('PUT')

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Full Name</label>
                        <div class="col-sm-10"> 
                            <input type="text" class="form-control" id="full_name" name="full_name" value="{{ $member->full_name }}" required>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Full Address</label>
                        <div class="col-sm-10"> 
                            <input type="text" class="form-control" id="full_address" name="full_address" value="{{ $member->full_address }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Mobile Numbers</label>
                        <div class="col-sm-10"> 
                         <input type="text" class="form-control" id="mobile_numbers" name="mobile_numbers" value="{{ $member->mobile_numbers }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                    <label class="col-sm-2 form-control-label">Position</label>
                    <div class="col-sm-10">
                        <!-- <input type="checkbox" id="toggleInput" name="toggleInput" onclick="toggleInputBox()"> Use custom input -->
                        <select id="positionDropdown" name="position" class="form-control has-value">
                            <option value="">-- Select Position --</option> 
                            <option value="District Governors" {{ $member->position == 'District Governors' ? 'selected' : '' }}>District Governors</option>
                            <option value="First Vice District Governors" {{ $member->position == 'First Vice District Governors' ? 'selected' : '' }}>First Vice District Governors</option>
                            <option value="Council Chair Person" {{ $member->position == 'Council Chair Person' ? 'selected' : '' }}>Council Chair Person</option>
                            <option value="Second Vice District Governors" {{ $member->position == 'Second Vice District Governors' ? 'selected' : '' }}>Second Vice District Governor</option>
                            <option value="Past District Governor" {{ $member->position == 'Past District Governor' ? 'selected' : '' }}>Past District Governor</option>
                            <option value="International Executive Officers" {{ $member->position == 'International Executive Officers' ? 'selected' : '' }}>International Executive Officers</option>
                            <option value="Lions Council of India Executive" {{ $member->position == 'Lions Council of India Executive' ? 'selected' : '' }}>Lions Council of India Executive</option>
                            <option value="LCI Board of Director" {{ $member->position == 'LCI Board of Director' ? 'selected' : '' }}>LCI Board of Director</option>
                            <option value="LCI Board of Director Appointees" {{ $member->position == 'LCI Board of Director Appointees' ? 'selected' : '' }}>LCI Board of Director Appointees</option>
                            <option value="LEO Lion Board Liaisons" {{ $member->position == 'LEO Lion Board Liaisons' ? 'selected' : '' }}>LEO Lion Board Liaisons</option>
                            <option value="LCI Board of Trustees - ISAME" {{ $member->position == 'LCI Board of Trustees - ISAME' ? 'selected' : '' }}>LCI Board of Trustees - ISAME</option>
                            <option value="LCIF Board of Trustees Appointees" {{ $member->position == 'LCIF Board of Trustees Appointees' ? 'selected' : '' }}>LCIF Board of Trustees Appointees</option>
                            <option value="LCIF Board of Trustees" {{ $member->position == 'LCIF Board of Trustees' ? 'selected' : '' }}>LCIF Board of Trustees</option>
                            <option value="LCI Board of directors - ISAME" {{ $member->position == 'LCI Board of directors - ISAME' ? 'selected' : '' }}>LCI Board of directors - ISAME</option>
                            <option value="Past International Presidents from isame" {{ $member->position == 'Past International Presidents from isame' ? 'selected' : '' }}>Past International Presidents from isame</option>
                            <option value="Past International Presidents-Heavenly Abode" {{ $member->position == 'Past International Presidents-Heavenly Abode' ? 'selected' : '' }}>Past International Presidents-Heavenly Abode</option>
                            <option value="International Directors from ISAME" {{ $member->position == 'International Directors from ISAME' ? 'selected' : '' }}>International Directors from ISAME</option>
                            <option value="Excecutive Officers - ISAME" {{ $member->position == 'Excecutive Officers - ISAME' ? 'selected' : '' }}>Excecutive Officers - ISAME</option>
                            <option value="International Directors from INDIA" {{ $member->position == 'International Directors from INDIA' ? 'selected' : '' }}>International Directors from INDIA</option>
                            <option value="Past International Directors from INDIA" {{ $member->position == 'Past International Directors from INDIA' ? 'selected' : '' }}>Past International Directors from INDIA</option>
                            <option value="Global Action Team" {{ $member->position == 'Global Action Team' ? 'selected' : '' }}>Global Action Team</option>
                            <option value="ISAME Contact" {{ $member->position == 'ISAME Contact' ? 'selected' : '' }}>ISAME Contact</option>
                            <option value="GAT Constitutional Area Leaders" {{ $member->position == 'GAT Constitutional Area Leaders' ? 'selected' : '' }}>GAT Constitutional Area Leaders</option>
                            <option value="Lions Club International Foundation" {{ $member->position == 'Lions Club International Foundation' ? 'selected' : '' }}>Lions Club International Foundation</option>
                            <option value="Constitutional Area Leaders" {{ $member->position == 'Constitutional Area Leaders' ? 'selected' : '' }}>Constitutional Area Leaders</option>
                        </select>
                        <input type="text" id="positionText" name="custom_position" class="form-control has-value" style="display: none;" value="{{ old('custom_position', $member->custom_position) }}">
                    </div>
                </div>
                    <div class="form-group row">
                    <label class="col-sm-2 form-control-label">Position Category</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control has-value" id="category" name="category" value="{{ old('category', $member->category) }}" >
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 form-control-label">Slogan</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control has-value" id="slogan" name="slogan" value="{{ old('slogan', $member->slogan) }}" >
                    </div>
                </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Start Date</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="start_date" name="start_date" 
                                value="{{ $member->start_date ?  $member->start_date : old('start_date') }}" 
                                placeholder="dd/mm/yyyy">
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">End Date</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="end_date" name="end_date" 
                                value="{{ $member->end_date ?  $member->end_date : old('end_date') }}" 
                                placeholder="dd/mm/yyyy">
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Member Id</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="memberid" name="memberid" 
                                value="{{ $member->memberid ?? old('memberid') }}">
                        </div>
                    </div>

                    <div class="form-group row">
                    <label class="col-sm-2 form-control-label">Description</label>
                    <div class="col-sm-10">
                    <textarea class="form-control has-value summernote" id="description" name="description" placeholder="" dir="ltr" rows="5">{{ old('description', $member->description) }}</textarea>

                    </div>
                </div>

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">District</label>
                        <div class="col-sm-10"> 
                            <input type="text" class="form-control" id="district" name="district" value="{{ $member->district }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Email</label>
                        <div class="col-sm-10">
                         <input type="text" class="form-control has-value" id="email" name="email_id" value="{{ $member->email_id }}" >
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Date.Of.Birth </label>
                        <div class="col-sm-10">
                        <input type="text" class="form-control" id="dob" name="dob" value="{{ $member->dob }}">

                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Year.Of.Joining</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="yoj" name="yoj" value="{{ $member->yoj }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Home Club </label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="hc" name="hc" value="{{ $member->hc }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                            <label for="photo" class="col-sm-2 form-control-label">Photo</label>
                            <div class="col-sm-10">
                                @if($member->photo)
                                    <!-- Display the current photo -->
                                    <img id="currentPhoto" src="{{ url('uploads/members/' . $member->photo) }}" alt="Member Photo" style="max-width: 150px; max-height: 150px; margin-bottom: 10px;">
                                    <p>{{ $member->photo }}</p>
                                    
                                    <!-- Link to delete the current photo -->
                                    <a href="{{ route('membersDeletePhoto', $member->id) }}" class="btn btn-danger btn-sm"
                                    onclick="return confirm('Are you sure you want to delete this photo?');">
                                    Delete
                                    </a>
                                @else
                                    <p>No Photo Available</p>
                                @endif

                                <!-- New Photo Upload -->
                                <input class="form-control has-value" id="photo" accept="image/*" name="photo" type="file" onchange="previewImage(event)">
                                <img id="currentPhoto" src="#" alt="New Photo Preview" style="max-width: 150px; max-height: 150px; margin-top: 10px; display: none;">
                            </div>
                        </div>

                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Profession </label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="profession" name="profession" value="{{ $member->profession }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Blood group</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="blood_group" name="blood_group" value="{{ $member->blood_group }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Spouse Name </label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="spouse_name" name="spouse_name" value="{{ $member->spouse_name }}" >
                        </div>
                    </div>
                   
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Spouse Blood group</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control has-value" id="spouse_blood_group" name="spouse_blood_group" value="{{ $member->spouse_blood_group }}" >
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">Wedding Anniversary</label>
                        <div class="col-sm-10">
                        <input type="date" class="form-control has-value" id="wedding_date" name="wedding_date" value="{{ $member->wedding_date ? \Carbon\Carbon::parse($member->wedding_date)->format('Y-m-d') : '' }}">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 form-control-label">  </label>
                        <div class="col-sm-10">
                                <button type="submit" class="btn btn-primary">Update Member</button>
                                <a href="{{ route('members') }}" class="btn btn-secondary">Back to List</a>
                        </div>
                    </div>

                </form>

            </div>
        </div>
       
    </div>

    <!-- .modal -->
    
@endsection
@push("after-scripts")

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote.min.js"></script>


<script>
    function previewImage(event) {
        var reader = new FileReader();
        reader.onload = function() {
            var output = document.getElementById('currentPhoto');
            output.src = reader.result;
            output.style.display = 'block';
        };
        reader.readAsDataURL(event.target.files[0]);
    }
</script>


    <script src="{{ URL::asset('assets/frontend/js/Chart.min.js') }}"></script>
    <script>
        var dynamicColors = function () {
            var r = Math.floor(Math.random() * 255);
            var g = Math.floor(Math.random() * 255);
            var b = Math.floor(Math.random() * 255);
            return "rgb(" + r + "," + g + "," + b + ")";
        };

        var randomScalingFactor = function () {
            return Math.round(Math.random() * 100);
        };

        window.onload = function () {
            @foreach($WebmasterSection->customFields as $customField)
            @if($customField->in_statics && ($customField->type==6 || $customField->type==7))
            <?php
            $cf_details_var = "details_" . @Helper::currentLanguage()->code;
            $cf_details_var2 = "details_en" . env('DEFAULT_LANGUAGE');
            if ($customField->$cf_details_var != "") {
                $cf_details = $customField->$cf_details_var;
            } else {
                $cf_details = $customField->$cf_details_var2;
            }
            $cf_details_lines = preg_split('/\r\n|[\r\n]/', $cf_details);
            ?>
            new Chart(document.getElementById('chart-area-{{ $customField->id }}').getContext('2d'), {
                type: 'pie',
                data: {
                    datasets: [{
                        data: [
                            <?php
                            $line_num = 1;
                            ?>
                            @foreach ($cf_details_lines as $cf_details_line)
                            {{ (@$statics[$customField->id][$line_num] !="")?@$statics[$customField->id][$line_num]:0 }},
                            <?php
                            $line_num++;
                            ?>
                            @endforeach
                        ],
                        backgroundColor: [
                            <?php
                            $line_num = 1;
                            ?>
                            @foreach ($cf_details_lines as $cf_details_line)

                            dynamicColors(),
                            <?php
                            $line_num++;
                            ?>
                            @endforeach
                        ],
                        label: 'Dataset 1'
                    }],
                    labels: [
                        <?php
                            $line_num = 1;
                            ?>
                            @foreach ($cf_details_lines as $cf_details_line)
                        ('{{ $cf_details_line }}').substring(0, 40) + ((('{{ $cf_details_line }}').length > 40) ? '..' : '') + " ( " + '{{ (@$statics[$customField->id][$line_num] !="")?@$statics[$customField->id][$line_num]:0 }}' + ' )',
                        <?php
                        $line_num++;
                        ?>
                        @endforeach
                    ]
                },
                options: {
                    responsive: false,
                    legend: {
                        display: true,
                        position: 'left',
                        labels: {

                            // font size, default is defaultFontSize
                            fontSize: 11,

                            // font color, default is '#fff'
                            fontColor: '#666',

                            // font style, default is defaultFontStyle
                            fontStyle: 'normal',

                            // font family, default is defaultFontFamily
                            fontFamily: "smart4dsTitles, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
                        }
                    }
                }
            });
            @endif
            @endforeach
        };
    </script>


    <script src="{{ asset('assets/dashboard/js/datatables/datatables.min.js') }}"></script>
    <script type="text/javascript">
        $("#checkAll").click(function () {
            $('input:checkbox').not(this).prop('checked', this.checked);
        });
        $("#action").change(function () {
            if (this.value == "delete") {
                $("#submit_all").css("display", "none");
                $("#submit_show_msg").css("display", "inline-block");
            } else {
                $("#submit_all").css("display", "inline-block");
                $("#submit_show_msg").css("display", "none");
            }
        });
        $(document).ready(function () {

            $('#description').summernote({
                height: 300,
                callbacks: {
                    onImageUpload: function(files, editor, welEditable) {
                        sendFile(files[0], editor, welEditable, 'en');
                    }
                }
             });

             
            
            var table_name = "#topics_{{ $WebmasterSection->id }}";
                $('#members-table').DataTable({
                    processing: true,
                    serverSide: true,
                    ajax: "{{ route('members.lists') }}",
                    columns: [
                        { data: 'id', name: 'id' },
                        { data: 'full_name', name: 'full_name' },
                        { data: 'mobile_numbers', name: 'mobile_numbers' },
                        { data: 'position', name: 'Position' },
                        { data: 'district', name: 'district' },
                        { data: 'email_id', name: 'Email' },
                        {
                            data: 'action',
                            name: 'action',
                            orderable: false,
                            searchable: false
                        }
                    ]
                });
          
        });

        $("#filter_btn").click(function () {
            $("#filter_div").slideToggle();
        });

        function DeleteTopic(id) {
            $("#topic_delete_btn").attr("row-id", id);
            $("#delete-topic").modal("show");
        }

       
        $("#topic_delete_btn").click(function () {
            $(this).html("<img src=\"{{ asset('assets/dashboard/images/loading.gif') }}\" style=\"height: 25px\"/> {!! __('backend.yes') !!}");
            var row_id = $(this).attr('row-id');
            if (row_id != "") {
                $.ajax({
                    type: "GET",
                    url: "<?php echo route("topicsDestroy", ["webmasterId" => $WebmasterSection->id]); ?>/" + row_id,
                    success: function (result) {
                        var obj_result = jQuery.parseJSON(result);
                        if (obj_result.stat == 'success') {
                            $('#topic_delete_btn').html("{!! __('backend.yes') !!}");
                            $('#topics_{{ $WebmasterSection->id }}').DataTable().ajax.reload();
                        }
                        $('#delete-topic').modal('hide');
                        $('.modal-backdrop').hide();
                    }
                });
            }
        });
    </script>
@endpush