{layout:simple} {class:Shop.Admin.storeConfig.language_add_window}
<lbbody>
    <form action="javascript:SaveObj();" novalidate>
        <div class="modal-header">
            <h4 class="modal-title"><%=Tag("添加语种")%></h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <label for="Code"><%=Tag("语言")%>：</label>
                <select id="languagecode" class="form-control">
                    <%foreach (DB.LebiShop.Lebi_Language_Code code in langs)
                    {%>
                    <option value="<%=code.Code %>"><%=code.Name %></option>
                    <%} %>
                </select>
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal"><i class="ti-close"></i> <%=Tag("关闭")%></button>
            <button type="submit" class="btn btn-success"><i class="ti-check"></i> <%=Tag("保存")%></button>
        </div>
    </form>
    <script>
        function SaveObj() {
            $("#EditModal").modal("hide");
            var postData = {"languagecode":$('#languagecode').val()};
            var url = "<%=site.AdminPath %>/ajax/ajax_site.aspx?__Action=SiteLanguage_Add&id=<%=model.id %>";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?id=<%=model.id %>&tab=language")});
        }
    </script>
</lbbody>