Changeset bd9e8e3 for resources


Ignore:
Timestamp:
10/17/21 20:28:35 (3 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
develop, master
Children:
e6c1f87
Parents:
d795fa6
Message:

added arch_id validation

Location:
resources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • resources/assets/js/custom.js

    rd795fa6 rbd9e8e3  
    55    $(document).on('click', '.layout-builder .layout-builder-toggle', function () {
    66        $('.layout-builder').toggleClass('show');
     7    });
     8
     9    $(".edit_document_deparment").change(function() {
     10        var archId = $("input[name='arch_id']");
     11        var currentArchId = archId.val();
     12        var currentText = currentArchId.split("/")[1];
     13        var selectedId = $(this).find('option:selected').val();
     14
     15        if(currentText.length) {
     16            archId.val(selectedId + "/" + currentText);
     17        } else {
     18            archId.val(selectedId + "/");
     19        }
    720    });
    821
  • resources/views/dashboard/documents/edit.blade.php

    rd795fa6 rbd9e8e3  
    3535                                                <div class="form-group">
    3636                                                    <label for="exampleFormControlSelect1">Department</label>
    37                                                         <select class="form-control" name="department" required>
     37                                                        <select class="form-control edit_document_deparment" name="department" required>
    3838                                                            @foreach ($departments as $department)
    3939                                                                <option value="{{ $department->id }}" {{ old("department", $document->department->id) == $department->id ? "selected" : "" }}>{{ $department->name }}</option>
     
    5959                                                <div class="form-group">
    6060                                                    <label>Description</label>
    61                                                     <textarea class="form-control" name="description" value='{{ old("description", $document->description) }}' rows="3"></textarea>
     61                                                    <textarea class="form-control" name="description" rows="3">
     62                                                        {{ old("description", $document->description) }}
     63                                                    </textarea>
    6264                                                </div>
    6365                                            </div>
  • resources/views/dashboard/settings/index.blade.php

    rd795fa6 rbd9e8e3  
    1818    </div>
    1919
    20     @if(isset($link))
    21         {{$link}}
    22         @endif
    23 
    2420    <div class="row">
    2521        <div class="col-md-12">
     
    2824                <div class="col-lg-3 col-md-12 mb-3">
    2925                    <div class="nav flex-lg-column flex-sm-row nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
    30                         <a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true">Account</a>
    31                         <a class="nav-link" id="security-tab" data-toggle="pill" href="#security" role="tab" aria-controls="security" aria-selected="false">Security</a>
    32                         <a class="nav-link" id="v-pills-settings-tab" data-toggle="pill" href="#v-pills-settings" role="tab" aria-controls="v-pills-settings" aria-selected="false">Social</a>
     26                        <a class="nav-link {{ $active_tab == 'account' ? 'active' : '' }}" id="account-tab" data-toggle="pill" href="#account" role="tab" aria-controls="account" aria-selected="true">Account</a>
     27                        <a class="nav-link {{ $active_tab == 'security' ? 'active' : '' }}" id="security-tab" data-toggle="pill" href="#security" role="tab" aria-controls="security" aria-selected="false">Security</a>
     28                        <a class="nav-link " id="v-pills-settings-tab" data-toggle="pill" href="#v-pills-settings" role="tab" aria-controls="v-pills-settings" aria-selected="false">Social</a>
    3329                    </div>
    3430                </div>
    3531                <div class="col-lg-9 col-md-12">
    3632                    <div class="tab-content" id="v-pills-tabContent">
    37                         <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
     33                        <div class="tab-pane fade show {{ $active_tab == 'account' ? 'active' : '' }}" id="account" role="tabpanel" aria-labelledby="account-tab">
    3834                            <div class="card">
    3935                                <div class="card-body">
     
    8480                            </div>
    8581                        </div>
    86                         <div class="tab-pane{{old('tab') == 'security' ? ' active' : null}}" id="security" role="tabpanel" aria-labelledby="security-tab">
     82                        <div class="tab-pane {{ $active_tab == 'security' ? 'active' : '' }}" id="security" role="tabpanel" aria-labelledby="security-tab">
    8783                            <div class="card">
    8884                                <div class="card-body">
     
    243239
    244240@endsection
    245 
    246 @section('script')
    247     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    248     <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha512-uto9mlQzrs59VwILcLiRYeLKPPbS/bT71da/OEBYEwcdNUk8jYIy+D176RYoop1Da+f9mvkYrmj5MCLZWEtQuA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    249     <script>
    250         $(document).ready(function () {
    251             if (window.location.hash) {
    252                 $('.nav-pills a[href="#'+window.location.hash+'"]').tabs('show');
    253             }
    254         });
    255 </script>
    256 @endsection
Note: See TracChangeset for help on using the changeset viewer.