/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("<div class=\"row\" intent-id=\""); #line 7 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Section\SectionTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.Name)); #line default #line hidden this.Write("\">\r\n <div class=\"col\" intent-manage>\r\n"); #line 9 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Section\SectionTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ControlWriter.WriteControls(Model.InternalElement.ChildElements, " "))); #line default #line hidden this.Write("\r\n </div>\r\n</div>\r\n"); return(this.GenerationEnvironment.ToString()); }
public override void BeforeTemplateExecution() { base.BeforeTemplateExecution(); ControlWriterOutput = ControlWriter.WriteControls(Model.View.InternalElement.ChildElements, " "); }
/// <summary> /// Create the template output /// </summary> public override string TransformText() { this.Write("<form [formGroup]=\""); #line 8 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.DataModelPath)); #line default #line hidden this.Write("\" intent-manage intent-id=\""); #line 8 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Model.Name.Replace(" ", "").ToKebabCase())); #line default #line hidden this.Write("\">\r\n"); #line 9 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" foreach (var field in Model.FormFields) { #line default #line hidden #line 10 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" if (field.TypeReference.Element.Name == "Text Input") { #line default #line hidden this.Write(" <div class=\"form-group\" intent-id=\""); #line 11 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\">\r\n <label for=\""); #line 12 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\">"); #line 12 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n <input id=\""); #line 13 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-control\" formControlName=\""); #line 13 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"text\" />\r\n </div>\r\n"); #line 15 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } else if (field.TypeReference.Element.Name == "Checkbox") { #line default #line hidden this.Write(" <div class=\"form-check\" intent-id=\""); #line 16 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\">\r\n <input id=\""); #line 17 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-check-input\" formControlName=\""); #line 17 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"checkbox\" />\r\n <label for=\""); #line 18 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-check-label\">"); #line 18 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n </div>\r\n"); #line 20 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } else if (field.TypeReference.Element.Name == "Datepicker") { #line default #line hidden this.Write(" <div class=\"form-group\" intent-id=\""); #line 21 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\">\r\n <label for=\""); #line 22 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\">"); #line 22 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n <input id=\""); #line 23 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-control\" formControlName=\""); #line 23 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"text\" bsDatepicker=\"\" />\r\n </div>\r\n"); #line 25 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } else if (field.TypeReference.Element.Name == "Select") { #line default #line hidden this.Write(" <div class=\"form-group\" intent-id=\""); #line 26 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\">\r\n <label for=\""); #line 27 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\">"); #line 27 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n <mat-select id=\""); #line 28 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-control\" formControlName=\""); #line 28 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"text\">\r\n <mat-option *ngFor=\"let option of "); #line 29 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectItemsModel(field))); #line default #line hidden this.Write("\" [value]=\"option."); #line 29 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectValueField(field))); #line default #line hidden this.Write("\">\r\n {{ option."); #line 30 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectTextField(field))); #line default #line hidden this.Write(" }}\r\n </mat-option>\r\n </mat-select>\r\n </div>\r\n"); #line 34 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } else if (field.TypeReference.Element.Name == "Multi-Select") { #line default #line hidden this.Write(" <div class=\"form-group\" intent-id=\""); #line 35 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\">\r\n <label for=\""); #line 36 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\">"); #line 36 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n <mat-select id=\""); #line 37 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-control\" formControlName=\""); #line 37 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"text\" multiple=\"\">\r\n <mat-option *ngFor=\"let option of "); #line 38 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectItemsModel(field))); #line default #line hidden this.Write("\" [value]=\"option."); #line 38 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectValueField(field))); #line default #line hidden this.Write("\">\r\n {{ option."); #line 39 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(GetSelectTextField(field))); #line default #line hidden this.Write(" }}\r\n </mat-option>\r\n </mat-select>\r\n </div>\r\n"); #line 43 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } else if (field.TypeReference.Element.Name == "Custom") { #line default #line hidden this.Write(" <div class=\"form-group\" intent-id=\""); #line 44 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Id)); #line default #line hidden this.Write("\" intent-ignore>\r\n <label for=\""); #line 45 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\">"); #line 45 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.Name)); #line default #line hidden this.Write("</label>\r\n <input id=\""); #line 46 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" class=\"form-control\" formControlName=\""); #line 46 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(field.DataModelPath)); #line default #line hidden this.Write("\" type=\"text\" />\r\n </div>\r\n"); #line 48 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } #line default #line hidden #line 49 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" } #line default #line hidden #line 50 "C:\Dev\Intent.Modules.Web\Intent.Modules.Angular.Layout\Decorators\Controls\Form\FormTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(ControlWriter.WriteControls(Model.Sections.Select(x => x.InternalElement), " "))); #line default #line hidden this.Write("\r\n</form>\r\n"); return(this.GenerationEnvironment.ToString()); }