<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>آنسه تیم</title>

    <!-- Google font-->
    <link href="https://fonts.googleapis.com/css?family=Rubik:400,400i,500,500i,700,700i&amp;display=swap"
          rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900&amp;display=swap"
          rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/font-awesome.css">
    <!-- ico-font-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/icofont.css">
    <!-- Themify icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/themify.css">
    <!-- Flag icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/flag-icon.css">
    <!-- Feather icon-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/feather-icon.css">
    <!-- Plugins css start-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/scrollbar.css">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/prism.css">
    <!-- Plugins css Ends-->
    <!-- Bootstrap css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/bootstrap.css">
    <!-- App css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/style.css">
    <link id="color" rel="stylesheet" href="/RTL/superAdmin/css/color-1.css" media="screen">
    <!-- Responsive css-->
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/responsive.css">
    <link rel="stylesheet" type="text/css" href="/RTL/superAdmin/css/vendors/select2.css">
</head>
<body class="rtl">
<!-- tap on top starts-->
<div class="tap-top"><i data-feather="chevrons-up"></i></div>
<!-- tap on tap ends-->
<!-- page-wrapper Start-->
<div class="page-wrapper compact-wrapper" id="pageWrapper">
    <!-- Page Header Start-->

    <%- include('../partials/header') %>

    <!-- Page Sidebar Ends-->
    <div class="page-body">
        <div class="container-fluid">
            <div class="page-title">
                <div class="row">
                    <div class="col-6">
                        <h3>مدیریت مقالات

                        </h3>
                    </div>
                    <div class="col-6">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="/<%= lan.ShortName %>/dashboard"><i
                                            data-feather="home"></i></a></li>
                            <li class="breadcrumb-item">زبان ها</li>
                            <li class="breadcrumb-item active"> ویرایش زبان <%= language.Name %></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <!-- Container-fluid starts-->
        <!-- Container-fluid starts-->
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12 col-xl-12">
                    <div class="row">
                        <div class="col-sm-10" style="margin:0 auto">

                            <div class="card">
                                <div class="card-header">
                                    <h5>ویرایش زبان در سامانه آنسه تیم</h5>
                                </div>

                                <div class="card-body">
                                    <form class="form-space theme-form row" action="/<%= lan.ShortName %>/language/edit/<%= language._id %>" method="post">

                                        <div class="col-sm-6">
                                            <label class="form-label"> نام </label>
                                            <input class="form-control" name="Name" id="Name" type="text" placeholder="نام" maxlength="25" required value="<%= language.Name %>">
                                        </div>

                                        <div class="col-sm-6">
                                            <label class="form-label"> نام کوتاه شده </label>
                                            <input class="form-control" name="ShortName" id="ShortName" type="text" placeholder="نام کوتاه شده" maxlength="25" required value="<%= language.ShortName %>">
                                        </div>

                                        <div class="col-sm-6">
                                            <label class="form-label" for="">جهت نوشتاری زبان</label>
                                            <select name="Direction" id="Direction" class="form-select form-control-lg">
                                                <% if( language.Direction == "RTL"){ %>
                                                    <option value="RTL" selected>راست چین</option>
                                                    <option value="LTR">چپ چین</option>
                                                <% } else { %>
                                                    <option value="RTL">راست چین</option>
                                                    <option value="LTR" selected>چپ چین</option>
                                                <% } %>
                                            </select>
                                        </div>

                                        <div>
                                            <div class="col-sm-3 m-4">
                                                <a href="#" class="btn btn-info" id="ChooseFiles" data-bs-toggle="modal" data-bs-target="#printModal" onclick="albumPopup(lan='<%= lan.ShortName %>', btn='ChooseFiles', albumFiles='AlbumFiles', multi=false, exist=true, model='language', modelId='<%= language._id %>', modelFilesName='Flag')">انتخاب پرچم</a>
                                            </div>
                                            <div id="AlbumFiles">

                                            </div>
                                        </div>

                                        <div class="mb-3">
                                            <label class="form-label" for="SmallCaption">توضیحات کوتاه</label>
                                            <textarea class="form-control" id="SmallCaption" name="SmallCaption" placeholder="توضیحات کوتاه این زبان را وارد کنید"><%= language.SmallCaption %></textarea>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="Caption">توضیحات</label>
                                            <textarea class="form-control" id="Caption" name="Caption" placeholder="توضیحات این زبان را وارد کنید"><%= language.Caption %></textarea>
                                        </div>

                                        <div class="card-footer text-end">
                                            <button class="btn btn-primary" type="submit">ثبت</button>
                                            <a href="https://amarify.com/blog/admin/list" class="btn btn-secondary">بازگشت</a>
                                            <a href="https://amarify.com/blogtype/admin/list" class="btn btn-success">مشاهده دسته بندی مقالات</a>
                                        </div>
                                    </form>
                                </div>

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

        </div>
        <!-- Container-fluid Ends-->

        <!-- Container-fluid Ends-->
    </div>
    <!-- popup -->
    <%- include("../partials/popup") %>
    <!-- popup-->
    <%- include("../partials/footer") %>
</div>
</div>
<!-- latest jquery-->
<script src="/RTL/superAdmin/js/jquery-3.5.1.min.js"></script>
<!-- Bootstrap js-->
<script src="/RTL/superAdmin/js/bootstrap/bootstrap.bundle.min.js"></script>
<!-- feather icon js-->
<script src="/RTL/superAdmin/js/icons/feather-icon/feather.min.js"></script>
<script src="/RTL/superAdmin/js/icons/feather-icon/feather-icon.js"></script>
<!-- scrollbar js-->
<script src="/RTL/superAdmin/js/scrollbar/simplebar.js"></script>
<script src="/RTL/superAdmin/js/scrollbar/custom.js"></script>
<!-- Sidebar jquery-->
<script src="/RTL/superAdmin/js/config.js"></script>
<!-- Plugins JS start-->
<script src="/RTL/superAdmin/js/sidebar-menu.js"></script>
<script src="/RTL/superAdmin/js/prism/prism.min.js"></script>
<script src="/RTL/superAdmin/js/clipboard/clipboard.min.js"></script>
<script src="/RTL/superAdmin/js/custom-card/custom-card.js"></script>
<script src="/RTL/superAdmin/js/tooltip-init.js"></script>
<!-- Plugins JS Ends-->
<!-- Theme js-->
<script src="/RTL/superAdmin/js/script.js"></script>
<script src="/RTL/superAdmin/js/tiny/tinymce.min.js"></script>
<!-- login js-->
<script src="/RTL/superAdmin/js/select2/select2.full.min.js"></script>
<script src="/RTL/superAdmin/js/select2/select2-custom.js"></script>
<!-- Plugin used-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.0/axios.min.js"></script>
<!-- script pop up -->
<script src="/RTL/superAdmin/js/anse/albumPopup.js"></script>

<script>
    window.onload = function () {
        getModelFiles(lan='<%= lan.ShortName %>', albumFiles='AlbumFiles', model='language', modelId='<%= language._id %>', modelFilesName='Flag')
    }
</script>

</body>
</html>
