This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Umbraco.Core; | |
namespace MyUmbracoWebsite | |
{ | |
public class Startup : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
StaticFileHasher.HashFiles(umbracoApplication.Server.MapPath("~/css"), umbracoApplication.Server.MapPath("~/js")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace MyUmbracWebsite | |
{ | |
public static class StaticFileHasher | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
using UIOMatic.Attributes; | |
using UIOMatic.Example.GitHubIssues.Repo; | |
using Umbraco.Core.Persistence.DatabaseAnnotations; | |
namespace UIOMatic.Example.GitHubIssues.Models | |
{ | |
[UIOMatic("issues", "Issues", "Issue", | |
RepositoryType = typeof(GitHubIssuesRepo), | |
ShowOnSummaryDashboard = true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<setting key="DatePickerYearRange" value="10" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section alias="Umbraco.Forms.Migration"> | |
<areas> | |
<area>developer</area> | |
</areas> | |
<tab caption="Contour to Umbraco Forms"> | |
<control>/app_plugins/Umbraco.Forms.Migration/ContourToForms.ascx</control> | |
</tab> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Form ImportFormFromXml(XmlDocument xd, bool insert, string name= "") | |
{ | |
Form f = null; | |
XmlSerializer deserializer = new XmlSerializer(typeof(Form), "UmbracoContour"); | |
f = (Form)deserializer.Deserialize(new XmlNodeReader(xd.DocumentElement)); | |
var formOrig = (Form)deserializer.Deserialize(new XmlNodeReader(xd.DocumentElement)); ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FormsValidation : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
Umbraco.Forms.Web.Controllers.UmbracoFormsController.FormValidate += UmbracoFormsController_FormValidate; | |
} | |
void UmbracoFormsController_FormValidate(object sender, Umbraco.Forms.Mvc.FormValidationEventArgs e) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Umbraco.Forms.Core.Enums; | |
using System.Text.RegularExpressions; | |
using Umbraco.Forms.Data.Storage; | |
using System.Xml; | |
using System.Xml.XPath; | |
using System.Web; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model Umbraco.Forms.Mvc.Models.FieldViewModel | |
<input type="text" name="@Model.Name" id="@Model.Id" class="text" value="@Model.Value" maxlength="500" | |
@{if(Model.Mandatory || Model.Validate){<text>data-val="true"</text>}} | |
@{if (Model.Mandatory) {<text> data-val-required="@Model.RequiredErrorMessage"</text>}} | |
@{if (Model.Validate) {<text> data-val-regex="@Model.InvalidErrorMessage" data-regex="@Html.Raw(Model.Regex)"</text>}} | |
/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Textfield : FieldType | |
{ | |
[Attributes.Setting("DefaultValue", | |
description = "Enter a default value")] | |
public string DefaultValue { get; set; } | |
public Textfield() { | |
//Provider | |
this.Id = new Guid("3F92E01B-29E2-4a30-BF33-9DF5580ED52C"); | |
this.Name = "Textfield"; |