• Levering 1-2 hverdage Levering 1-2 hverdage
  • Fri fragt ved køb over 500 kr. Fri fragt ved køb over 500 kr.
Error executing template "Designs/Rapido/ContentPage/Paragraph/StandardParagraphOne.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_0d9a4cb4280e4606a0be4fca3f97c482.<RenderTheContent>b__46_0(TextWriter __razor_helper_writer) in D:\Dynamicweb.net\Solutions\frellsen.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\ContentPage\Paragraph\StandardParagraphOne.cshtml:line 2219
   at CompiledRazorTemplates.Dynamic.RazorEngine_0d9a4cb4280e4606a0be4fca3f97c482.Execute() in D:\Dynamicweb.net\Solutions\frellsen.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\ContentPage\Paragraph\StandardParagraphOne.cshtml:line 2170
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Frontend 3 @using Dynamicweb.Rapido.Blocks.Components 4 @using Dynamicweb.Rapido.Blocks.Components.General 5 6 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 7 @using Dynamicweb.Frontend 8 9 @* Include the components *@ 10 @using System.Text.RegularExpressions 11 @using System.Collections.Generic 12 @using System.Reflection 13 @using System.Web 14 @using System.Web.UI.HtmlControls 15 @using Dynamicweb.Rapido.Blocks.Components 16 @using Dynamicweb.Rapido.Blocks.Components.Articles 17 @using Dynamicweb.Rapido.Blocks.Components.Documentation 18 @using Dynamicweb.Rapido.Blocks 19 20 21 @*--- START: Base block renderers ---*@ 22 23 @helper RenderBlockList(List<Block> blocks) 24 { 25 bool debug = !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("debug")) ? Convert.ToBoolean(HttpContext.Current.Request.QueryString.Get("debug")) : false; 26 blocks = blocks.OrderBy(item => item.SortId).ToList(); 27 28 foreach (Block item in blocks) 29 { 30 if (debug) { 31 <!-- Block START: @item.Id --> 32 } 33 34 if (item.Design == null) 35 { 36 @RenderBlock(item) 37 } 38 else if (item.Design.RenderType == RenderType.None) { 39 string cssClass = item.Design.CssClass != null ? item.Design.CssClass : ""; 40 41 <div class="@cssClass dw-mod"> 42 @RenderBlock(item) 43 </div> 44 } 45 else if (item.Design.RenderType != RenderType.Hide) 46 { 47 string cssClass = item.Design.CssClass != null ? item.Design.CssClass : ""; 48 49 if (!item.SkipRenderBlocksList) { 50 if (item.Design.RenderType == RenderType.Row) 51 { 52 <div class="grid grid--align-content-start @cssClass dw-mod" id="Block__@item.Id"> 53 @RenderBlock(item) 54 </div> 55 } 56 57 if (item.Design.RenderType == RenderType.Column) 58 { 59 string hidePadding = item.Design.HidePadding ? "u-no-padding" : ""; 60 string size = item.Design.Size ?? "12"; 61 size = Regex.IsMatch(size, @"\d") ? "md-" + item.Design.Size : item.Design.Size; 62 63 <div class="grid__col-lg-@item.Design.Size grid__col-md-@item.Design.Size grid__col-sm-12 grid__col-xs-12 @hidePadding @cssClass dw-mod" id="Block__@item.Id"> 64 @RenderBlock(item) 65 </div> 66 } 67 68 if (item.Design.RenderType == RenderType.Table) 69 { 70 <table class="table @cssClass dw-mod" id="Block__@item.Id"> 71 @RenderBlock(item) 72 </table> 73 } 74 75 if (item.Design.RenderType == RenderType.TableRow) 76 { 77 <tr class="@cssClass dw-mod" id="Block__@item.Id"> 78 @RenderBlock(item) 79 </tr> 80 } 81 82 if (item.Design.RenderType == RenderType.TableColumn) 83 { 84 <td class="@cssClass dw-mod" id="Block__@item.Id"> 85 @RenderBlock(item) 86 </td> 87 } 88 89 if (item.Design.RenderType == RenderType.CardHeader) 90 { 91 <div class="card-header @cssClass dw-mod"> 92 @RenderBlock(item) 93 </div> 94 } 95 96 if (item.Design.RenderType == RenderType.CardBody) 97 { 98 <div class="card @cssClass dw-mod"> 99 @RenderBlock(item) 100 </div> 101 } 102 103 if (item.Design.RenderType == RenderType.CardFooter) 104 { 105 <div class="card-footer @cssClass dw-mod"> 106 @RenderBlock(item) 107 </div> 108 } 109 } 110 else 111 { 112 @RenderBlock(item) 113 } 114 } 115 116 if (debug) { 117 <!-- Block END: @item.Id --> 118 } 119 } 120 } 121 122 @helper RenderBlock(Block item) 123 { 124 bool debug = !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("debug")) ? Convert.ToBoolean(HttpContext.Current.Request.QueryString.Get("debug")) : false; 125 126 if (item.Template != null) 127 { 128 @BlocksPage.RenderTemplate(item.Template) 129 } 130 131 if (item.Component != null) 132 { 133 string customSufix = "Custom"; 134 string methodName = item.Component.HelperName; 135 136 ComponentBase[] methodParameters = new ComponentBase[1]; 137 methodParameters[0] = item.Component; 138 Type methodType = this.GetType(); 139 140 MethodInfo customMethod = methodType.GetMethod(methodName + customSufix); 141 MethodInfo generalMethod = methodType.GetMethod(methodName); 142 143 try { 144 if (debug) { 145 <!-- Component: @methodName.Replace("Render", "") --> 146 } 147 @customMethod.Invoke(this, methodParameters).ToString(); 148 } catch { 149 try { 150 @generalMethod.Invoke(this, methodParameters).ToString(); 151 } catch(Exception ex) { 152 throw new Exception(item.Component.GetType().Name + " method '" + methodName +"' could not be invoked", ex); 153 } 154 } 155 } 156 157 if (item.BlocksList.Count > 0 && !item.SkipRenderBlocksList) 158 { 159 @RenderBlockList(item.BlocksList) 160 } 161 } 162 163 @*--- END: Base block renderers ---*@ 164 165 @using Dynamicweb.Rapido.Blocks.Components 166 @using Dynamicweb.Rapido.Blocks.Components.General 167 @using Dynamicweb.Rapido.Blocks 168 @using System.IO 169 170 @* Required *@ 171 @using Dynamicweb.Rapido.Blocks.Components 172 @using Dynamicweb.Rapido.Blocks.Components.General 173 @using Dynamicweb.Rapido.Blocks 174 175 176 @helper Render(ComponentBase component) 177 { 178 if (component != null) 179 { 180 @component.Render(this) 181 } 182 } 183 184 @* Components *@ 185 @using System.Reflection 186 @using Dynamicweb.Rapido.Blocks.Components.General 187 188 189 @* Component *@ 190 191 @helper RenderIcon(Icon settings) 192 { 193 if (settings != null) 194 { 195 string color = settings.Color != null ? "style=\"color: " + settings.Color + "\"" : ""; 196 197 if (settings.Name != null) 198 { 199 if (string.IsNullOrEmpty(settings.Label)) 200 { 201 <i class="@settings.Prefix @settings.Name @settings.CssClass" @color></i> 202 } 203 else 204 { 205 if (settings.LabelPosition == IconLabelPosition.Before) 206 { 207 <div class="u-flex u-flex--align-items-center @settings.CssClass">@settings.Label <i class="@settings.Prefix @settings.Name u-margin-left" @color></i></div> 208 } 209 else 210 { 211 <div class="u-flex u-flex--align-items-center @settings.CssClass"><i class="@settings.Prefix @settings.Name u-margin-right--lg u-w20px" @color></i>@settings.Label</div> 212 } 213 } 214 } 215 else if (!string.IsNullOrEmpty(settings.Label)) 216 { 217 @settings.Label 218 } 219 } 220 } 221 @using System.Reflection 222 @using Dynamicweb.Rapido.Blocks.Components.General 223 @using Dynamicweb.Rapido.Blocks.Components 224 @using Dynamicweb.Core 225 226 @* Component *@ 227 228 @helper RenderButton(Button settings) 229 { 230 if (settings != null && (!string.IsNullOrEmpty(settings.Title) || settings.Icon != null)) 231 { 232 Dictionary<string, string> attributes = new Dictionary<string, string>(); 233 List<string> classList = settings.CssClass != null ? settings.CssClass.Split(' ').ToList() : new List<string>(); 234 if (settings.Disabled) { 235 attributes.Add("disabled", "true"); 236 classList.Add("disabled"); 237 } 238 239 if (!string.IsNullOrEmpty(settings.ConfirmText) || !string.IsNullOrEmpty(settings.ConfirmTitle)) 240 { 241 settings.Id = !string.IsNullOrEmpty(settings.Id) ? settings.Id : Guid.NewGuid().ToString("N"); 242 @RenderConfirmDialog(settings); 243 settings.OnClick = "document.getElementById('" + settings.Id + "ModalTrigger').checked = true"; 244 } 245 246 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 247 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 248 if (!string.IsNullOrEmpty(settings.AltText)) 249 { 250 attributes.Add("title", settings.AltText); 251 } 252 else if (!string.IsNullOrEmpty(settings.Title)) 253 { 254 string cleanTitle = Regex.Replace(settings.Title, "<.*?>", String.Empty); 255 cleanTitle = cleanTitle.Replace("&nbsp;", " "); 256 attributes.Add("title", cleanTitle); 257 } 258 259 var onClickEvents = new List<string>(); 260 if (!string.IsNullOrEmpty(settings.OnClick)) 261 { 262 onClickEvents.Add(settings.OnClick); 263 } 264 if (!string.IsNullOrEmpty(settings.Href)) 265 { 266 onClickEvents.Add("location.href='" + settings.Href + "'"); 267 } 268 if (onClickEvents.Count > 0) 269 { 270 attributes.Add("onClick", string.Join(";", onClickEvents)); 271 } 272 273 //If link is a paragraph, go to that paragraph 274 if (!string.IsNullOrEmpty(settings.Href) && settings.Href.Contains("#")) 275 { 276 int pageId = Dynamicweb.Environment.Helpers.LinkHelper.GetInternalPageId(settings.Href); 277 string[] hrefSplit = settings.Href.Trim().Split('#'); 278 string idToScrollTo = "p_" + hrefSplit[1].Trim(); 279 280 if (Pageview.ID == pageId) 281 { 282 attributes.Remove("onClick"); 283 attributes.Add("onClick", "window.scrollIntoViewHeaderOffset(document.getElementById('" + idToScrollTo + "'))"); 284 } 285 else if (pageId != 0) 286 { 287 settings.Href = hrefSplit[0].Trim() + "#" + hrefSplit[1].Trim(); 288 attributes.Remove("onClick"); 289 attributes.Add("onClick", "location.href='" + settings.Href + "'"); 290 } 291 } 292 293 if (settings.ButtonLayout != ButtonLayout.None) 294 { 295 classList.Add("btn"); 296 string btnLayout = Enum.GetName(typeof(ButtonLayout), settings.ButtonLayout).ToLower(); 297 if (btnLayout == "linkclean") 298 { 299 btnLayout = "link-clean"; //fix 300 } 301 classList.Add("btn--" + btnLayout); 302 } 303 304 if (settings.Icon == null) 305 { 306 settings.Icon = new Icon(); 307 } 308 309 settings.Icon.CssClass += Enum.GetName(typeof(ButtonLayout), settings.ButtonLayout).ToLower() != "linkclean" ? " u-flex--align-center" : ""; 310 settings.Icon.Label = settings.Title; 311 312 attributes.Add("type", Enum.GetName(typeof(ButtonType), settings.ButtonType).ToLower()); 313 314 <button class="@string.Join(" ", classList) dw-mod" @ComponentMethods.AddAttributes(attributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)>@Render(settings.Icon)</button> 315 } 316 } 317 318 @helper RenderConfirmDialog(Button settings) 319 { 320 Modal confirmDialog = new Modal { 321 Id = settings.Id, 322 Width = ModalWidth.Sm, 323 Heading = new Heading 324 { 325 Level = 2, 326 Title = settings.ConfirmTitle 327 }, 328 BodyText = settings.ConfirmText 329 }; 330 331 confirmDialog.AddAction(new Button { Title = Translate("Cancel"), ButtonLayout = ButtonLayout.Secondary, OnClick = "document.getElementById('" + settings.Id + "ModalTrigger').checked = false"}); 332 confirmDialog.AddAction(new Button { Title = Translate("OK"), ButtonLayout = ButtonLayout.Primary, OnClick = "document.getElementById('" + settings.Id + "ModalTrigger').checked = false;" + settings.OnClick }); 333 334 @Render(confirmDialog) 335 } 336 @using Dynamicweb.Rapido.Blocks.Components.General 337 @using Dynamicweb.Rapido.Blocks.Components 338 @using Dynamicweb.Core 339 340 @helper RenderDashboard(Dashboard settings) 341 { 342 var widgets = settings.GetWidgets(); 343 344 if (!string.IsNullOrEmpty(settings.WidgetsBaseBackgroundColor)) 345 { 346 //set bg color for them 347 348 System.Drawing.Color color = System.Drawing.ColorTranslator.FromHtml(settings.WidgetsBaseBackgroundColor); 349 int r = Convert.ToInt16(color.R); 350 int g = Convert.ToInt16(color.G); 351 int b = Convert.ToInt16(color.B); 352 353 var count = widgets.Length; 354 var max = Math.Max(r, Math.Max(g, b)); 355 double step = 255.0 / (max * count); 356 var i = 0; 357 foreach (var widget in widgets) 358 { 359 i++; 360 361 var shade = "rgb(" + Converter.ToString(r * step * i).Replace(",", ".") + ", " + Converter.ToString(g * step * i).Replace(",", ".") + ", " + Converter.ToString(b * step * i).Replace(",", ".") + ")"; 362 widget.BackgroundColor = shade; 363 } 364 } 365 366 <div class="dashboard @settings.CssClass dw-mod" @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 367 @foreach (var widget in widgets) 368 { 369 <div class="dashboard__widget"> 370 @Render(widget) 371 </div> 372 } 373 </div> 374 } 375 @using Dynamicweb.Rapido.Blocks.Components.General 376 @using Dynamicweb.Rapido.Blocks.Components 377 378 @helper RenderDashboardWidgetLink(DashboardWidgetLink settings) 379 { 380 if (!string.IsNullOrEmpty(settings.Link)) 381 { 382 var backgroundStyles = ""; 383 if (!string.IsNullOrEmpty(settings.BackgroundColor)) 384 { 385 backgroundStyles = "style=\"background-color:" + settings.BackgroundColor + "\""; 386 } 387 388 <a href="@settings.Link" class="widget widget--link @settings.CssClass dw-mod" @backgroundStyles title="@settings.Title" @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 389 <div class="u-center-middle u-color-light"> 390 @if (settings.Icon != null) 391 { 392 settings.Icon.CssClass += "widget__icon"; 393 @Render(settings.Icon) 394 } 395 <div class="widget__title">@settings.Title</div> 396 </div> 397 </a> 398 } 399 } 400 @using Dynamicweb.Rapido.Blocks.Components.General 401 @using Dynamicweb.Rapido.Blocks.Components 402 403 @helper RenderDashboardWidgetCounter(DashboardWidgetCounter settings) 404 { 405 var backgroundStyles = ""; 406 if (!string.IsNullOrEmpty(settings.BackgroundColor)) 407 { 408 backgroundStyles = "style='background-color:" + settings.BackgroundColor + "'"; 409 } 410 411 <div class="widget @settings.CssClass dw-mod" @backgroundStyles @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 412 <div class="u-center-middle u-color-light"> 413 @if (settings.Icon != null) 414 { 415 settings.Icon.CssClass += "widget__icon"; 416 @Render(settings.Icon) 417 } 418 <div class="widget__counter">@settings.Count</div> 419 <div class="widget__title">@settings.Title</div> 420 </div> 421 </div> 422 } 423 @using System.Reflection 424 @using Dynamicweb.Rapido.Blocks.Components.General 425 @using Dynamicweb.Rapido.Blocks.Components 426 @using Dynamicweb.Core 427 428 @* Component *@ 429 430 @helper RenderLink(Link settings) 431 { 432 if (settings != null && !string.IsNullOrEmpty(settings.Href) && (!string.IsNullOrEmpty(settings.Title) || settings.Icon != null)) 433 { 434 Dictionary<string, string> attributes = new Dictionary<string, string>(); 435 List<string> classList = settings.CssClass != null ? settings.CssClass.Split(' ').ToList() : new List<string>(); 436 if (settings.Disabled) 437 { 438 attributes.Add("disabled", "true"); 439 classList.Add("disabled"); 440 } 441 442 if (!string.IsNullOrEmpty(settings.AltText)) 443 { 444 attributes.Add("title", settings.AltText); 445 } 446 else if (!string.IsNullOrEmpty(settings.Title)) 447 { 448 attributes.Add("title", settings.Title); 449 } 450 451 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 452 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 453 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onClick", settings.OnClick); } 454 attributes.Add("href", settings.Href); 455 456 if (settings.ButtonLayout != ButtonLayout.None) 457 { 458 classList.Add("btn"); 459 string btnLayout = Enum.GetName(typeof(ButtonLayout), settings.ButtonLayout).ToLower(); 460 if (btnLayout == "linkclean") 461 { 462 btnLayout = "link-clean"; //fix 463 } 464 classList.Add("btn--" + btnLayout); 465 } 466 467 if (settings.Icon == null) 468 { 469 settings.Icon = new Icon(); 470 } 471 settings.Icon.Label = settings.Title; 472 473 if (settings.Target == LinkTargetType.Blank && settings.Rel == LinkRelType.None) 474 { 475 settings.Rel = LinkRelType.Noopener; 476 } 477 if (settings.Target != LinkTargetType.None) 478 { 479 attributes.Add("target", "_" + Enum.GetName(typeof(LinkTargetType), settings.Target).ToLower()); 480 } 481 if (settings.Download) 482 { 483 attributes.Add("download", "true"); 484 } 485 if (settings.Rel != LinkRelType.None) 486 { 487 attributes.Add("rel", Enum.GetName(typeof(LinkRelType), settings.Rel).ToLower()); 488 } 489 490 <a class="@string.Join(" ", classList) dw-mod" @ComponentMethods.AddAttributes(attributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)>@Render(settings.Icon)</a> 491 } 492 } 493 @using System.Reflection 494 @using Dynamicweb.Rapido.Blocks.Components 495 @using Dynamicweb.Rapido.Blocks.Components.General 496 @using Dynamicweb.Rapido.Blocks 497 498 499 @* Component *@ 500 501 @helper RenderRating(Rating settings) 502 { 503 if (settings.Score > 0) 504 { 505 int rating = settings.Score; 506 string iconType = "fa-star"; 507 508 switch (settings.Type.ToString()) { 509 case "Stars": 510 iconType = "fa-star"; 511 break; 512 case "Hearts": 513 iconType = "fa-heart"; 514 break; 515 case "Lemons": 516 iconType = "fa-lemon"; 517 break; 518 case "Bombs": 519 iconType = "fa-bomb"; 520 break; 521 } 522 523 <div class="u-ta-right"> 524 @for (int i = 0; i < settings.OutOf; i++) 525 { 526 <i class="@(rating > i ? "fas" : "far") @iconType"></i> 527 } 528 </div> 529 } 530 } 531 @using System.Reflection 532 @using Dynamicweb.Rapido.Blocks.Components.General 533 @using Dynamicweb.Rapido.Blocks.Components 534 535 536 @* Component *@ 537 538 @helper RenderSelectFieldOption(SelectFieldOption settings) 539 { 540 Dictionary<string, string> attributes = new Dictionary<string, string>(); 541 if (settings.Checked) { attributes.Add("selected", "true"); } 542 if (settings.Disabled) { attributes.Add("disabled", "true"); } 543 if (settings.Value != null) { attributes.Add("value", settings.Value); } 544 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 545 546 <option @ComponentMethods.AddAttributes(attributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)>@settings.Label</option> 547 } 548 @using System.Reflection 549 @using Dynamicweb.Rapido.Blocks.Components.General 550 @using Dynamicweb.Rapido.Blocks.Components 551 552 553 @* Component *@ 554 555 @helper RenderNavigation(Navigation settings) { 556 @RenderNavigation(new 557 { 558 id = settings.Id, 559 cssclass = settings.CssClass, 560 startLevel = settings.StartLevel, 561 endlevel = settings.EndLevel, 562 expandmode = settings.Expandmode, 563 sitemapmode = settings.SitemapMode, 564 template = settings.Template 565 }) 566 } 567 @using Dynamicweb.Rapido.Blocks.Components.General 568 @using Dynamicweb.Rapido.Blocks.Components 569 570 571 @* Component *@ 572 573 @helper RenderBreadcrumbNavigation(BreadcrumbNavigation settings) { 574 settings.Id = String.IsNullOrEmpty(settings.Id) ? "breadcrumb" : settings.Id; 575 settings.Template = String.IsNullOrEmpty(settings.Template) ? "Breadcrumb.xslt" : settings.Template; 576 settings.StartLevel = settings.StartLevel == 0 ? 1 : settings.StartLevel; 577 settings.EndLevel = settings.EndLevel == 10 ? 1 : settings.EndLevel; 578 settings.Expandmode = String.IsNullOrEmpty(settings.Expandmode) ? "all" : settings.Expandmode; 579 settings.SitemapMode = false; 580 581 @RenderNavigation(settings) 582 } 583 @using Dynamicweb.Rapido.Blocks.Components.General 584 @using Dynamicweb.Rapido.Blocks.Components 585 586 587 @* Component *@ 588 589 @helper RenderLeftNavigation(LeftNavigation settings) { 590 settings.Id = String.IsNullOrEmpty(settings.Id) ? "breadcrumb" : settings.Id; 591 settings.Template = String.IsNullOrEmpty(settings.Template) ? "Breadcrumb.xslt" : settings.Template; 592 settings.StartLevel = settings.StartLevel == 0 ? 1 : settings.StartLevel; 593 settings.EndLevel = settings.EndLevel == 10 ? 1 : settings.EndLevel; 594 settings.Expandmode = String.IsNullOrEmpty(settings.Expandmode) ? "all" : settings.Expandmode; 595 596 <div class="grid__cell"> 597 @RenderNavigation(settings) 598 </div> 599 } 600 @using System.Reflection 601 @using Dynamicweb.Rapido.Blocks.Components.General 602 @using Dynamicweb.Core 603 604 @* Component *@ 605 606 @helper RenderHeading(Heading settings) 607 { 608 if (settings != null && !string.IsNullOrEmpty(settings.Title)) 609 { 610 string color = settings.Color != null ? "style=\"color: " + settings.Color + "\"" : ""; 611 string tagName = settings.Level != 0 ? "h" + settings.Level.ToString() : "div"; 612 613 @("<" + tagName + " class=\"" + settings.CssClass + " dw-mod\" " + color + ">") 614 if (!string.IsNullOrEmpty(settings.Link)) 615 { 616 @Render(new Link { Href = settings.Link, Icon = settings.Icon, Title = settings.Title, ButtonLayout = ButtonLayout.None }) 617 } 618 else 619 { 620 if (settings.Icon == null) 621 { 622 settings.Icon = new Icon(); 623 } 624 settings.Icon.Label = settings.Title; 625 @Render(settings.Icon) 626 } 627 @("</" + tagName + ">"); 628 } 629 } 630 @using Dynamicweb.Rapido.Blocks.Components 631 @using Dynamicweb.Rapido.Blocks.Components.General 632 @using Dynamicweb.Rapido.Blocks 633 634 635 @* Component *@ 636 637 @helper RenderImage(Image settings) 638 { 639 if (settings.FilterPrimary != ImageFilter.None || settings.FilterSecondary != ImageFilter.None) 640 { 641 Dictionary<string, string> optionalAttributes = new Dictionary<string, string>(); 642 if (!string.IsNullOrEmpty(settings.FilterColor)) { optionalAttributes.Add("style", "background-color: " + settings.FilterColor); } 643 644 if (settings.Caption != null) 645 { 646 @:<div> 647 } 648 649 var primaryFilterClass = settings.FilterPrimary.ToString().ToLower(); 650 var secondaryFilterClass = settings.FilterSecondary.ToString().ToLower(); 651 652 <div class="image-filter image-filter--@primaryFilterClass u-position-relative dw-mod" @ComponentMethods.AddAttributes(optionalAttributes)> 653 <div class="image-filter image-filter--@secondaryFilterClass dw-mod"> 654 @if (settings.Link != null) 655 { 656 <a href="@settings.Link"> 657 @RenderTheImage(settings) 658 </a> 659 } 660 else 661 { 662 @RenderTheImage(settings) 663 } 664 </div> 665 </div> 666 667 if (settings.Caption != null) 668 { 669 <span class="image-caption dw-mod">@settings.Caption</span> 670 @:</div> 671 } 672 } 673 else 674 { 675 if (settings.Caption != null) 676 { 677 @:<div> 678 } 679 if (!string.IsNullOrEmpty(settings.Link)) 680 { 681 <a href="@settings.Link"> 682 @RenderTheImage(settings) 683 </a> 684 } 685 else 686 { 687 @RenderTheImage(settings) 688 } 689 690 if (settings.Caption != null) 691 { 692 <span class="image-caption dw-mod">@settings.Caption</span> 693 @:</div> 694 } 695 } 696 } 697 698 @helper RenderTheImage(Image settings) 699 { 700 if (settings != null) 701 { 702 string alternativeImage = !string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("Settings").GetString("AlternativeImage")) ? Pageview.AreaSettings.GetItem("Settings").GetFile("AlternativeImage").PathUrlEncoded : "/Images/missing_image.jpg"; 703 string placeholderImage = "/Files/Images/placeholder.gif"; 704 string imageEngine = "/Admin/Public/GetImage.ashx?"; 705 706 string imageStyle = ""; 707 708 switch (settings.Style) 709 { 710 case ImageStyle.Ball: 711 imageStyle = "grid__cell-img--ball"; 712 break; 713 714 case ImageStyle.Triangle: 715 imageStyle = "grid__cell-img--triangle"; 716 break; 717 } 718 719 if (settings.Style == ImageStyle.Ball || settings.Style == ImageStyle.Circle || settings.Style == ImageStyle.Triangle) 720 { 721 settings.ImageDefault.Crop = settings.ImageDefault.Crop == 5 ? settings.ImageDefault.Crop = 0 : settings.ImageDefault.Crop; 722 723 if (settings.ImageDefault != null) 724 { 725 settings.ImageDefault.Height = settings.ImageDefault.Width; 726 } 727 if (settings.ImageMedium != null) 728 { 729 settings.ImageMedium.Height = settings.ImageMedium.Width; 730 } 731 if (settings.ImageSmall != null) 732 { 733 settings.ImageSmall.Height = settings.ImageSmall.Width; 734 } 735 } 736 737 string defaultImage = imageEngine; 738 string imageSmall = ""; 739 string imageMedium = ""; 740 741 if (settings.DisableImageEngine) 742 { 743 defaultImage = settings.Path; 744 } 745 else 746 { 747 if (settings.ImageDefault != null) 748 { 749 defaultImage += Dynamicweb.Rapido.Services.Images.GetImagePathFromSettings(settings.ImageDefault); 750 751 if (settings.Path?.GetType() != typeof(string)) 752 { 753 defaultImage += settings.Path != null ? "Image=" + settings.Path.PathUrlEncoded : ""; 754 defaultImage += settings.Path != null ? "&" + settings.Path.GetFocalPointParameters() : ""; 755 } 756 else 757 { 758 defaultImage += settings.Path != null ? "Image=" + settings.Path : ""; 759 } 760 761 defaultImage += "&AlternativeImage=" + alternativeImage; 762 } 763 764 if (settings.ImageSmall != null) 765 { 766 imageSmall = "data-src-small=\"" + imageEngine; 767 imageSmall += Dynamicweb.Rapido.Services.Images.GetImagePathFromSettings(settings.ImageSmall); 768 769 if (settings.Path?.GetType() != typeof(string)) 770 { 771 imageSmall += settings.Path != null ? "Image=" + settings.Path.PathUrlEncoded : ""; 772 imageSmall += settings.Path != null ? "&" + settings.Path.GetFocalPointParameters() : ""; 773 } 774 else 775 { 776 imageSmall += settings.Path != null ? "Image=" + settings.Path : ""; 777 } 778 779 imageSmall += "&alternativeImage=" + alternativeImage; 780 781 imageSmall += "\""; 782 } 783 784 if (settings.ImageMedium != null) 785 { 786 imageMedium = "data-src-medium=\"" + imageEngine; 787 imageMedium += Dynamicweb.Rapido.Services.Images.GetImagePathFromSettings(settings.ImageMedium); 788 789 if (settings.Path?.GetType() != typeof(string)) 790 { 791 imageMedium += settings.Path != null ? "Image=" + settings.Path.PathUrlEncoded : ""; 792 imageMedium += settings.Path != null ? "&" + settings.Path.GetFocalPointParameters() : ""; 793 } 794 else 795 { 796 imageMedium += settings.Path != null ? "Image=" + settings.Path : ""; 797 } 798 799 imageMedium += "&alternativeImage=" + alternativeImage; 800 801 imageMedium += "\""; 802 } 803 } 804 805 Dictionary<string, string> optionalAttributes = new Dictionary<string, string>(); 806 if (!string.IsNullOrEmpty(settings.OnClick)) { optionalAttributes.Add("onclick", settings.OnClick); } 807 if (!string.IsNullOrEmpty(settings.Title)) 808 { 809 optionalAttributes.Add("alt", settings.Title); 810 optionalAttributes.Add("title", settings.Title); 811 } 812 813 if (settings.DisableLazyLoad) 814 { 815 <img id="@settings.Id" class="@imageStyle @settings.CssClass dw-mod" src="@defaultImage" @ComponentMethods.AddAttributes(optionalAttributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes) /> 816 } 817 else 818 { 819 <img id="@settings.Id" class="b-lazy @imageStyle @settings.CssClass dw-mod" src="@placeholderImage" data-src="@defaultImage" @imageSmall @imageMedium @ComponentMethods.AddAttributes(optionalAttributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes) /> 820 } 821 } 822 } 823 @using System.Reflection 824 @using Dynamicweb.Rapido.Blocks.Components.General 825 @using Dynamicweb.Rapido.Blocks.Components 826 827 @* Component *@ 828 829 @helper RenderFileField(FileField settings) 830 { 831 var attributes = new Dictionary<string, string>(); 832 if (string.IsNullOrEmpty(settings.Id)) 833 { 834 settings.Id = Guid.NewGuid().ToString("N"); 835 } 836 837 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 838 if (settings.Disabled) { attributes.Add("disabled", "true"); } 839 if (settings.Required) { attributes.Add("required", "true"); } 840 if (settings.Multiple) { attributes.Add("multiple", "true"); } 841 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 842 if (string.IsNullOrEmpty(settings.ChooseFileText)) 843 { 844 settings.ChooseFileText = Translate("Choose file"); 845 } 846 if (string.IsNullOrEmpty(settings.NoFilesChosenText)) 847 { 848 settings.NoFilesChosenText = Translate("No files chosen..."); 849 } 850 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 851 852 if (settings.Required && !String.IsNullOrEmpty(settings.Label)) { settings.Label += " <span class=\"required dw-mod\">*</span>"; } 853 854 string setValueToFakeInput = "FileUpload.setValueToFakeInput(this)"; 855 attributes.Add("onchange", setValueToFakeInput + (!string.IsNullOrEmpty(settings.OnChange) ? settings.OnChange : "")); 856 857 attributes.Add("type", "file"); 858 if (settings.Value != null) { attributes.Add("value", settings.Value); } 859 settings.CssClass = "u-full-width " + settings.CssClass; 860 861 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 862 863 <div class="form__field-group u-full-width @settings.WrapperCssClass dw-mod"> 864 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null ) 865 { 866 <div class="u-full-width"> 867 @if (!string.IsNullOrEmpty(settings.Label)) { <label for="@settings.Id" class="u-pull--left">@settings.Label</label> } 868 @if (settings.Link != null) { 869 <div class="u-pull--right"> 870 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 871 @Render(settings.Link) 872 </div> 873 } 874 </div> 875 876 } 877 878 @if (!string.IsNullOrEmpty(settings.HelpText)) 879 { 880 <small class="form__help-text">@settings.HelpText</small> 881 } 882 883 <div class="form__field-combi file-input u-no-margin dw-mod"> 884 <input @ComponentMethods.AddAttributes(resultAttributes) class="file-input__real-input" data-no-files-text="@settings.NoFilesChosenText" data-many-files-text="@Translate("files")" /> 885 <label for="@settings.Id" class="file-input__btn btn--secondary btn dw-mod">@settings.ChooseFileText</label> 886 <label for="@settings.Id" class="@settings.CssClass file-input__fake-input js-fake-input dw-mod">@settings.NoFilesChosenText</label> 887 @if (settings.UploadButton != null) 888 { 889 settings.UploadButton.CssClass += " btn--condensed u-no-margin"; 890 @Render(settings.UploadButton) 891 } 892 </div> 893 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 894 </div> 895 } 896 @using System.Reflection 897 @using Dynamicweb.Rapido.Blocks.Components.General 898 @using Dynamicweb.Rapido.Blocks.Components 899 @using Dynamicweb.Core 900 @using System.Linq 901 902 @* Component *@ 903 904 @helper RenderDateTimeField(DateTimeField settings) 905 { 906 if (string.IsNullOrEmpty(settings.Id)) 907 { 908 settings.Id = Guid.NewGuid().ToString("N"); 909 } 910 911 var textField = new TextField { 912 Name = settings.Name, 913 Id = settings.Id, 914 Label = settings.Label, 915 HelpText = settings.HelpText, 916 Value = settings.Value, 917 Disabled = settings.Disabled, 918 Required = settings.Required, 919 ErrorMessage = settings.ErrorMessage, 920 CssClass = settings.CssClass, 921 WrapperCssClass = settings.WrapperCssClass, 922 OnChange = settings.OnChange, 923 OnClick = settings.OnClick, 924 Link = settings.Link, 925 ExtraAttributes = settings.ExtraAttributes, 926 // 927 Placeholder = settings.Placeholder 928 }; 929 930 @Render(textField) 931 932 List<string> jsAttributes = new List<string>(); 933 934 jsAttributes.Add("mode: '" + Enum.GetName(typeof(DateTimeFieldMode), settings.Mode).ToLower() + "'"); 935 936 if (!string.IsNullOrEmpty(settings.DateFormat)) 937 { 938 jsAttributes.Add("dateFormat: '" + settings.DateFormat + "'"); 939 } 940 if (!string.IsNullOrEmpty(settings.MinDate)) 941 { 942 jsAttributes.Add("minDate: '" + settings.MinDate + "'"); 943 } 944 if (!string.IsNullOrEmpty(settings.MaxDate)) 945 { 946 jsAttributes.Add("maxDate: '" + settings.MaxDate + "'"); 947 } 948 if (settings.IsInline) 949 { 950 jsAttributes.Add("inline: " + Converter.ToString(settings.IsInline).ToLower()); 951 } 952 if (settings.EnableTime) 953 { 954 jsAttributes.Add("enableTime: " + Converter.ToString(settings.EnableTime).ToLower()); 955 } 956 if (settings.EnableWeekNumbers) 957 { 958 jsAttributes.Add("weekNumbers: " + Converter.ToString(settings.EnableWeekNumbers).ToLower()); 959 } 960 961 jsAttributes.AddRange(settings.GetFlatPickrOptions().Select(x => x.Key + ": " + x.Value)); 962 963 <script> 964 document.addEventListener("DOMContentLoaded", function () { 965 flatpickr("#@textField.Id", { 966 @string.Join(",", jsAttributes) 967 }); 968 }); 969 </script> 970 } 971 @using System.Reflection 972 @using Dynamicweb.Rapido.Blocks.Components.General 973 @using Dynamicweb.Rapido.Blocks.Components 974 975 @* Component *@ 976 977 @helper RenderTextField(TextField settings) 978 { 979 var attributes = new Dictionary<string, string>(); 980 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(settings.Id)) 981 { 982 settings.Id = Guid.NewGuid().ToString("N"); 983 } 984 985 /*base settings*/ 986 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 987 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 988 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 989 if (settings.Disabled) { attributes.Add("disabled", "true"); } 990 if (settings.Required) { attributes.Add("required", "true"); } 991 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 992 /*end*/ 993 994 if (!string.IsNullOrEmpty(settings.OnKeyUp)) { attributes.Add("onkeyup", settings.OnKeyUp); } 995 if (!string.IsNullOrEmpty(settings.OnInput)) { attributes.Add("oninput", settings.OnInput); } 996 if (!string.IsNullOrEmpty(settings.OnFocus)) { attributes.Add("onfocus", settings.OnFocus); } 997 if (settings.ReadOnly) { attributes.Add("readonly", "true"); } 998 if (settings.MaxLength != 0) { attributes.Add("maxlength", settings.MaxLength.ToString()); } 999 if (!string.IsNullOrEmpty(settings.Placeholder)) { attributes.Add("placeholder", settings.Placeholder); } 1000 attributes.Add("type", Enum.GetName(typeof(TextFieldType), settings.Type).ToLower()); 1001 if (settings.Type == TextFieldType.Password) { attributes.Add("autocomplete", "off"); }; 1002 if (settings.Value != null) { attributes.Add("value", settings.Value); } 1003 1004 settings.CssClass = "u-full-width " + settings.CssClass; 1005 1006 if (settings.Required && !String.IsNullOrEmpty(settings.Label)) { settings.Label += " <span class=\"required dw-mod\">*</span>"; } 1007 1008 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary(d => d.Key, d => d.Last().Value); 1009 1010 string noMargin = "u-no-margin"; 1011 if (!settings.ReadOnly) 1012 { 1013 noMargin = ""; 1014 } 1015 1016 if (!string.IsNullOrEmpty(settings.HelpText)) 1017 { 1018 settings.WrapperCssClass += " tooltip"; 1019 } 1020 1021 <div class="form__field-group u-full-width @noMargin @settings.WrapperCssClass dw-mod"> 1022 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null) 1023 { 1024 <div class="u-full-width"> 1025 @if (!string.IsNullOrEmpty(settings.Label)) 1026 {<label for="@settings.Id" class="u-pull--left">@settings.Label</label>} 1027 @if (settings.Link != null) 1028 { 1029 settings.Link.ButtonLayout = ButtonLayout.LinkClean; 1030 1031 <div class="u-pull--right"> 1032 @Render(settings.Link) 1033 </div> 1034 } 1035 </div> 1036 1037 } 1038 1039 @if (!string.IsNullOrEmpty(settings.HelpText)) 1040 { 1041 <span class="tooltip-content"> 1042 <span class="tooltip-text"> 1043 <span class="tooltip-inner"> 1044 @settings.HelpText 1045 </span> 1046 </span> 1047 </span> 1048 } 1049 1050 @if (settings.ActionButton != null) 1051 { 1052 settings.ActionButton.CssClass += " btn--condensed u-no-margin"; 1053 <div class="form__field-combi u-no-margin dw-mod"> 1054 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1055 @Render(settings.ActionButton) 1056 </div> 1057 } 1058 else 1059 { 1060 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1061 } 1062 1063 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1064 </div> 1065 } 1066 @using System.Reflection 1067 @using Dynamicweb.Rapido.Blocks.Components.General 1068 @using Dynamicweb.Rapido.Blocks.Components 1069 1070 @* Component *@ 1071 1072 @helper RenderNumberField(NumberField settings) 1073 { 1074 var attributes = new Dictionary<string, string>(); 1075 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(settings.Id)) 1076 { 1077 settings.Id = Guid.NewGuid().ToString("N"); 1078 } 1079 1080 /*base settings*/ 1081 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1082 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 1083 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 1084 if (settings.Disabled) { attributes.Add("disabled", "true"); } 1085 if (settings.Required) { attributes.Add("required", "true"); } 1086 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 1087 /*end*/ 1088 1089 if (!string.IsNullOrEmpty(settings.OnKeyUp)) { attributes.Add("onkeyup", settings.OnKeyUp); } 1090 if (!string.IsNullOrEmpty(settings.OnInput)) { attributes.Add("oninput", settings.OnInput); } 1091 if (!string.IsNullOrEmpty(settings.OnFocus)) { attributes.Add("onfocus", settings.OnFocus); } 1092 if (settings.ReadOnly) { attributes.Add("readonly", "true"); } 1093 if (settings.Max != null) { attributes.Add("max", settings.Max.ToString()); } 1094 if (settings.Min != null) { attributes.Add("min", settings.Min.ToString()); } 1095 if (settings.Step != 0) { attributes.Add("step", settings.Step.ToString()); } 1096 if (settings.Value != null && !string.IsNullOrEmpty(settings.Value.ToString())) { attributes.Add("value", settings.Value.ToString()); } 1097 attributes.Add("type", "number"); 1098 1099 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 1100 1101 <div class="form__field-group u-full-width @settings.WrapperCssClass dw-mod"> 1102 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null ) 1103 { 1104 <div class="u-full-width"> 1105 @if (!string.IsNullOrEmpty(settings.Label)) { <label for="@settings.Id" class="u-pull--left">@settings.Label</label> } 1106 @if (settings.Link != null) { 1107 <div class="u-pull--right"> 1108 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 1109 @Render(settings.Link) 1110 </div> 1111 } 1112 </div> 1113 1114 } 1115 1116 @if (!string.IsNullOrEmpty(settings.HelpText)) 1117 { 1118 <small class="form__help-text">@settings.HelpText</small> 1119 } 1120 1121 @if (settings.ActionButton != null) 1122 { 1123 settings.ActionButton.CssClass += " btn--condensed u-no-margin"; 1124 <div class="form__field-combi u-no-margin dw-mod"> 1125 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1126 @Render(settings.ActionButton) 1127 </div> 1128 } 1129 else 1130 { 1131 <div class="form__field-combi u-no-margin dw-mod"> 1132 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1133 </div> 1134 } 1135 1136 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1137 </div> 1138 } 1139 @using System.Reflection 1140 @using Dynamicweb.Rapido.Blocks.Components.General 1141 @using Dynamicweb.Rapido.Blocks.Components 1142 1143 1144 @* Component *@ 1145 1146 @helper RenderTextareaField(TextareaField settings) 1147 { 1148 Dictionary<string, string> attributes = new Dictionary<string, string>(); 1149 string id = settings.Id; 1150 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(id)) 1151 { 1152 id = Guid.NewGuid().ToString("N"); 1153 } 1154 1155 if (!string.IsNullOrEmpty(id)) { attributes.Add("id", id); } 1156 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 1157 if (!string.IsNullOrEmpty(settings.OnKeyUp)) { attributes.Add("onkeyup", settings.OnKeyUp); } 1158 if (!string.IsNullOrEmpty(settings.OnInput)) { attributes.Add("oninput", settings.OnInput); } 1159 if (!string.IsNullOrEmpty(settings.OnFocus)) { attributes.Add("onfocus", settings.OnFocus); } 1160 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 1161 if (!string.IsNullOrEmpty(settings.Placeholder)) { attributes.Add("placeholder", settings.Placeholder); } 1162 if (settings.Disabled) { attributes.Add("disabled", "true"); } 1163 if (settings.Required) { attributes.Add("required", "true"); } 1164 if (settings.ReadOnly) { attributes.Add("readonly", "true"); } 1165 if (settings.MaxLength != 0) { attributes.Add("maxlength", settings.MaxLength.ToString()); } 1166 if (settings.Rows != 0) { attributes.Add("rows", settings.Rows.ToString()); } 1167 attributes.Add("name", settings.Name); 1168 1169 if (settings.Required && !String.IsNullOrEmpty(settings.Label)) { settings.Label += " <span class=\"required dw-mod\">*</span>"; } 1170 1171 <div class="form__field-group @settings.WrapperCssClass dw-mod"> 1172 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null ) 1173 { 1174 <div class="u-full-width"> 1175 @if (!string.IsNullOrEmpty(settings.Label)) { <label for="@settings.Id" class="u-pull--left">@settings.Label</label> } 1176 @if (settings.Link != null) { 1177 <div class="u-pull--right"> 1178 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 1179 @Render(settings.Link) 1180 </div> 1181 } 1182 </div> 1183 } 1184 1185 @if (!string.IsNullOrEmpty(settings.HelpText)) 1186 { 1187 <small class="form__help-text">@settings.HelpText</small> 1188 } 1189 1190 <textarea class="u-full-width @settings.CssClass dw-mod" @ComponentMethods.AddAttributes(attributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)>@settings.Value</textarea> 1191 1192 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1193 </div> 1194 } 1195 @using System.Reflection 1196 @using Dynamicweb.Rapido.Blocks.Components.General 1197 @using Dynamicweb.Rapido.Blocks.Components 1198 1199 1200 @* Component *@ 1201 1202 @helper RenderHiddenField(HiddenField settings) { 1203 var attributes = new Dictionary<string, string>(); 1204 attributes.Add("type", "hidden"); 1205 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1206 if (settings.Value != null) { attributes.Add("value", settings.Value); } 1207 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 1208 1209 <input @ComponentMethods.AddAttributes(attributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)/> 1210 } 1211 @using System.Reflection 1212 @using Dynamicweb.Rapido.Blocks.Components.General 1213 @using Dynamicweb.Rapido.Blocks.Components 1214 1215 @* Component *@ 1216 1217 @helper RenderCheckboxField(CheckboxField settings) 1218 { 1219 var attributes = new Dictionary<string, string>(); 1220 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(settings.Id)) 1221 { 1222 settings.Id = Guid.NewGuid().ToString("N"); 1223 } 1224 1225 /*base settings*/ 1226 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1227 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 1228 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 1229 if (settings.Disabled) { attributes.Add("disabled", "true"); } 1230 if (settings.Required) { attributes.Add("required", "true"); } 1231 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 1232 /*end*/ 1233 1234 if (settings.Required && !String.IsNullOrEmpty(settings.Label)) { settings.Label += " <span class=\"required dw-mod\">*</span>"; } 1235 1236 attributes.Add("type", "checkbox"); 1237 if (settings.Checked) { attributes.Add("checked", "true"); } 1238 settings.CssClass = "form__control " + settings.CssClass; 1239 if (settings.Value != null) { attributes.Add("value", settings.Value); } 1240 1241 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 1242 1243 <div class="form__field-group @settings.WrapperCssClass dw-mod"> 1244 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1245 @if (!string.IsNullOrEmpty(settings.Label)) 1246 { 1247 <label for="@settings.Id" class="dw-mod">@settings.Label</label> 1248 } 1249 1250 @if (settings.Link != null) { 1251 <span> 1252 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 1253 @Render(settings.Link) 1254 </span> 1255 } 1256 1257 @if (!string.IsNullOrEmpty(settings.HelpText)) 1258 { 1259 <small class="form__help-text checkbox-help dw-mod">@settings.HelpText</small> 1260 } 1261 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1262 </div> 1263 } 1264 @using System.Reflection 1265 @using Dynamicweb.Rapido.Blocks.Components.General 1266 @using Dynamicweb.Rapido.Blocks.Components 1267 1268 1269 @* Component *@ 1270 1271 @helper RenderCheckboxListField(CheckboxListField settings) 1272 { 1273 <div class="form__field-group @settings.WrapperCssClass u-margin-bottom dw-mod" @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 1274 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null ) 1275 { 1276 <div class="u-full-width"> 1277 @if (!string.IsNullOrEmpty(settings.Label)) { <label for="@settings.Id" class="u-pull--left">@settings.Label</label> } 1278 @if (settings.Link != null) { 1279 <div class="u-pull--right"> 1280 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 1281 @Render(settings.Link) 1282 </div> 1283 } 1284 </div> 1285 1286 } 1287 1288 <div class="u-pull--left"> 1289 @if (!string.IsNullOrEmpty(settings.HelpText)) 1290 { 1291 <small class="form__help-text">@settings.HelpText</small> 1292 } 1293 1294 @foreach (var item in settings.Options) 1295 { 1296 if (settings.Required) 1297 { 1298 item.Required = true; 1299 } 1300 if (settings.Disabled) 1301 { 1302 item.Disabled = true; 1303 } 1304 if (!string.IsNullOrEmpty(settings.Name)) 1305 { 1306 item.Name = settings.Name; 1307 } 1308 if (!string.IsNullOrEmpty(settings.CssClass)) 1309 { 1310 item.CssClass += settings.CssClass; 1311 } 1312 1313 /* value is not supported */ 1314 1315 if (!string.IsNullOrEmpty(settings.OnClick)) 1316 { 1317 item.OnClick += settings.OnClick; 1318 } 1319 if (!string.IsNullOrEmpty(settings.OnChange)) 1320 { 1321 item.OnChange += settings.OnChange; 1322 } 1323 @Render(item) 1324 } 1325 1326 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1327 </div> 1328 1329 </div> 1330 } 1331 @using Dynamicweb.Rapido.Blocks.Components.General 1332 1333 @* Component *@ 1334 1335 @helper RenderSearch(Search settings) 1336 { 1337 var searchValue = HttpContext.Current.Request.QueryString.Get(settings.SearchParameter) ?? ""; 1338 var groupValue = HttpContext.Current.Request.QueryString.Get(settings.GroupsParameter) ?? ""; 1339 1340 if (string.IsNullOrEmpty(settings.Id)) 1341 { 1342 settings.Id = Guid.NewGuid().ToString("N"); 1343 } 1344 1345 var resultAttributes = new Dictionary<string, string>(); 1346 1347 if (settings.PageSize != 0) 1348 { 1349 resultAttributes.Add("data-page-size", settings.PageSize.ToString()); 1350 } 1351 if (!string.IsNullOrEmpty(settings.GroupItemsFeedUrl)) 1352 { 1353 resultAttributes.Add("data-groups-feed-url", settings.GroupItemsFeedUrl); 1354 if (!string.IsNullOrEmpty(groupValue)) 1355 { 1356 resultAttributes.Add("data-selected-group", groupValue); 1357 } 1358 if (!string.IsNullOrEmpty(settings.GroupsParameter)) 1359 { 1360 resultAttributes.Add("data-groups-parameter", settings.GroupsParameter); 1361 } 1362 } 1363 resultAttributes.Add("data-force-init", "true"); 1364 if (settings.GoToFirstSearchResultOnEnter) 1365 { 1366 resultAttributes.Add("data-go-to-first-search-result-on-enter", settings.GoToFirstSearchResultOnEnter.ToString().ToLower()); 1367 } 1368 if (!string.IsNullOrEmpty(settings.SearchParameter)) 1369 { 1370 resultAttributes.Add("data-search-parameter", settings.SearchParameter); 1371 } 1372 resultAttributes.Add("data-search-feed-url", settings.SearchData.SearchFeedUrl); 1373 resultAttributes.Add("data-results-template-id", settings.SearchData.ResultsTemplateId); 1374 1375 if (settings.SecondSearchData != null) 1376 { 1377 resultAttributes.Add("data-second-search-feed-url", settings.SecondSearchData.SearchFeedUrl); 1378 resultAttributes.Add("data-second-results-template-id", settings.SecondSearchData.ResultsTemplateId); 1379 } 1380 if (!string.IsNullOrEmpty(settings.ResultsPageUrl)) 1381 { 1382 resultAttributes.Add("data-results-page-url", settings.ResultsPageUrl); 1383 } 1384 1385 resultAttributes = resultAttributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 1386 1387 string searchFieldCss = (settings.SearchButton == null) ? "search--with-icon" : ""; 1388 1389 <div class="search @settings.CssClass @searchFieldCss js-search-data-source dw-mod" id="@settings.Id" @ComponentMethods.AddAttributes(resultAttributes)> 1390 @if (!string.IsNullOrEmpty(settings.GroupItemsFeedUrl)) 1391 { 1392 <button type="button" class="search__groups-btn dw-mod js-search-groups-btn">@Translate("All")</button> 1393 <ul class="dropdown dropdown--absolute-position dw-mod search__groups-results js-search-groups-list"></ul> 1394 } 1395 1396 <input type="text" class="search__field dw-mod js-search-field" placeholder="@settings.Placeholder" value="@searchValue"> 1397 1398 <div class="dropdown dropdown--absolute-position search__results dw-mod js-search-results @(settings.SecondSearchData != null ? "search__results--combined" : "")"> 1399 @if (settings.SecondSearchData != null) 1400 { 1401 <div class="search__column search__column--products dw-mod"> 1402 <div class="search__column-header dw-mod">@Translate("Products")</div> 1403 <ul class="search__results-list dw-mod js-search-results-list" id="@(settings.Id)_ResultsList"></ul> 1404 @if (!string.IsNullOrEmpty(settings.SearchData.ResultsPageUrl)) 1405 { 1406 @Render(new Link { 1407 Title = Translate("View all"), 1408 CssClass = "js-view-all-button u-margin", 1409 Href = settings.SearchData.ResultsPageUrl 1410 }); 1411 } 1412 </div> 1413 <div class="search__column search__column--pages dw-mod"> 1414 <div class="search__column-header">@Translate("Pages")</div> 1415 <ul class="search__results-list dw-mod js-search-results-second-list" id="@(settings.Id)_SecondResultsList"></ul> 1416 @if (!string.IsNullOrEmpty(settings.SecondSearchData.ResultsPageUrl)) 1417 { 1418 @Render(new Link 1419 { 1420 Title = Translate("View all"), 1421 CssClass = "js-view-all-button u-margin", 1422 Href = settings.SecondSearchData.ResultsPageUrl 1423 }); 1424 } 1425 </div> 1426 } 1427 else 1428 { 1429 <div class="search__column search__column--only dw-mod"> 1430 <ul class="search__results-list dw-mod js-search-results-list" id="@(settings.Id)_ResultsList"></ul> 1431 @if (!string.IsNullOrEmpty(settings.SearchData.ResultsPageUrl)) 1432 { 1433 @Render(new Link { 1434 Title = Translate("View all"), 1435 CssClass = "js-view-all-button u-margin", 1436 Href = settings.SearchData.ResultsPageUrl 1437 }); 1438 } 1439 </div> 1440 } 1441 </div> 1442 1443 @if (settings.SearchButton != null) 1444 { 1445 settings.SearchButton.CssClass += " search__btn js-search-btn"; 1446 if (settings.RenderDefaultSearchIcon) 1447 { 1448 settings.SearchButton.Icon = new Icon { Name = Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SearchIcon").SelectedValue }; 1449 } 1450 @Render(settings.SearchButton); 1451 } 1452 </div> 1453 } 1454 @using System.Reflection 1455 @using Dynamicweb.Rapido.Blocks.Components.General 1456 @using Dynamicweb.Rapido.Blocks.Components 1457 1458 1459 @* Component *@ 1460 1461 @helper RenderSelectField(SelectField settings) 1462 { 1463 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(settings.Id)) 1464 { 1465 settings.Id = Guid.NewGuid().ToString("N"); 1466 } 1467 1468 <div class="form__field-group u-full-width @settings.WrapperCssClass dw-mod"> 1469 @if (!string.IsNullOrEmpty(settings.Label) || settings.Link != null ) 1470 { 1471 <div class="u-full-width"> 1472 @if (!string.IsNullOrEmpty(settings.Label)) { <label for="@settings.Id" class="u-pull--left">@settings.Label</label> } 1473 @if (settings.Link != null) { 1474 <div class="u-pull--right"> 1475 @{ settings.Link.ButtonLayout = ButtonLayout.LinkClean; } 1476 @Render(settings.Link) 1477 </div> 1478 } 1479 </div> 1480 } 1481 1482 @if (!string.IsNullOrEmpty(settings.HelpText)) 1483 { 1484 <small class="form__help-text">@settings.HelpText</small> 1485 } 1486 1487 @if (settings.ActionButton != null) 1488 { 1489 settings.ActionButton.CssClass += " btn--condensed u-no-margin"; 1490 <div class="form__field-combi u-no-margin dw-mod"> 1491 @RenderSelectBase(settings) 1492 @Render(settings.ActionButton) 1493 </div> 1494 } 1495 else 1496 { 1497 @RenderSelectBase(settings) 1498 } 1499 1500 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1501 </div> 1502 } 1503 1504 @helper RenderSelectBase(SelectField settings) 1505 { 1506 var attributes = new Dictionary<string, string>(); 1507 1508 /*base settings*/ 1509 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1510 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 1511 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 1512 if (settings.Disabled) { attributes.Add("disabled", "true"); } 1513 if (settings.Required) { attributes.Add("required", "true"); } 1514 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 1515 /*end*/ 1516 1517 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 1518 1519 <select @ComponentMethods.AddAttributes(resultAttributes) class="u-full-width @settings.CssClass dw-mod"> 1520 @if (settings.Default != null) 1521 { 1522 @Render(settings.Default) 1523 } 1524 1525 @foreach (var item in settings.Options) 1526 { 1527 if (settings.Value != null) { 1528 item.Checked = item.Value == settings.Value; 1529 } 1530 @Render(item) 1531 } 1532 </select> 1533 } 1534 @using System.Reflection 1535 @using Dynamicweb.Rapido.Blocks.Components.General 1536 @using Dynamicweb.Rapido.Blocks.Components 1537 1538 @* Component *@ 1539 1540 @helper RenderRadioButtonField(RadioButtonField settings) 1541 { 1542 var attributes = new Dictionary<string, string>(); 1543 if (!string.IsNullOrEmpty(settings.Label) && string.IsNullOrEmpty(settings.Id)) 1544 { 1545 settings.Id = Guid.NewGuid().ToString("N"); 1546 } 1547 1548 /*base settings*/ 1549 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1550 if (!string.IsNullOrEmpty(settings.OnClick)) { attributes.Add("onclick", settings.OnClick); } 1551 if (!string.IsNullOrEmpty(settings.OnChange)) { attributes.Add("onchange", settings.OnChange); } 1552 if (settings.Disabled) { attributes.Add("disabled", "true"); } 1553 if (settings.Required) { attributes.Add("required", "true"); } 1554 if (!string.IsNullOrEmpty(settings.Name)) { attributes.Add("name", settings.Name); } 1555 /*end*/ 1556 1557 attributes.Add("type", "radio"); 1558 if (settings.Checked) { attributes.Add("checked", "true"); } 1559 settings.CssClass = "form__control " + settings.CssClass; 1560 if (settings.Value != null) { attributes.Add("value", settings.Value); } 1561 1562 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary (d => d.Key, d => d.Last().Value); 1563 1564 <div class="form__field-group @settings.WrapperCssClass dw-mod"> 1565 <input @ComponentMethods.AddAttributes(resultAttributes) class="@settings.CssClass dw-mod" /> 1566 @if (!string.IsNullOrEmpty(settings.Label)) 1567 { 1568 <label for="@settings.Id" class="dw-mod">@settings.Label</label> 1569 } 1570 @if (!string.IsNullOrEmpty(settings.HelpText)) 1571 { 1572 <small class="form__help-text">@settings.HelpText</small> 1573 } 1574 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1575 </div> 1576 } 1577 @using System.Reflection 1578 @using Dynamicweb.Rapido.Blocks.Components.General 1579 @using Dynamicweb.Rapido.Blocks.Components 1580 1581 1582 @* Component *@ 1583 1584 @helper RenderRadioButtonListField(RadioButtonListField settings) 1585 { 1586 if (settings.Required && !String.IsNullOrEmpty(settings.Label)) { settings.Label += " <span class=\"required dw-mod\">*</span>"; } 1587 1588 <div class="form__field-group @settings.WrapperCssClass u-margin-bottom dw-mod" @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 1589 @if (!string.IsNullOrEmpty(settings.Label)) 1590 { 1591 <label>@settings.Label</label> 1592 } 1593 @if (!string.IsNullOrEmpty(settings.HelpText)) 1594 { 1595 <small class="form__help-text">@settings.HelpText</small> 1596 } 1597 1598 @foreach (var item in settings.Options) 1599 { 1600 if (settings.Required) 1601 { 1602 item.Required = true; 1603 } 1604 if (settings.Disabled) 1605 { 1606 item.Disabled = true; 1607 } 1608 if (!string.IsNullOrEmpty(settings.Name)) 1609 { 1610 item.Name = settings.Name; 1611 } 1612 if (settings.Value != null && settings.Value == item.Value) 1613 { 1614 item.Checked = true; 1615 } 1616 if (!string.IsNullOrEmpty(settings.OnClick)) 1617 { 1618 item.OnClick += settings.OnClick; 1619 } 1620 if (!string.IsNullOrEmpty(settings.OnChange)) 1621 { 1622 item.OnChange += settings.OnChange; 1623 } 1624 if (!string.IsNullOrEmpty(settings.CssClass)) 1625 { 1626 item.CssClass += settings.CssClass; 1627 } 1628 @Render(item) 1629 } 1630 1631 @Render(new NotificationMessage { Message = settings.ErrorMessage }) 1632 </div> 1633 } 1634 @using System.Reflection 1635 @using Dynamicweb.Rapido.Blocks.Components.General 1636 @using Dynamicweb.Rapido.Blocks.Components 1637 1638 1639 @* Component *@ 1640 1641 @helper RenderNotificationMessage(NotificationMessage settings) 1642 { 1643 if (!string.IsNullOrEmpty(settings.Message)) 1644 { 1645 var attributes = new Dictionary<string, string>(); 1646 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1647 1648 string messageTypeClass = Enum.GetName(typeof(NotificationMessageType), settings.MessageType).ToLower(); 1649 string messageLayoutClass = Enum.GetName(typeof(NotificationMessageLayout), settings.MessageLayout).ToLower(); 1650 string minHeightClass = settings.Icon != null ? "u-min-h70px" : ""; 1651 1652 <div class="notification-message-@messageTypeClass notification-message-@messageLayoutClass @messageLayoutClass @minHeightClass @settings.CssClass u-full-width dw-mod" @ComponentMethods.AddAttributes(attributes)> 1653 @if (settings.Icon != null) { 1654 settings.Icon.Label = !string.IsNullOrEmpty(settings.Icon.Label) ? settings.Message + settings.Icon.Label : settings.Message; 1655 @Render(settings.Icon) 1656 } else { 1657 @settings.Message 1658 } 1659 </div> 1660 } 1661 } 1662 @using Dynamicweb.Rapido.Blocks.Components.General 1663 1664 1665 @* Component *@ 1666 1667 @helper RenderHandlebarsRoot(HandlebarsRoot settings) { 1668 string preRender = !String.IsNullOrEmpty(settings.PreRenderScriptTemplate) ? "data-pre-render-template=\"" + settings.PreRenderScriptTemplate + "\"" : ""; 1669 1670 <div class="@settings.CssClass dw-mod js-handlebars-root" id="@settings.Id" data-template="@settings.ScriptTemplate" data-json-feed="@settings.FeedUrl" data-init-onload="@settings.InitOnLoad.ToString()" data-preloader="@settings.Preloader" @preRender> 1671 @if (settings.SubBlocks != null) { 1672 @RenderBlockList(settings.SubBlocks) 1673 } 1674 </div> 1675 } 1676 @using System.Reflection 1677 @using Dynamicweb.Rapido.Blocks.Components.General 1678 @using Dynamicweb.Rapido.Blocks.Components 1679 @using System.Text.RegularExpressions 1680 1681 1682 @* Component *@ 1683 1684 @helper RenderSticker(Sticker settings) { 1685 if (!String.IsNullOrEmpty(settings.Title)) { 1686 string size = settings.Size.ToString() != "None" ? "" + "stickers-container__tag--" + settings.Size.ToString().ToLower() : ""; 1687 string style = settings.Style.ToString() != "None" ? "" + "stickers-container__tag--" + settings.Style.ToString().ToLower() : ""; 1688 1689 Dictionary<String, String> optionalAttributes = new Dictionary<string, string>(); 1690 if (!String.IsNullOrEmpty(settings.Color) || !String.IsNullOrEmpty(settings.BackgroundColor)) { 1691 string styleTag = !String.IsNullOrEmpty(settings.Color) ? "color: " + settings.Color + "; " : ""; 1692 styleTag += !String.IsNullOrEmpty(settings.BackgroundColor) ? "background-color: " + settings.BackgroundColor + "; " : ""; 1693 optionalAttributes.Add("style", styleTag); 1694 } 1695 1696 <div class="stickers-container__tag @size @style @settings.CssClass dw-mod" @ComponentMethods.AddAttributes(optionalAttributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)>@settings.Title</div> 1697 } 1698 } 1699 1700 @using System.Reflection 1701 @using Dynamicweb.Rapido.Blocks.Components.General 1702 @using Dynamicweb.Rapido.Blocks.Components 1703 1704 1705 @* Component *@ 1706 1707 @helper RenderStickersCollection(StickersCollection settings) 1708 { 1709 if (settings.Stickers.Count > 0) 1710 { 1711 string position = "stickers-container--" + Regex.Replace(settings.Position.ToString(), "([a-z])([A-Z])", "$1-$2").ToLower(); 1712 1713 <div class="stickers-container @position @settings.CssClass dw-mod" @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 1714 @foreach (Sticker sticker in settings.Stickers) 1715 { 1716 @Render(sticker) 1717 } 1718 </div> 1719 } 1720 } 1721 1722 @using Dynamicweb.Rapido.Blocks.Components.General 1723 1724 1725 @* Component *@ 1726 1727 @helper RenderForm(Form settings) { 1728 if (settings != null) 1729 { 1730 Dictionary<string, string> optionalAttributes = new Dictionary<string, string>(); 1731 if (!string.IsNullOrEmpty(settings.Action)) { optionalAttributes.Add("action", settings.Action); }; 1732 if (!string.IsNullOrEmpty(settings.Name)) { optionalAttributes.Add("name", settings.Name); }; 1733 if (!string.IsNullOrEmpty(settings.OnSubmit)) { optionalAttributes.Add("onsubmit", settings.OnSubmit); }; 1734 var enctypes = new Dictionary<string, string> 1735 { 1736 { "multipart", "multipart/form-data" }, 1737 { "text", "text/plain" }, 1738 { "application", "application/x-www-form-urlencoded" } 1739 }; 1740 if (settings.Enctype != FormEnctype.none) { optionalAttributes.Add("enctype", enctypes[Enum.GetName(typeof(FormEnctype), settings.Enctype).ToLower()]); }; 1741 optionalAttributes.Add("method", settings.Method.ToString()); 1742 1743 if (!string.IsNullOrEmpty(settings.FormStartMarkup)) 1744 { 1745 @settings.FormStartMarkup 1746 } 1747 else 1748 { 1749 @:<form class="@settings.CssClass u-no-margin dw-mod" @ComponentMethods.AddAttributes(optionalAttributes) @ComponentMethods.AddAttributes(settings.ExtraAttributes)> 1750 } 1751 1752 foreach (var field in settings.GetFields()) 1753 { 1754 @Render(field) 1755 } 1756 1757 @:</form> 1758 } 1759 } 1760 @using System.Reflection 1761 @using Dynamicweb.Rapido.Blocks.Components.General 1762 @using Dynamicweb.Rapido.Blocks.Components 1763 1764 1765 @* Component *@ 1766 1767 @helper RenderText(Text settings) 1768 { 1769 @settings.Content 1770 } 1771 @using System.Reflection 1772 @using Dynamicweb.Rapido.Blocks.Components.General 1773 @using Dynamicweb.Rapido.Blocks.Components 1774 1775 1776 @* Component *@ 1777 1778 @helper RenderContentModule(ContentModule settings) { 1779 if (!string.IsNullOrEmpty(settings.Content)) 1780 { 1781 @settings.Content 1782 } 1783 } 1784 @using System.Reflection 1785 @using Dynamicweb.Rapido.Blocks.Components.General 1786 @using Dynamicweb.Rapido.Blocks.Components 1787 1788 1789 @* Component *@ 1790 1791 @helper RenderModal(Modal settings) { 1792 if (settings != null) 1793 { 1794 string modalId = !string.IsNullOrEmpty(settings.Id) ? settings.Id : Guid.NewGuid().ToString("N"); 1795 1796 string onchange = !string.IsNullOrEmpty(settings.OnClose) ? "onchange=\"if(!this.checked){" + settings.OnClose + "}\"" : ""; 1797 1798 <input type="checkbox" id="@(modalId)ModalTrigger" class="modal-trigger" @onchange /> 1799 1800 <div class="modal-container"> 1801 @if (!settings.DisableDarkOverlay) 1802 { 1803 <label for="@(modalId)ModalTrigger" id="@(modalId)ModalOverlay" class="modal-overlay"></label> 1804 } 1805 <div class="modal modal--@settings.Width.ToString().ToLower() modal-height--@settings.Height.ToString().ToLower()" id="@(modalId)Modal"> 1806 @if (settings.Heading != null) 1807 { 1808 if (!string.IsNullOrEmpty(settings.Heading.Title)) 1809 { 1810 <div class="modal__header"> 1811 @Render(settings.Heading) 1812 </div> 1813 } 1814 } 1815 <div class="modal__body @(settings.Width.ToString().ToLower() == "full" ? "modal__body--full" : "")"> 1816 @if (!string.IsNullOrEmpty(settings.BodyText)) 1817 { 1818 @settings.BodyText 1819 } 1820 @if (settings.BodyTemplate != null) 1821 { 1822 @settings.BodyTemplate 1823 } 1824 @{ 1825 var actions = settings.GetActions(); 1826 } 1827 </div> 1828 @if (actions.Length > 0) 1829 { 1830 <div class="modal__footer"> 1831 @foreach (var action in actions) 1832 { 1833 if (Pageview.Device.ToString() != "Mobile") { 1834 action.CssClass += " u-no-margin"; 1835 } else { 1836 action.CssClass += " u-full-width u-margin-bottom"; 1837 } 1838 1839 @Render(action) 1840 } 1841 </div> 1842 } 1843 <label class="modal__close-btn" for="@(modalId)ModalTrigger"></label> 1844 </div> 1845 </div> 1846 } 1847 } 1848 @using Dynamicweb.Rapido.Blocks.Components.General 1849 1850 @* Component *@ 1851 1852 @helper RenderMediaListItem(MediaListItem settings) 1853 { 1854 <div class="media-list-item @settings.CssClass dw-mod" @(!string.IsNullOrEmpty(settings.Id) ? "id=\"" + settings.Id + "\"" : "")> 1855 @if (!string.IsNullOrEmpty(settings.Label)) 1856 { 1857 if (!string.IsNullOrEmpty(settings.Link)) 1858 { 1859 @Render(new Link 1860 { 1861 Href = settings.Link, 1862 CssClass = "media-list-item__sticker dw-mod", 1863 ButtonLayout = ButtonLayout.None, 1864 Title = settings.Label, 1865 OnClick = !string.IsNullOrEmpty(settings.OnClick) ? settings.OnClick : "" 1866 }) 1867 } 1868 else if (!string.IsNullOrEmpty(settings.OnClick)) 1869 { 1870 <span class="media-list-item__sticker dw-mod" onclick="@(settings.OnClick)"> 1871 <span class="u-uppercase">@settings.Label</span> 1872 </span> 1873 } 1874 else 1875 { 1876 <span class="media-list-item__sticker media-list-item__sticker--no-link dw-mod"> 1877 <span class="u-uppercase">@settings.Label</span> 1878 </span> 1879 } 1880 } 1881 <div class="media-list-item__wrap"> 1882 <div class="media-list-item__info dw-mod"> 1883 <div class="media-list-item__header dw-mod"> 1884 @if (!string.IsNullOrEmpty(settings.Title)) 1885 { 1886 if (!string.IsNullOrEmpty(settings.Link)) 1887 { 1888 @Render(new Link 1889 { 1890 Href = settings.Link, 1891 CssClass = "media-list-item__name dw-mod", 1892 ButtonLayout = ButtonLayout.None, 1893 Title = settings.Title, 1894 OnClick = !string.IsNullOrEmpty(settings.OnClick) ? settings.OnClick : "" 1895 }) 1896 } 1897 else if (!string.IsNullOrEmpty(settings.OnClick)) 1898 { 1899 <span class="media-list-item__name dw-mod" onclick="@(settings.OnClick)">@settings.Title</span> 1900 } 1901 else 1902 { 1903 <span class="media-list-item__name media-list-item__name--no-link dw-mod">@settings.Title</span> 1904 } 1905 } 1906 1907 @if (!string.IsNullOrEmpty(settings.Status)) 1908 { 1909 <div class="media-list-item__state dw-mod">@settings.Status</div> 1910 } 1911 </div> 1912 @{ 1913 settings.InfoTable.CssClass += " media-list-item__parameters-table"; 1914 } 1915 1916 @Render(settings.InfoTable) 1917 </div> 1918 <div class="media-list-item__actions dw-mod"> 1919 <div class="media-list-item__actions-list dw-mod"> 1920 @{ 1921 var actions = settings.GetActions(); 1922 1923 foreach (ButtonBase action in actions) 1924 { 1925 action.ButtonLayout = ButtonLayout.None; 1926 action.CssClass += " media-list-item__action link"; 1927 1928 @Render(action) 1929 } 1930 } 1931 </div> 1932 1933 @if (settings.SelectButton != null && !string.IsNullOrEmpty(settings.SelectButton.Title)) 1934 { 1935 settings.SelectButton.CssClass += " u-no-margin"; 1936 1937 <div class="media-list-item__action-button"> 1938 @Render(settings.SelectButton) 1939 </div> 1940 } 1941 </div> 1942 </div> 1943 </div> 1944 } 1945 @using Dynamicweb.Rapido.Blocks.Components.General 1946 @using Dynamicweb.Rapido.Blocks.Components 1947 1948 @helper RenderTable(Table settings) 1949 { 1950 Dictionary<string, string> attributes = new Dictionary<string, string>(); 1951 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 1952 1953 var enumToClasses = new Dictionary<TableDesign, string> 1954 { 1955 { TableDesign.Clean, "table--clean" }, 1956 { TableDesign.Bordered, "table--bordered" }, 1957 { TableDesign.Striped, "table--striped" }, 1958 { TableDesign.Hover, "table--hover" }, 1959 { TableDesign.Compact, "table--compact" }, 1960 { TableDesign.Condensed, "table--condensed" }, 1961 { TableDesign.NoTopBorder, "table--no-top-border" } 1962 }; 1963 string tableDesignClass = ""; 1964 if (settings.Design != TableDesign.None) 1965 { 1966 tableDesignClass = enumToClasses[settings.Design]; 1967 } 1968 1969 if (!string.IsNullOrEmpty(settings.CssClass) || settings.Design != TableDesign.None) { attributes.Add("class", "table " + tableDesignClass + " " + settings.CssClass + " dw-mod"); } 1970 1971 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary(d => d.Key, d => d.Last().Value); 1972 1973 <table @ComponentMethods.AddAttributes(resultAttributes)> 1974 @if (settings.Header != null) 1975 { 1976 <thead> 1977 @Render(settings.Header) 1978 </thead> 1979 } 1980 <tbody> 1981 @foreach (var row in settings.Rows) 1982 { 1983 @Render(row) 1984 } 1985 </tbody> 1986 @if (settings.Footer != null) 1987 { 1988 <tfoot> 1989 @Render(settings.Footer) 1990 </tfoot> 1991 } 1992 </table> 1993 } 1994 @using Dynamicweb.Rapido.Blocks.Components.General 1995 @using Dynamicweb.Rapido.Blocks.Components 1996 1997 @helper RenderTableRow(TableRow settings) 1998 { 1999 Dictionary<string, string> attributes = new Dictionary<string, string>(); 2000 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 2001 2002 var enumToClasses = new Dictionary<TableRowDesign, string> 2003 { 2004 { TableRowDesign.NoBorder, "table__row--no-border" }, 2005 { TableRowDesign.Border, "table__row--border" }, 2006 { TableRowDesign.TopBorder, "table__row--top-line" }, 2007 { TableRowDesign.BottomBorder, "table__row--bottom-line" }, 2008 { TableRowDesign.Solid, "table__row--solid" } 2009 }; 2010 2011 string tableRowDesignClass = ""; 2012 if (settings.Design != TableRowDesign.None) 2013 { 2014 tableRowDesignClass = enumToClasses[settings.Design]; 2015 } 2016 2017 if (!string.IsNullOrEmpty(settings.CssClass) || settings.Design != TableRowDesign.None) { attributes.Add("class", "table__row " + tableRowDesignClass + " " + settings.CssClass + " dw-mod"); } 2018 2019 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary(d => d.Key, d => d.Last().Value); 2020 2021 <tr @ComponentMethods.AddAttributes(resultAttributes)> 2022 @foreach (var cell in settings.Cells) 2023 { 2024 if (settings.IsHeaderRow) 2025 { 2026 cell.IsHeader = true; 2027 } 2028 @Render(cell) 2029 } 2030 </tr> 2031 } 2032 @using Dynamicweb.Rapido.Blocks.Components.General 2033 @using Dynamicweb.Rapido.Blocks.Components 2034 @using Dynamicweb.Core 2035 2036 @helper RenderTableCell(TableCell settings) 2037 { 2038 Dictionary<string, string> attributes = new Dictionary<string, string>(); 2039 if (!string.IsNullOrEmpty(settings.Id)) { attributes.Add("id", settings.Id); } 2040 if (settings.Colspan != 0) { attributes.Add("colspan", Converter.ToString(settings.Colspan)); } 2041 if (settings.Rowspan != 0) { attributes.Add("rowspan", Converter.ToString(settings.Rowspan)); } 2042 if (!string.IsNullOrEmpty(settings.CssClass)) { attributes.Add("class", settings.CssClass + " dw-mod"); } 2043 2044 var resultAttributes = attributes.Concat(settings.ExtraAttributes).GroupBy(d => d.Key).ToDictionary(d => d.Key, d => d.Last().Value); 2045 2046 string tagName = settings.IsHeader ? "th" : "td"; 2047 2048 @("<" + tagName + " " + ComponentMethods.AddAttributes(resultAttributes) + ">") 2049 @settings.Content 2050 @("</" + tagName + ">"); 2051 } 2052 @using System.Linq 2053 @using Dynamicweb.Rapido.Blocks.Components.General 2054 2055 @* Component *@ 2056 2057 @helper RenderPagination(Dynamicweb.Rapido.Blocks.Components.General.Pagination settings) 2058 { 2059 var pageNumberQueryStringName = Dynamicweb.Rapido.Services.Pagination.GetPageNumberQueryStringName(settings); // Get the proper 'page number' query string parameter 2060 var queryParameters = Dynamicweb.Rapido.Services.Url.GetQueryParameters(pageNumberQueryStringName); // Get the NameValueCollection from the querystring 2061 2062 if (settings.NumberOfPages > 1) 2063 { 2064 string url = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + "/Default.aspx"; 2065 string ariaLabel = !string.IsNullOrWhiteSpace(settings.AriaLabel) ? settings.AriaLabel : Translate("Page navigation"); 2066 Dictionary<string, int> startAndEndPageNumber = Dynamicweb.Rapido.Services.Pagination.GetStartAndEndPageNumber(settings); 2067 2068 <div class="pager u-margin-top dw-mod @settings.CssClass" aria-label="@ariaLabel"> 2069 @if (settings.ShowPagingInfo) 2070 { 2071 <div class="pager__info dw-mod"> 2072 @Translate("Page") @settings.CurrentPageNumber @Translate("of") @settings.NumberOfPages 2073 </div> 2074 } 2075 <ul class="pager__list dw-mod"> 2076 @if (!string.IsNullOrWhiteSpace(settings.FirstPageUrl) && settings.ShowFirstAndLastControls) 2077 { 2078 @Render(new PaginationItem { Link = settings.FirstPageUrl, Icon = settings.FirstIcon }) 2079 } 2080 @if (!string.IsNullOrWhiteSpace(settings.PreviousPageUrl) && settings.ShowNextAndPrevControls) 2081 { 2082 @Render(new PaginationItem { Link = settings.PreviousPageUrl, Icon = settings.PrevIcon }) 2083 } 2084 @if (settings.GetPages().Any()) 2085 { 2086 foreach (var page in settings.GetPages()) 2087 { 2088 @Render(page) 2089 } 2090 } 2091 else 2092 { 2093 for (var page = startAndEndPageNumber["StartPage"]; page <= startAndEndPageNumber["EndPage"]; page++) 2094 { 2095 queryParameters = Dynamicweb.Rapido.Services.Url.UpdateQueryStringParameter(queryParameters, pageNumberQueryStringName, page.ToString()); 2096 @Render(new PaginationItem { Label = page.ToString(), Link = Dynamicweb.Rapido.Services.Url.BuildUri(url, queryParameters).PathAndQuery, IsActive = (settings.CurrentPageNumber == page) }); 2097 } 2098 } 2099 @if (!string.IsNullOrWhiteSpace(settings.NextPageUrl) && settings.ShowNextAndPrevControls) 2100 { 2101 @Render(new PaginationItem { Link = settings.NextPageUrl, Icon = settings.NextIcon }) 2102 } 2103 @if (!string.IsNullOrWhiteSpace(settings.LastPageUrl) && settings.ShowFirstAndLastControls) 2104 { 2105 @Render(new PaginationItem { Link = settings.LastPageUrl, Icon = settings.LastIcon }) 2106 } 2107 </ul> 2108 </div> 2109 } 2110 } 2111 2112 @helper RenderPaginationItem(PaginationItem settings) 2113 { 2114 if (settings.Icon == null) 2115 { 2116 settings.Icon = new Icon(); 2117 } 2118 2119 settings.Icon.Label = settings.Label; 2120 <li class="pager__btn dw-mod"> 2121 @if (settings.IsActive) 2122 { 2123 <span class="pager__num pager__num--current dw-mod"> 2124 @Render(settings.Icon) 2125 </span> 2126 } 2127 else 2128 { 2129 <a href="@settings.Link" class="pager__num dw-mod"> 2130 @Render(settings.Icon) 2131 </a> 2132 } 2133 </li> 2134 } 2135 2136 2137 @using Dynamicweb.Rapido.Blocks.Components.General 2138 @using Dynamicweb.Rapido.Blocks.Components.Ecommerce 2139 2140 2141 2142 2143 <span name="p_@Model.Item.ParagraphID" id="p_@Model.Item.ParagraphID"></span> 2144 2145 @functions { 2146 public string GenerateRgba(string color, string opacity) 2147 { 2148 color = color.Replace("#", ""); 2149 if (color.Length == 6) { 2150 return "rgba(" + Convert.ToInt32(color.Substring(0, 2), 16) + ", " + Convert.ToInt32(color.Substring(2, 2), 16) + ", " + Convert.ToInt32(color.Substring(4, 2), 16) + ", " + opacity + ");"; 2151 } else { 2152 return Convert.ToInt16(color).ToString(); 2153 } 2154 } 2155 } 2156 2157 @{ 2158 string link = !string.IsNullOrEmpty(Model.Item.GetString("Link")) ? Model.Item.GetString("Link") : ""; 2159 string linkTarget = link.Contains("http") ? "_blank" : "_self"; 2160 } 2161 2162 @if (!string.IsNullOrEmpty(link)) { 2163 <a href="@link" target="@linkTarget"> 2164 <div> 2165 @RenderTheContent() 2166 </div> 2167 </a> 2168 } else { 2169 <div class="u-full-height"> 2170 @RenderTheContent() 2171 </div> 2172 } 2173 2174 @helper RenderTheContent() { 2175 string innerPadding = Model.Item.GetList("Padding") != null ? " padding-size-" + Model.Item.GetList("Padding").SelectedValue.ToLower() : ""; 2176 innerPadding += Model.Item.GetList("PaddingPosition") != null ? " padding-position-" + Model.Item.GetList("PaddingPosition").SelectedValue.ToLower() : ""; 2177 2178 2179 if (!string.IsNullOrEmpty(Model.Item.GetString("Image"))) { 2180 int cropMode = !string.IsNullOrEmpty(Convert.ToString(Model.Item.GetList("ImageCrop"))) ? Convert.ToInt32(Model.Item.GetList("ImageCrop").SelectedValue) : 0; 2181 2182 Image image = new Image 2183 { 2184 Path = Model.Item.GetFile("Image") != null ? Model.Item.GetFile("Image").Path : "", 2185 CssClass = "background-image__cover", 2186 ImageDefault = new ImageSettings 2187 { 2188 Crop = cropMode, 2189 Height = 845, 2190 Width = 1920 2191 }, 2192 ImageMedium = new ImageSettings 2193 { 2194 Crop = cropMode, 2195 Height = 450, 2196 Width = 1024 2197 }, 2198 ImageSmall = new ImageSettings 2199 { 2200 Crop = cropMode, 2201 Height = 544, 2202 Width = 640 2203 } 2204 }; 2205 2206 @Render(image) 2207 } 2208 2209 <div class="content-row__item__body @innerPadding dw-mod"> 2210 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) { 2211 <div class="u-margin-bottom--lg"> 2212 @if (!Model.Item.GetBoolean("HideTitle")) { 2213 @Render(new Heading { Title = Model.Item.GetString("Title"), Level = 2, CssClass = "u-no-margin" }) 2214 } 2215 @Render(new Text { Content = Model.Item.GetString("Text") }) 2216 </div> 2217 } 2218 2219 @if (!string.IsNullOrEmpty(Model.Item.GetItem("ButtonOne").GetString("Title")) || !string.IsNullOrEmpty(Model.Item.GetItem("ButtonTwo").GetString("Title")) || !string.IsNullOrEmpty(Model.Item.GetItem("ButtonThree").GetString("Title"))) { 2220 <div class="buttons-collection u-block dw-mod"> 2221 @ParagraphButton(Model.Item.GetItem("ButtonOne")) 2222 @ParagraphButton(Model.Item.GetItem("ButtonTwo")) 2223 @ParagraphButton(Model.Item.GetItem("ButtonThree")) 2224 </div> 2225 } 2226 </div> 2227 } 2228 2229 @helper ParagraphButton(ItemViewModel item) { 2230 if (item != null) { 2231 if (!string.IsNullOrEmpty(item.GetString("Title"))) { 2232 Button button = new Button { 2233 Title = item.GetString("Title"), 2234 Href = item.GetString("Link"), 2235 2236 ButtonLayout = (ButtonLayout)System.Enum.Parse(typeof(ButtonLayout), char.ToUpper(item.GetList("Layout").SelectedValue[0]) + item.GetList("Layout").SelectedValue.Substring(1)) 2237 }; 2238 2239 if (!string.IsNullOrEmpty(item.GetString("Icon"))) { 2240 button.Icon = new Icon { 2241 CssClass = item.GetString("Icon") 2242 }; 2243 } 2244 2245 @Render(button) 2246 } 2247 } 2248 } 2249 2250 2251 2252 2253

Ofte stillede spørgsmål

 

 

01 - Kan man sende til en anden modtager

Ja, når du trykker næste ved kurven har du mulighed for at vælge at du gerne vil sende som en gave og dermed får du mulighed for at vælge en leveringsadresse.

 

02 - Kan man få kort med til modtageren

Ja, når du efter kurven vælger den skal sendes som gave, kommer der et felt hvor du kan skrive den ønskede hilsen.

 

03 - Kan pakken stilles hvis modtager ikke er hjemme

Er modtager ikke hjemme (eller har flexaftale)  tages pakken med til nærmeste pakkeshop. Der sendes information til den opgivende track&trace mail om hvor pakken kan afhentes.

 

04 - Bliver chokoladen pakket ind i gavepapir

Der er desværre ikke mulighed for yderligere indpakning. Du kan se på billedet i webshoppen præcis hvordan chokoladen er præsenteret.

 

05 - Hvad gør man hvis man ikke har modtagerens mailadresse

Modtagers mail og mobilnummer bruges til advisering såfremt pakken kommer til en pakkeshop.
Det er ok at du bruger dine egne informationer og på den måde selv sørger for at informere modtager om den ventende pakke.

 

06 - Gaven skal være en overraskelse

Modtagers mail og mobilnummer bruges til advisering såfremt pakken kommer til en pakkeshop, du kan tilføje dine egne oplysninger hvis du ønsker pakken skal være en overraskelse.

 

07 - Sender I til udlandet

Vi har på nuværende tidspunkt kun mulighed for levering til alle adresser i Danmark. 

08 - Hvordan bestiller man fra udlandet til levering i DK

Når du forsøger at skrive din udlandsadresse ind i ”dine informationer” vil du ofte opleve at systemet melde fejl.
For at komme uden om dette er du velkommen til at sætte en ”falsk” adresse ind i de felter hvor problemet opstår. Det er blot vigtigt at leveringsadresse er fuldstændig og korrekt.

 

09 - Hvordan handler jeg klubvarer

Det er nødvendigt at være medlem og logget ind for at handle klubvarer. Det er gratis at være medlem og når du forsøger at ligge et klubprodukt i kurven vil du blive ledt frem til login og oprettelse.

 

10 - Hvordan logger jeg ind

Du skal bruge din email-adresse og dit kodeord. Har du glemt det kan du nemt bestille et nyt ved at trykke på ”glemt kode?”.

 

11 - Kan jeg bestille per telefon

Vi har desværre ikke mulighed for at tage imod din ordre per telefon.

 

12 - Kan jeg ændre afsendelsesdagen

Har du rettelser til din ordre kan du sende en mail til kontakt@frellsen.dk, så vil vi hurtigt forsøge at hjælpe dig.

 

13 - Jeg har problemer med at gennemføre betalingen

Hold øje med om nogle af felterne er markeret med rødt. Det indikerer at det indtastede i feltet ikke er korrekt.

 

14 - Kan jeg betale med faktura

Via webshoppen er der kun mulighed for at handle via mobilepay og kreditkort

 

15 - Er min pakke leveret

Er pakken til dig selv vil du modtage en track&trace hvor du kan følge pakken på sin vej

 

16 - Kan jeg betale via EAN

Der kan ikke betales via EAN i shoppen. Send i stedet din bestilling med alle relevante firma og betalingsoplysninger samt eventuel leveringsadresse og hilsen til kontakt@frellsen.dk

 

17 - Kan jeg vælge en bestemt leveringsdato?

Der er desværre ikke mulighed for at vælge hvilken dato varen skal leveres, men du kan forvente 1-3 hverdages levering