@using System
@using System.Collections.Generic
@using System.Globalization
@using Spartane.Core.Domain.Permission
@using Spartane.Core.Domain.Spartane_File
@using Spartane.Web.Helpers
@model Spartane.Web.Areas.Frontal.Models.Detalle_Redes_Sociales_EspecialistaModel
@{


    List<SelectListItem> varRedes_sociales_Red_Social = null;
    if (ViewBag.Redes_socialess_Red_Social != null)
    { varRedes_sociales_Red_Social = (List<SelectListItem>)ViewBag.Redes_socialess_Red_Social; }


    Permission permission = ViewBag.Permission;
}
<div class="modal-dialog" style="width:95%;">
    <div class="modal-content">
        <div class="modal-header">
            <h4 class="modal-title">
                Add Detalle Redes Sociales Especialista
                <button data-dismiss="modal" class="close" type="button" onclick="@(ViewBag.functionMode == 0 ? "Detalle_Redes_Sociales_EspecialistaRemoveAddRow("+ ViewBag.currentRowIndex +")" : "")"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
            </h4>
        </div>
        <div class="modal-body scroll_content">
            <div class="form-horizontal Detalle_Redes_Sociales_EspecialistaPop_@ViewBag.currentRowIndex">
				<div class="modal fade in" id="dvAttributeValue" style="background-color:rgba(0, 0, 0, 0.7);">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-body">
								<div class="form-group">
									<label class="col-sm-3 control-label" id="lblAttributeType">Value</label>
									<div class="col-sm-7">
										<input type="text" title="Value" class="form-control" id="txtAttributeValue" />
									</div>
									<div class="col-sm-2">
										<a class="btn btn-primary" onclick="SaveValue()">Submit</a>
									</div>
									<input type="hidden" id="hdnAttributType" />
									<input type="hidden" id="hdnAttributElement" />
									<input type="hidden" id="hdnAttributNumber" />
									<input type="hidden" id="hdnElementType" />
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="row wrapper border-bottom white-bg page-heading">

					<div class="row">
						<div class="col-lg-10">
							<h2>
								Detalle Redes Sociales Especialista
								<button onclick="Detalle_Redes_Sociales_EspecialistaGetBusinessRule('', 'Abrir Pantalla', '0')" type="button" class="btn btn-info btn-lg displayBusinessProperyButton displayRuleButton" data-toggle="modal" data-target="#Detalle_Redes_Sociales_EspecialistaBusinessRule-form">
									<a class="top" title="" data-placement="right" data-toggle="tooltip" href="#" data-original-title="@Resources.Resources.BusinessRuleToBegin">
										<i class="fa fa-cogs fa-spin"></i>
									</a>
								</button>
							</h2>
							<ol class="breadcrumb">
								<li>
									<a href="@Url.Action("Index", "Home")">@Resources.Resources.Home</a>
								</li>
								<li class="">
									<label>@Resources.Detalle_Redes_Sociales_EspecialistaResources.Detalle_Redes_Sociales_Especialista</label>
								</li>
								<li class="active">
									<strong>@Resources.Resources.Create</strong>
								</li>
							</ol>
						</div>
						<div class="col-lg-2">

							@{
								if (Convert.ToInt32(Spartane.Web.SessionHelper.Role) == (int)Spartane.Core.Enums.SpartanRoleEnum.Admin)
								{
									<h2>&nbsp;</h2>
									<button onclick="Detalle_Redes_Sociales_EspecialistaDisplayBusinessRule()" type="button" class="btn btn-info btn-lg displayBusinessProperyButton">
										<i class="fa fa-cogs fa-spin"></i>
									</button>

									<div aria-hidden="true" class="modal fade in Detalle_Redes_Sociales_EspecialistaPropertyBusinessModal" id="Detalle_Redes_Sociales_EspecialistaPropertyBusinessModal-form" style="display: none; background-color:rgba(0, 0, 0, 0.7);">
										<div class="modal-dialog">
											<div class="modal-content">
												<div class="modal-header">
													<h4 class="modal-title">
														Property & Business Rules
														<button class="close" type="button" onclick="$(this).parent().parent().parent().parent().parent().modal('hide');"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
													</h4>
												</div>
												<div class="modal-body">
													<div class="row">
														<div class="col-sm-12">
															<a class="btn btn-primary full-width" data-toggle="modal" data-target="#PropertyModal-form" onclick="GetPropertyBag()">Properties</a>
														</div>
														<div class="clearfix col-sm-12">&nbsp;</div>
														<div class="col-sm-12">
															<a class="btn btn-primary full-width" data-toggle="modal" data-target="#Detalle_Redes_Sociales_EspecialistaBusinessRule-form" onclick="Detalle_Redes_Sociales_EspecialistaGetBusinessRule()">Business Rule</a>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>

									 <div aria-hidden="true" data-backdrop="static" class="modal fade in Detalle_Redes_Sociales_EspecialistaPropertyModal" id="Detalle_Redes_Sociales_EspecialistaPropertyModal-form" style="display: none; background-color:rgba(0, 0, 0, 0.7);">
									</div>
									<div aria-hidden="true" data-backdrop="static" class="modal fade in Detalle_Redes_Sociales_EspecialistaBusinessRuleModal" id="Detalle_Redes_Sociales_EspecialistaBusinessRule-form" style="display: none; background-color:rgba(0, 0, 0, 0.7);">
									</div>
                                    <div aria-hidden="true" data-backdrop="static" class="modal fade in Detalle_Redes_Sociales_EspecialistaAddBusinessRuleModal" id="Detalle_Redes_Sociales_EspecialistaAddBusinessRule-form" style="display: none; background-color:rgba(0, 0, 0, 0.7);">
                                    </div>

				
								}
							}
						</div>
					</div>

				<div class="wrapper wrapper-content animated fadeInRight">
					<div class="ibox float-e-margins">
						<div class="ibox-content">
							@using (Html.BeginForm("Post", "Detalle_Redes_Sociales_Especialista", FormMethod.Post, new { id = "CreateDetalle_Redes_Sociales_Especialista", @readonly = "true", @class = "form-horizontal", enctype = "multipart/form-data" }))
							{
								<span id="popupNotification"></span>
								<div class="container-fluid Detalle_Redes_Sociales_EspecialistaCreateForm" id="viewmodeledit">
							<div class="tabs-container">
											<ul class="nav nav-tabs">
				@@groupers@@
											</ul>
										<div class="tab-content">
				<div class="form-group" id="divFolio">
                                <label class="col-sm-2 control-label">@Resources.Detalle_Redes_Sociales_EspecialistaResources.Folio</label>
                                <div class="col-sm-8" data-field-id="Folio" data-attribute="258882" data-field-name="@Resources.Detalle_Redes_Sociales_EspecialistaResources.Folio">
                                    <label class="form-control" for="Detalle_Redes_Sociales_EspecialistaFolio" id="Detalle_Redes_Sociales_EspecialistaFolio">@Model.Folio</label>
                                </div>
                            </div>
<div class="form-group" id="divRed_Social">
	<label class="col-sm-2 control-label">@Resources.Detalle_Redes_Sociales_EspecialistaResources.Red_Social</label>
	<div class="col-sm-8" data-field-id="Red_Social" data-attribute="258884" data-field-name="@Resources.Detalle_Redes_Sociales_EspecialistaResources.Red_Social">
		<select class="form-control" data-val="true" data-val-number="The field Red Social must be a number." data-val-required="The Red Social field is required." id="Detalle_Redes_Sociales_EspecialistaRed_Social" name="Detalle_Redes_Sociales_EspecialistaRed_Social">
			<option value=""></option>
			@if (varRedes_sociales_Red_Social != null){ 
				foreach (var itemRed_Social in varRedes_sociales_Red_Social)
				{
					if (itemRed_Social.Value == Convert.ToString(Model.Red_Social))
					{
						<option value="@itemRed_Social.Value" selected>@itemRed_Social.Text</option>
					}
					else
					{
						<option value="@itemRed_Social.Value">@itemRed_Social.Text</option>
					}
				}
			}
		</select>
	</div>
</div>
<div class="form-group" id="divURL">
                                <label class="col-sm-2 control-label">@Resources.Detalle_Redes_Sociales_EspecialistaResources.URL</label>
                                <div class="col-sm-8" data-field-id="URL" data-attribute="258885" data-field-name="@Resources.Detalle_Redes_Sociales_EspecialistaResources.URL">
                                    <input class="form-control" id="Detalle_Redes_Sociales_EspecialistaURL" name="Detalle_Redes_Sociales_EspecialistaURL" type="text" value="@Model.URL">
                                </div>
                            </div>
<div class="form-group" id="divPrincipal">
                                <label class="col-sm-2 control-label">@Resources.Detalle_Redes_Sociales_EspecialistaResources.Principal</label>
                                <div class="col-sm-8" data-field-id="Principal" data-attribute="258886" data-field-name="@Resources.Detalle_Redes_Sociales_EspecialistaResources.Principal">
                                    @Html.CheckBoxFor(m => m.Principal, new { @class = "i-checks" })
                                </div>
                            </div>

								</div>	
							</div>
									<br />
											<div class="form-actions fluid">
												<input type="hidden" value="@Model.Folio" id="ReferenceFolio" />
												<input type="hidden" value="@Model.Folio" name="Folio" id="FolioId" />
												@if (!ViewBag.Consult)
												{
													<div id="dvSaveJob" style="display:inline-block"></div>

													<button type="button" class="btn btn-info btn-lg displayBusinessProperyButton displayRuleButton">
														<i class="fa fa-cogs fa-spin"></i>
													</button>
													<a title="@Resources.Resources.Configure" id="Detalle_Redes_Sociales_EspecialistaConfigureSave" name="Detalle_Redes_Sociales_EspecialistaConfigureSave" onclick="SaveElementAttributes()" class="btn btn-success">@Resources.Resources.Configure</a>
												}

												<input type="hidden" id="hdnDetalle_Redes_Sociales_EspecialistaConfigureType" />
												<input type="hidden" id="hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId" />
												<input type="hidden" id="hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName" />
												<input type="hidden" id="hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute" />

												<input data-dismiss="modal" type="button" value="@Resources.Resources.Cancelar" class="btn btn-danger noConsult" data-bind="click: cancel" tabindex="16" />

												<button onclick="Detalle_Redes_Sociales_EspecialistaGetBusinessRule('', 'Al Cancelar', '3')" type="button" class="btn btn-info btn-lg displayBusinessProperyButton displayRuleButton" data-toggle="modal" data-target="#Detalle_Redes_Sociales_EspecialistaBusinessRule-form">
													<a class="top" title="" data-placement="right" data-toggle="tooltip" href="#" data-original-title="@Resources.Resources.BusinessRuleToBegin">
														<i class="fa fa-cogs fa-spin"></i>
													</a>
												</button>
											</div>
										</div>
								}

							</div>
						</div>
					</div>
				</div>
					<input id="hdnApplicationDirectory" type="hidden" value="@Url.Content("~/")" />
				</div>
			</div>
		</div>
</div>
@section Styles {
<link href="@Url.Content("~/Content/BootstrapDatePicker/bootstrap-datetimepicker.min.css")" rel="stylesheet" />
    @Styles.Render("~/Content/plugins/dataTables/dataTablesStyles")
    @Styles.Render("~/plugins/dateRangeStyles")
    @Styles.Render("~/plugins/dataPickerStyles")
    @Styles.Render("~/plugins/clockpickerStyles")
    @Styles.Render("~/plugins/awesomeCheckboxStyles")
    @Styles.Render("~/plugins/select2Styles")
    @Styles.Render("~/Content/plugins/chosen/chosenStyles")
<style>
    .dataTables_filter {
        display: none;
    }
    .select2-results{background-color:#fff;}
    .select2-container .select2-dropdown{height:auto !important;}

    div.dataTables_info {
        display: inline-block;
        float: right;
    }
        i {
        font-size: 25px !important;
        display: block;
        color: #676a6c;
        margin-left: 6px;
        margin-right: 6px;
    }

    .fullWidth {
        width: 100%;
    }
</style>
}

<script type="text/javascript" src="~/Uploads/Scripts/Detalle_Redes_Sociales_Especialista.js?v=@DateTime.Now.ToString("ddMMyyyyhhmmss")"></script>
<script type="text/javascript" src="~/Scripts/Custom/Detalle_Redes_Sociales_EspecialistaGeneral.js?v=@DateTime.Now.ToString("ddMMyyyyhhmmss")"></script>
<script type="text/javascript" src="~/Uploads/Scripts/Rules/Detalle_Redes_Sociales_EspecialistaCreateRules.js?v=@DateTime.Now.ToString("ddMMyyyyhhmmss")"></script>
<script type="text/javascript" src="~/Uploads/Scripts/Rules/MedicosCreateRules.js?v=@DateTime.Now.ToString("ddMMyyyyhhmmss")"></script>
<script src="~/Scripts/plugins/chosen/chosen.jquery.js"></script>

    <script type="text/javascript">
        



        $(document).ready(function () {
			var currentIndex = @ViewBag.currentRowIndex

            var Detalle_Redes_Sociales_EspecialistaRowElement = "Detalle_Redes_Sociales_EspecialistaPop_" + currentIndex.toString();
            var abc = "if(dynamicFieldValidation('" + Detalle_Redes_Sociales_EspecialistaRowElement + "')){ Detalle_Redes_Sociales_EspecialistaInsertRowFromPopup(" + currentIndex + "); }";
            var insertRowHTML = '<a class="btn btn-primary m-b" onclick="' + abc + '">Save</a>';
            $('#dvSaveJob').html(insertRowHTML);
			


            initiateUIControls();
            EjecutarValidacionesAlComienzo();
			$('a').tooltip();
        });



        function initiateUIControls() {
            $('.gridDatePicker').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true,
                format: "@ConfigurationProperty.DateFormatDatePicker"
            });
            //Time Picker
            $('.gridTimePicker').clockpicker();

        }
		
		function SendDetalle_Redes_Sociales_EspecialistaData(callBack) {
			
					
		 var arr = []; 
		 $("form#CreateDetalle_Redes_Sociales_Especialista").find(':input').each(function( index ) {		 
			if ($(this).prop('disabled')==true|| $(this).prop('disabled')=="disabled")
			{		
				arr.push($(this).attr('id')); 
				$(this).prop('disabled', false);  	
			}
	    });
		
             var formData = new FormData($("form#CreateDetalle_Redes_Sociales_Especialista")[0]);
			$.each( arr, function( key, value ) {
			  $('#' +value).prop('disabled', true);
			});

            var isNew = $('#hdnIsNew').val();
           
            if (checkClientValidate('Detalle_Redes_Sociales_EspecialistaCreateForm')) {
                $.ajax({
                    url: '@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/Post?IsNew=")' + isNew,
                    type: 'POST',
                    data: formData,
                    async: true,
                    success: function (result) {
                        if (result < 0) {
                            showNotification("@Resources.Resources.ErrorSave", "error");
                        } else {

                            showNotification("@Resources.Resources.SaveSuccess", "success");
                            callBack(result);
                        }
                    },
                    error: function (result) {
                        showNotification("@Resources.Resources.ErrorContactingServer", "error");
                    },
                    cache: false,
                    contentType: false,
                    processData: false
                });
            }
            return false;
        };
		
        function GetPropertyBag() {
            $.get('@Url.Action("Detalle_Redes_Sociales_EspecialistaPropertyBag", "Detalle_Redes_Sociales_Especialista")', function (data) {
                $(".PropertyModal").html(data);
            });
        }
        function Detalle_Redes_Sociales_EspecialistaGetBusinessRule(FieldId, FieldName, Attribute) {
			if (FieldId != null && FieldName != null)
			{
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(FieldId);
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(FieldName);
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(Attribute);
			}
            $.get('@Url.Action("BusinessRule", "BussinessRule")', { FieldId: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(), FieldName: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(), ObjectId: '44450', Attribute: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(), Screen: 'Detalle_Redes_Sociales_Especialista' }, function (data) {
                $(".Detalle_Redes_Sociales_EspecialistaBusinessRuleModal").html(data);
            });
        }
        function Detalle_Redes_Sociales_EspecialistaGetAddBusinessRule(RuleId, FieldId, FieldName, Attribute) {
			if (FieldId != null && FieldName != null) {
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(FieldId);
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(FieldName);
				$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(Attribute);
			}
            $.get('@Url.Action("AddBusinessRule", "BussinessRule")', { BusinessRuleId: RuleId, FieldId: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(), FieldName: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(), ObjectId: '44450', Attribute: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(), Screen: 'Detalle_Redes_Sociales_Especialista' }, function (data) {
                $(".Detalle_Redes_Sociales_EspecialistaAddBusinessRuleModal").html(data);
                $(".datatable").DataTable();
            });
        }
		function RemoveBusinessRule(RuleId) {
			$.get('@Url.Action("RemoveBusinessRule", "BussinessRule")', { BusinessRuleId: RuleId, FieldId: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(), FieldName: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(), ObjectId: '44450', Attribute: $('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(), Screen: 'Detalle_Redes_Sociales_Especialista' }, function (data) {
				$(".Detalle_Redes_Sociales_EspecialistaBusinessRuleModal").html(data);
			});
		}

    var permission = {
        Consult: '@permission.Consult' == 'True',
        New: '@permission.New' == 'True',
        Edit: '@permission.Edit' == 'True',
        Delete: '@permission.Delete' == 'True',
        Export: '@permission.Export' == 'True',
        Print: '@permission.Print' == 'True',
        Configure: '@permission.Configure' == 'True',
    };

    
    //MR-var statusItems;
    //MR-var stateItems;
    //MR-var cityItems = [];
    var isConsultMode = "@ViewBag.Consult" == "True";
    Consult(isConsultMode);
        function Consult(val) {
            if (val) {
                $(':input').attr('readonly', 'readonly');
                $(':input').attr('disabled', 'true');
                $('.noConsult').removeAttr('readonly');
                $('.noConsult').removeAttr('disabled');
            }
        }

    function BackToGrid() {
        location.href = "@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/")";
    }
	
	function ReadScriptSettings(callback)
    {
        $.post("@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/ReadScriptSettings")", function (data) {
            mainElementObject = JSON.parse(data.MainElement);
			if (data.ChildElement != null) {
                childElementObject = JSON.parse(data.ChildElement);
            }
            callback();
        });
    }

    function SaveSettingsWithoutReload() {
        $.post("@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/WriteScriptSettings")", { CustomModuleAttributeList: mainElementObject, ChildModuleAttributeList: childElementObject }, function (data) {
            //$('#hdnDetalle_Redes_Sociales_EspecialistaConfigureType').val("0");
        }, "json");
    }
	
        function SaveElementAttributes() {
            if ($('#hdnDetalle_Redes_Sociales_EspecialistaConfigureType').val() == "1") {
                $.post("@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/WriteScriptSettings")", { CustomModuleAttributeList: mainElementObject, ChildModuleAttributeList: childElementObject }, function (data) {
                    $('#hdnDetalle_Redes_Sociales_EspecialistaConfigureType').val("0");
                    location.reload(true);
                }, "json");
            } else {
                $.post("@Url.Content("~/Frontal/Detalle_Redes_Sociales_Especialista/ReadScriptSettings")", function (data) {
                    mainElementObject = JSON.parse(data.MainElement);
                    childElementObject = JSON.parse(data.ChildElement);

                    for (var i = 0; i < mainElementObject.length; i++) {
                        var mainElementAttributes = '<div class="col-sm-2">';
                        mainElementAttributes += '<div class="displayAttributes requiredAttribute"><a class="requiredClick" title="' + (mainElementObject[i].IsRequired == true ? "Required" : "Not Required") + '" onclick="setRequired(' + i.toString() + ', this, 1)"><img src="' + (mainElementObject[i].IsRequired == true ? "@Url.Content("~/Images/Required.png")" : "@Url.Content("~/Images/Not-Required.png")") + '" alt="" /></a></div>';
                        mainElementAttributes += '<div class="displayAttributes visibleAttribute"><a class="visibleClick" title="' + (mainElementObject[i].IsVisible == true ? "Visible" : "In Visible") + '" onclick="setVisible(' + i.toString() + ', this, 1)"><img src="' + (mainElementObject[i].IsVisible == true ? "@Url.Content("~/Images/Visible.png")" : "@Url.Content("~/Images/InVisible.png")") + '" alt="" /></a></div>';
                        mainElementAttributes += '<div class="displayAttributes readOnlyAttribute"><a class="readOnlyClick" title="' + (mainElementObject[i].IsReadOnly == true ? "Disabled" : "Enabled") + '" onclick="setReadOnly(' + i.toString() + ', this, 1)"><img src="' + (mainElementObject[i].IsReadOnly == true ? "@Url.Content("~/Images/Disabled.png")" : "@Url.Content("~/Images/Enabled.png")") + '" alt="" /></a></div>';
                        mainElementAttributes += '<div class="displayAttributes defaultValueAttribute"><a id="hlDefaultValue_' + i.toString() + '" class="defaultValueClick" title="' + (mainElementObject[i].DefaultValue) + '" onclick="setDefaultValue(' + i.toString() + ', this, 1)"><img src="' + (mainElementObject[i].DefaultValue != '' && mainElementObject[i].DefaultValue != null ? "@Url.Content("~/Images/default-value.png")" : "@Url.Content("~/Images/Not-Default-Value.png")") + '" alt="" /></a></div>';
                        mainElementAttributes += '<div class="displayAttributes helpTextAttribute"><a id="hlHelpText_' + i.toString() + '" class="helpTextClick" title="' + (mainElementObject[i].HelpText) + '" onclick="setHelpText(' + i.toString() + ', this, 1)"><img src="' + (mainElementObject[i].HelpText != '' && mainElementObject[i].HelpText != null ? "@Url.Content("~/Images/green-help.png")" : "@Url.Content("~/Images/red-help.jpg")") + '" alt="" /></a></div>';
                        mainElementAttributes += '</div>';
                        $('#Detalle_Redes_Sociales_Especialista' + mainElementObject[i].inputId).parent().closest('.form-group').show();

                        $('#Detalle_Redes_Sociales_Especialista' + mainElementObject[i].inputId).closest('.col-sm-8').after(mainElementAttributes);
                    }
					if (childElementObject != null) {
						for (var i = 0; i < childElementObject.length; i++) {
							$('.' + childElementObject[i].inputId + 'Header').show();
							$('.' + childElementObject[i].inputId).parent().show();
							$('.' + childElementObject[i].inputId + 'Header').append(returnAttributeHTML(i));
						}
					}
                    $('#Detalle_Redes_Sociales_EspecialistaConfigureSave').text('Save Settings');
                    $('#hdnDetalle_Redes_Sociales_EspecialistaConfigureType').val("1");
                });
            }
        }
		$('#CreateDetalle_Redes_Sociales_Especialista').on('click', '.btnPopupBusinessRules', function () {
			var fieldId = $(this).data('field-id');
			var fieldName = $(this).data('field-name');
			var attribute = $(this).data('attribute');
			$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldId').val(fieldId);
			$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleFieldName').val(fieldName);
			$('#hdnDetalle_Redes_Sociales_EspecialistaBusinessRuleAttribute').val(attribute);
		});
		//Initialize HTML Editors
		
    </script>
