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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.js") %>"></script>
    <link href="<%=Page.ResolveUrl("~/Content/vendors/bower_components/bootstrap-select/dist/css/bootstrap-select.css") %>" rel="stylesheet" />
    <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/mobile/bootstrap-table-mobile.js")%>"></script>

    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/summernote/dist/summernote.js")%>"></script>
    <link href="<%= Page.ResolveUrl("~/Content/vendors/bower_components/summernote/dist/summernote.css")%>" rel="stylesheet" />
    <script src="<%= Page.ResolveUrl("~/Content/vendors/bower_components/summernote/lang/summernote-tr-TR.js")%>"></script>
    <script>
        $(document).ready(function () {
            $('#txtDuyuruBaslangicTarihi').datetimepicker({
                format: 'DD.MM.YYYY',
                locale: 'tr',
                keepOpen: false
            }).on("dp.change", function (e) {
                ChangeStartDate();
            });

            $('#txtDuyuruBitisTarihi').datetimepicker({
                format: 'DD.MM.YYYY',
                locale: 'tr',
                keepOpen: false
            }).on("dp.change", function (e) {
                ChangeEndDate();
            });

            $(function () {
                $('.summernote').summernote({
                    lang: 'tr-TR',
                    height: 200,
                    focus: true,
                });
            });
        });
          function ChangeStartDate() {
            var StartDate = $('#<%=txtDuyuruBaslangicTarihi.ClientID%>').val();
            var EndDate = $('#<%=txtDuyuruBitisTarihi.ClientID%>').val();
              $('#txtDuyuruBitisTarihi').data("DateTimePicker").options({ minDate: StartDate });
          }
          function ChangeEndDate() {
            var StartDate = $('#<%=txtDuyuruBaslangicTarihi.ClientID%>').val();
            var EndDate = $('#<%=txtDuyuruBitisTarihi.ClientID%>').val();
              $('#txtDuyuruBaslangicTarihi').data("DateTimePicker").options({ maxDate: EndDate });

        }
    </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/Duyuru/DuyuruListesi.aspx") %>">Duyuru Listesi</a></li>
        <li class="active">Duyuru Tanımlama</li>
    </ol>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div class="card">
        <div class="card-header">
            <h2>Duyuru 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">Duyuru Başlangıç Tarihi</p>
                        <asp:TextBox ID="txtDuyuruBaslangicTarihi" ClientIDMode="Static" class="form-control input-sm" runat="server" placeholder="Duyuru Başlangıç Tarihi" ValidationGroup="Duyuru"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Duyuru Bitiş Tarihi</p>
                        <asp:TextBox ID="txtDuyuruBitisTarihi" ClientIDMode="Static" class="form-control input-sm" runat="server" placeholder="Duyuru Bitiş Tarihi" ValidationGroup="Duyuru"></asp:TextBox>
                    </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">Duyuru Başlığı</p>
                        <asp:TextBox ID="txtDuyuruBasligi" class="form-control input-sm" runat="server" placeholder="Duyuru Başlığı" ValidationGroup="Duyuru"></asp:TextBox>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Duyuru Özeti</p>
                        <asp:TextBox ID="txtDuyuruOzeti" class="form-control input-sm" runat="server" placeholder="Duyuru Özeti" ValidationGroup="Duyuru"></asp:TextBox>
                    </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">Aktif 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="chkAktif" ClientIDMode="Static" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Ana Sayfada Yayınlansın Mı?</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="chkAnaSayfadaYayinlansin" ClientIDMode="Static" runat="server" />
                                    <i class="input-helper"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <br />
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group fg-line">
                        <p class="f-500 m-b-5 f-700">Duyuru İçeriği</p>
                        <textarea name="text"  class="summernote" id="contents" required="required"  runat="server"  title="Contents"></textarea>
                    </div>
                </div>
            </div>
            <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="Duyuru" 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>
</asp:Content>
