Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/medad.corals.io/Corals/modules/Medad/resources/views/company_relations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/medad.corals.io/Corals/modules/Medad/resources/views/company_relations/add.blade.php
<div class="row">
    <div class="col-md-12">
        {!! CoralsForm::openForm(null,['url'=>$company->getShowURL().'/add-company','data-table'=>'#CompanyRelationsDataTable']) !!}
        <div id="new-company-section">
            <div class="row">
                <div class="col-md-6">
                    {!! CoralsForm::text('code', 'Medad::attributes.company.code', true ,'',['id' => 'company_code']) !!}
                </div>
                <div class="col-md-6">
                    <input type="hidden" name="company_id" id="company_id_input"/>
                    {!! CoralsForm::text('name', 'Medad::attributes.company.name', true,'',['id' => 'company_name']) !!}
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    {!! CoralsForm::text('phone_number', 'Medad::attributes.company.phone_number','','',['id' => 'phone_number']) !!}
                </div>
                <div class="col-md-6">
                    {!! CoralsForm::email('email', 'Medad::attributes.company.email','','',['id' => 'company_email']) !!}
                </div>

            </div>
        </div>

        {!! CoralsForm::select('branches[]', 'Medad::attributes.company.branches', Medad::getCompanyBranches($company->id), false, null, ['multiple'=>true],'select2') !!}

        {!! CoralsForm::formButtons(trans("Corals::labels.submit"), ['class'=>'btn btn-primary'],['show_cancel'=>false]) !!}

        {!! CoralsForm::closeForm(null) !!}
    </div>
</div>


<script>
    $('#company_code').on('change', function () {
        let code = $(this).val();

        $.ajax({
            url: '{{url($company->getShowURL().'/get-company-details-by-code')}}',
            type: 'GET',
            data: {'code': code},
            dataType: 'json',
            success: function (response) {
                $('#company_name').val(response.data.name);
                $('#company_email').val(response.data.email);
                $('#phone_number').val(response.data.phone_number);
                $("#company_id_input").val(response.data.id);

                $("#new-company-section").find('input:not(#company_code)').attr('readOnly', true);
            },
            error: function (response, textStatus, jqXHR) {
                if ($("#company_id_input").val()) {
                    $("#new-company-section").find('input:not(#company_code)').val('');
                }
                $("#new-company-section").find('input').attr('readOnly', false);
            }
        });
    });
</script>

Spamworldpro Mini