-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathAlpacaFormBuilder.ascx.cs
More file actions
46 lines (37 loc) · 1.8 KB
/
Copy pathAlpacaFormBuilder.ascx.cs
File metadata and controls
46 lines (37 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#region Copyright
//
// Copyright (c) 2015
// by Satrabel
//
#endregion
#region Using Statements
using System;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Common;
using Satrabel.OpenContent.Components.Alpaca;
using DotNetNuke.Web.Client.ClientResourceManagement;
using DotNetNuke.Web.Client;
using Satrabel.OpenContent.Components.Settings;
#endregion
namespace Satrabel.OpenForm
{
public partial class AlpacaFormBuilder : PortalModuleBase
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
hlCancel.NavigateUrl = Globals.NavigateURL();
cmdSave.NavigateUrl = Globals.NavigateURL();
var ocGlobalSettings = new DnnGlobalSettingsRepository(ModuleContext.PortalId);
bool bootstrap = ocGlobalSettings.GetEditLayout() != AlpacaLayoutEnum.DNN;
bool loadBootstrap = bootstrap && ocGlobalSettings.GetLoadBootstrap();
bool loadGlyphicons = bootstrap && ocGlobalSettings.GetLoadGlyphicons();
AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, "" /*settings.Template.Uri().FolderPath*/, "builder");
alpaca.RegisterAll(true, loadBootstrap, loadGlyphicons);
ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenForm/js/builder/formbuilder.js", FileOrder.Js.DefaultPriority);
ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenForm/js/builder/formbuilder.css", FileOrder.Css.DefaultPriority);
//ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/bootstrap/js/bootstrap.min.js", FileOrder.Js.DefaultPriority);
//ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/bootstrap/css/bootstrap.min.css", FileOrder.Css.DefaultPriority);
}
}
}