<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.Master" AutoEventWireup="true" CodeBehind="RaporGrupFormu.aspx.cs" Inherits="Giza.Web.Moduller.RaporGrup.RaporGrupFormu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <link href="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/bootstrap-table.min.css")%>" rel="stylesheet" />
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/bootstrap-table.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/locale/bootstrap-table-tr-TR.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/export/bootstrap-table-export.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/export/tableExport.min.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js")%>"></script>
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js")%>"></script>
    <style type="text/css">
        .bs-item-icon {
            font-size: 65px;
            margin: 0px auto;
            display: block;
            padding: 10px 0px 10px 0px;
            color: #FFF;
            width: 100%;
        }

        .bs-item-title {
            height: 35px;
            text-align: center;
            line-height: 20px;
            color: #014643 !important;
        }

        .bs-item {
            margin-right: 10px;
            margin-bottom: 10px;
            margin-left: 10px;
            padding-left: 0px;
            padding-right: 0px;
            position: static !important;
        }
    </style>
    <script type="text/javascript">
        function ControlImage(input) {
            if (input.files && input.files[0]) {
                var file = input.files[0];
                if (!file.type.match('image.*')) {
                    notify("Sadece resim dosyası yükleyebilirsiniz..", "warning");
                    $("#FileUpload1").val('');
                    return;
                }
                var reader = new FileReader();
                reader.onload = (function (theFile) {
                    return function (e) {
                        document.getElementById('imgPreviewDocument').style.display = "block";
                        document.getElementById('imgPreviewDocument').src = e.target.result;
                        document.getElementById('imgPreviewDocument').title = escape(theFile.name);
                        $('#<%=resimDiv.ClientID%>').hide();
                    };
                })(file);
                reader.readAsDataURL(file);


            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBreadcrumbs" runat="server">
    <ol class="breadcrumb" style="margin-bottom: 5px;">
        <li><a href="<%= Page.ResolveUrl("~/AnaSayfa.aspx") %>">Anasayfa</a></li>
        <li><a href="<%= Page.ResolveUrl("~/Moduller/RaporGrup/RaporGrupListesi.aspx") %>">Rapor Grup Listesi</a></li>
        <li class="active">Rapor Grup Tanımlama</li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div class="card">
        <div class="card-header">
            <h2>Rapor Grup Tanımlama</h2>
        </div>
        <div class="card-body card-padding">
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Grup Adı</p>
                        <asp:TextBox ID="txtGrupAdi" class="form-control input-sm" runat="server" placeholder="Grup Adı" ValidationGroup="Grup"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Menüde Gösterilsin Mi?</p>
                        <div class="col-sm-4">
                            <div class="fg-line">
                                <label class="checkbox checkbox-inline m-r-20" style="margin-top: 5px;">
                                    <asp:CheckBox ID="chkAnaSayfadaGosterilsinMi" ClientIDMode="Static" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <p class="f-500 m-b-5 f-700">Raporun Ana Sayfada Görünen Simgesi</p>
                        <div id="resimDiv" style="display: block; width: 100px; background-size: cover;" runat="server" class="col-sm-1 col-xs-2 bs-item"></div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <p class="f-500 m-b-5 f-700">Resim Yükle</p>
                        <div class="fg-line">
                            <img id="imgPreviewDocument" style="display: block; width: 100px; background-size: cover;" />
                            <asp:FileUpload ID="FileUpload1" ClientIDMode="Static" accept="image/*" onchange="ControlImage(this);" runat="server" />
                            <p>En fazla 2MB dosya yüklemelisiniz.</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Bağlı olduğu rapor grubu</p>
                        <asp:DropDownList ID="cmbRaporGrubu" ClientIDMode="Static" data-live-search="true" class="selectpicker" runat="server" Style="width: 100%;">
                        </asp:DropDownList>
                    </div>
                </div>
            </div>


            <%--            <div class="row">
                <div class="bs-item">
                    <p class="f-500 m-b-5 f-700">Raporun Ana Sayfada Görünen Simgesi</p>
                </div>
            </div>
            <div class="row">
                <div id="resimDiv" runat="server" class="col-sm-1 col-xs-2 bs-item">
                </div>

            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="fg-line">
                        <img id="imgPreviewDocument" src="<%=Page.ResolveUrl("~/Content/img/notifications.png")%>" alt="Resim Yüklenemedi" style="display: none; width: 35%; height: 35%;" />
                        <asp:FileUpload ID="FileUpload1" ClientIDMode="Static" accept="image/*" onchange="ControlImage(this);" runat="server" />
                        <p>En fazla 2MB dosya yüklemelisiniz.</p>
                    </div>

                </div>
            </div>--%>

            <div class="row">
                <div class="alert alert-warning alert-dismissible" role="alert" style="visibility: hidden;">
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                    <asp:CustomValidator ID="Validator" ValidationGroup="Grup" runat="server" CssClass="control-label" ErrorMessage="Lütfen boş geçilemeyecek alanları doldurunuz" OnServerValidate="Validator_ServerValidate"></asp:CustomValidator>
                </div>
                <div>
                    <asp:Button ID="btnSave" runat="server" Text="Kaydet" class="btn bgm-green waves-effect pull-right" OnClick="btnSave_Click" />
                    <asp:Button ID="btnCancel" runat="server" Text="Vazgeç" class="btn bgm-amber waves-effect m-r-10 pull-right" OnClick="btnCancel_Click" />
                    <div style="clear: both;"></div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
