public override void Execute() { #line 5 "..\..\Views\Partials\Forms\Themes\stoolball\DatePicker.cshtml" var datePickerYearRange = Configuration.GetSetting("DatePickerYearRange"); if (string.IsNullOrEmpty(datePickerYearRange)) { datePickerYearRange = "10"; } Html.AddFormThemeCssFile("~/App_Plugins/UmbracoForms/Assets/pikaday/pikaday.css"); Html.AddFormThemeScriptFile(null, "~/App_Plugins/UmbracoForms/Assets/moment/min/moment-with-locales.min.js"); Html.AddFormThemeScriptFile(null, "~/App_Plugins/UmbracoForms/Assets/pikaday/pikaday.js"); Html.AddFormThemeScriptFile(null, "~/App_Plugins/UmbracoForms/Assets/datepicker.init.js"); var locales = new { previousMonth = "<<", nextMonth = ">>", months = CultureInfo.CurrentCulture.DateTimeFormat.MonthNames, weekdays = CultureInfo.CurrentCulture.DateTimeFormat.DayNames, weekdaysShort = CultureInfo.CurrentCulture.DateTimeFormat.AbbreviatedDayNames }; //only render the script block below one time per page var alreadyRendered = Context.Items.Contains("__formDatePickerRendered"); Context.Items["__formDatePickerRendered"] = true; #line default #line hidden WriteLiteral("\r\n\r\n"); #line 31 "..\..\Views\Partials\Forms\Themes\stoolball\DatePicker.cshtml" if (!alreadyRendered) { var locale = $"{{ \"name\": \"{CultureInfo.CurrentUICulture.Name}\", \"datePickerYearRange\": \"{datePickerYearRange}\", \"locales\": {JsonConvert.SerializeObject(locales)} }}"; #line default #line hidden WriteLiteral(" <script"); WriteLiteral(" id=\"umbraco-forms-locale\""); WriteLiteral(" data-locale=\'"); #line 34 "..\..\Views\Partials\Forms\Themes\stoolball\DatePicker.cshtml" Write(Html.Raw(locale)); #line default #line hidden WriteLiteral("\'"); WriteAttribute("src", Tuple.Create(" src=\"", 1499), Tuple.Create("\"", 1536) , Tuple.Create(Tuple.Create("", 1505), Tuple.Create <System.Object, System.Int32>(Href("~/Forms/umbraco-forms-locale.js") , 1505), false) ); WriteLiteral("></script>\r\n"); #line 35 "..\..\Views\Partials\Forms\Themes\stoolball\DatePicker.cshtml" } #line default #line hidden }