Skip til hoved indholdet

Tilgængelighed på websitet Giv os feedback

Error executing template "Forms/Form/BleauBorger_Formular_WCAGmodul.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_c81dee8c7fb6441fbb5763dd074a4312.Execute() in E:\Dynamicweb.net\SolutionsCustom\aeroekommune.prod.bleaudev.dk\Files\Templates\Forms\Form\BleauBorger_Formular_WCAGmodul.cshtml:line 12
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Configuration 3 @using Dynamicweb.Rendering 4 @using Dynamicweb 5 @using Dynamicweb.Modules 6 @using System.Web 7 @using Dynamicweb.Content.Items 8 9 10 @{ 11 string designName = Pageview.Layout.Design.Name; 12 string RefUrl = System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); 13 String FormName = @GetString("Form.Name"); 14 } 15 16 <script src="/Files/Templates/Designs/@designName/assets/javascripts/bootstrapValidator.js"></script> 17 <script src="/Files/Templates/Designs/@designName/assets/javascripts/countrycode_DA_DK.js"></script> 18 <link rel="stylesheet" href="/Files/Templates/Designs/@designName/assets/stylesheets/bootstrapValidator.css" /> 19 <link rel="stylesheet" href="/Files/Templates/Designs/@designName/assets/stylesheets/BleauBorger_Formular.min.css" /> 20 21 22 @GetValue("Form.FormStart") 23 @GetValue("Form.SystemFields") 24 25 @{ 26 string formID = "#" + @GetString("Form.HtmlId"); 27 } 28 29 <script> 30 31 32 $(document).ready(function() { 33 34 $('@formID') 35 .bootstrapValidator({ 36 excluded: [':disabled', ':hidden', ':not(:visible)'], 37 feedbackIcons: { 38 valid: 'glyphicon glyphicon-ok', 39 invalid: 'glyphicon glyphicon-remove', 40 validating: 'glyphicon glyphicon-refresh' 41 } 42 }) 43 44 .on('status.field.bv', function (e, data) { 45 //enable submit button at all times 46 data.bv.disableSubmitButtons(false); 47 }) 48 49 .on('success.form.bv', function(e) { 50 // Reset the message element when the form is valid 51 $('#errors').html(''); 52 }) 53 54 55 //Links to validation error fields at the bottom 56 57 .on('error.field.bv', function(e, data) { 58 // data.bv --> The BootstrapValidator instance 59 // data.field --> The field name 60 // data.element --> The field element 61 62 63 // Get the messages of field 64 var messages = data.bv.getMessages(data.element); 65 66 // Remove the field messages if they're already available 67 $('#errors').find('li[data-field="' + data.field + '"]').remove(); 68 69 // Loop over the messages 70 for (var i in messages) { 71 // Create new 'li' element to show the message 72 $('<li/>') 73 .attr('data-field', data.field) 74 .wrapInner( 75 $('<a/>') 76 .attr('href', 'javascript: void(0);') 77 .html(messages[i]) 78 .on('click', function(e) { 79 // Focus on the invalid field 80 data.element.focus(); 81 }) 82 ) 83 .appendTo('#errors'); 84 85 //show errors and headline 86 $("#errordiv").attr("style", "display: block !important;") 87 } 88 89 90 // Hide the default message 91 // $field.data('bv.messages') returns the default element containing the messages 92 //data.element 93 //.data('bv.messages') 94 // .find('.help-block[data-bv-for="' + data.field + '"]') 95 // .hide(); 96 }) 97 98 .on('success.field.bv', function(e, data) { 99 // Remove the field messages 100 $('#errors').find('li[data-field="' + data.field + '"]').remove(); 101 if($("#errors li").length == 0){$('#errordiv').hide('');} 102 103 }); 104 105 106 107 }); 108 109 </script> 110 @foreach (LoopItem field in GetLoop("Fields")) 111 { 112 string required = field.GetBoolean("Field.Required") ? "required" : ""; 113 string ariareq = field.GetBoolean("Field.Required") ? "true" : "false"; 114 string isRequired = field.GetBoolean("Field.Required") ? "true" : "false"; 115 string ariaDescribedby = ""; 116 117 118 /*---------- Checkboks felt ----------*/ 119 120 if (field.GetString("Field.Type") == "CheckBox") 121 { 122 <div class="form-group has-feedback @required"> 123 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")group" class="control-label">@field.GetValue("Field.Name")</label> 124 125 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 126 {<div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div>} 127 128 <div class="checkbox"> 129 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label"> 130 <input type="@field.GetValue("Field.Type")" class="form-check-input" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" @required 131 data-bv-choice="@isRequired" 132 data-bv-choice-min="1" 133 data-bv-choice-message='Sæt kryds i "@Translate(@field.GetString("Field.Name"))"' 134 data-bv-trigger="click blur keyup" /> 135 @Translate(@field.GetString("Field.Name")) 136 </label> 137 </div> 138 </div> 139 } 140 141 142 /*---------- Checkbox liste felt ----------*/ 143 144 else if (field.GetString("Field.Type") == "CheckBoxList") 145 { 146 147 <div role="group" id="@field.GetValue("Field.SystemName")Group" aria-labelledby="@field.GetValue("Field.SystemName")" class="form-group has-feedback @required"> 148 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")" class="col-form-label control-label">@field.GetValue("Field.Name")</label> 149 150 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 151 {<div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div>} 152 153 @foreach (LoopItem option in field.GetLoop("Options")) 154 { 155 <div class="checkbox"> 156 <label for="@option.GetValue("Option.ID")"> 157 158 @if (option.GetString("Option.Sort") == "1") 159 { 160 <input type="checkbox" class="form-check-input" name="@field.GetString("Field.SystemName")" value="@option.GetValue("Option.Value")" id="@option.GetValue("Option.ID")" 161 data-bv-choice="@isRequired" 162 data-bv-choice-min="1" 163 data-bv-choice-message='Sæt kryds i "@Translate(@field.GetString("Field.Name"))"' 164 data-bv-trigger="click blur keyup" /> 165 } 166 else 167 { 168 <input type="checkbox" name="@field.GetString("Field.SystemName")" value="@option.GetValue("Option.Value")" id="@option.GetValue("Option.ID")" /> 169 } 170 171 @option.GetValue("Option.Text") 172 173 </label> 174 </div> 175 176 } 177 </div> 178 } 179 180 181 /*---------- Radio buttons felt ----------*/ 182 183 else if (field.GetString("Field.Type") == "Radio") 184 { 185 <div role="radiogroup" id="@field.GetValue("Field.SystemName")" aria-labelledby="@field.GetValue("Field.SystemName")label" class="form-group has-feedback @required"> 186 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="control-label">@field.GetValue("Field.Name")</label> 187 188 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 189 {<div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div>} 190 191 @foreach (LoopItem option in field.GetLoop("Options")) 192 { 193 <div class="radio"> 194 <label for="@field.GetValue("Field.SystemName")@option.GetValue("Option.ID")"> 195 196 @if (option.GetString("Option.Sort") == "1") 197 { 198 <input type="radio" id="@field.GetValue("Field.SystemName")@option.GetValue("Option.ID")" name="@field.GetValue("Field.SystemName")" value="@option.GetValue("Option.Value")" 199 data-bv-choice="@isRequired" 200 data-bv-choice-min="1" 201 data-bv-choice-message='Du har ikke udfyldt "@Translate(@field.GetString("Field.Name"))"' 202 data-bv-trigger="click blur keyup" /> 203 } 204 else 205 { 206 <input type="radio" id="@field.GetValue("Field.SystemName")@option.GetValue("Option.ID")" name="@field.GetValue("Field.SystemName")" value="@option.GetValue("Option.Value")" /> 207 } 208 209 @option.GetValue("Option.Text") 210 211 </label> 212 </div> 213 } 214 </div> 215 } 216 217 /*---------- Color felt ----------*/ 218 219 else if (field.GetString("Field.Type") == "color") 220 { 221 222 <div class="form-group has-feedback @required"> 223 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 224 225 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 226 { 227 <div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div> 228 } 229 230 <textarea class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" 231 data-bv-hexcolor="@isRequired" 232 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 233 data-bv-hexcolor-message="Farvekoden er ikke gyldig" 234 data-bv-trigger="blur keyup"></textarea> 235 </div> 236 } 237 238 /*---------- Email felt ----------*/ 239 240 else if (field.GetString("Field.Type") == "Email") 241 { 242 <div class="form-group has-feedback @required"> 243 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 244 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 245 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 246 <input type="email" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" placeholder="@field.GetString("Field.Placeholder")" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 247 data-bv-emailaddress="@isRequired" 248 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 249 data-bv-emailaddress-message="E-mailaddressen er ugyldig" 250 data-bv-trigger="blur keyup" /> 251 </div> 252 } 253 254 /*---------- Range felt ----------*/ 255 256 else if (field.GetString("Field.Type") == "Range") 257 { 258 <div class="form-group has-feedback"> 259 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 260 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 261 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description") (@Translate("Value", "nuværende værdi"): <span id="demo"></span>)</div>} 262 263 <input type="range" class="slider form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" placeholder="@field.GetString("Field.Placeholder")" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" 264 data-bv-between="@isRequired" 265 max="@field.GetValue("Field.MaxLength")" 266 min="0" 267 data-bv-between-message="Værdien skal være mellem 0 og @field.GetValue("Field.MaxLength")" /> 268 269 <script> 270 var slider = document.getElementById("@field.GetValue("Field.SystemName")"); 271 var output = document.getElementById("demo"); 272 output.innerHTML = slider.value; 273 274 slider.oninput = function() { 275 output.innerHTML = this.value; 276 } 277 </script> 278 279 280 </div> 281 } 282 283 /*---------- Notat felt ----------*/ 284 285 else if (field.GetString("Field.Type") == "Textarea") 286 { 287 <div class="form-group has-feedback @required"> 288 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 289 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 290 {<div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div>} 291 <textarea class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 292 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 293 data-bv-trigger="blur keyup"></textarea> 294 </div> 295 } 296 297 /*---------- URL felt ----------*/ 298 299 else if (field.GetString("Field.Type") == "Url") 300 { 301 <div class="form-group @required"> 302 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 303 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 304 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 305 <input class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" type="url" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 306 data-bv-uri="@isRequired" 307 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 308 data-bv-uri-message="Webadressen er ikke gyldig. Har du husket http:// eller https://?" 309 data-bv-trigger="blur keyup" /> 310 </div> 311 } 312 313 /*---------- Tilføj-filer felt ----------*/ 314 315 else if (field.GetString("Field.Type") == "File") 316 { 317 318 <div class="form-group @required"> 319 <label for="@field.GetValue("Field.SystemName")@field.GetValue("Form.ID")" class="control-label">@Translate(@field.GetString("Field.Name"))</label> 320 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 321 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 322 <input type="file" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")@field.GetValue("Form.ID")" multiple @required 323 data-bv-file="@isRequired" 324 data-bv-file-extension="jpeg,jpg,png,pdf,txt,doc,zip,rar,ppt,rtf,m4a,mp3,mp4,m4v,mov,xls,xlsx,html" 325 data-bv-file-message="Filtypen er ikke tilladt. Tilladte filtyper er jpeg, jpg, png, pdf, txt, doc, zip, rar, ppt, rtf, m4a, mp3, mp4, m4v, mov, xls, xlsx og html)" 326 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 327 data-bv-trigger="blur keyup" /> 328 </div> 329 } 330 331 /*---------- Selectboks ----------*/ 332 333 else if (field.GetString("Field.Type") == "Select") 334 { 335 <div class="form-group @required"> 336 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 337 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 338 {<div id="@field.GetValue("Field.SystemName")Desc" class="show">@field.GetValue("Field.Description")</div>} 339 <div>@field.GetString("Field.Control").Replace(" id", " data-bv-trigger = \"blur keyup\" class=\"form-control\" id")</div> 340 </div> 341 } 342 343 /*---------- Password felt ----------*/ 344 345 else if (field.GetString("Field.Type") == "Password") 346 { 347 <div class="form-group has-feedback @required"> 348 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 349 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 350 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 351 <input type="@field.GetValue("Field.Type")" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 352 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 353 data-bv-trigger="blur keyup" /> 354 </div> 355 } 356 357 /*---------- Telefon felt ----------*/ 358 359 else if (field.GetString("Field.Type") == "Tel") 360 { 361 <div class="form-group has-feedback @required"> 362 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 363 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 364 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 365 <input type="@field.GetValue("Field.Type")" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 366 data-bv-phone="@isRequired" 367 data-bv-phone-country="DK" 368 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 369 data-bv-trigger="blur keyup" /> 370 </div> 371 } 372 373 /*---------- Textinput ----------*/ 374 375 else if (field.GetString("Field.Type") == "TextInput") 376 { 377 <div class="form-group has-feedback @required"> 378 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 379 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 380 {<div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div>} 381 <input type="@field.GetValue("Field.Type")" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" aria-describedby="@field.GetValue("Field.SystemName")Desc" @required 382 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 383 data-bv-trigger="blur keyup" /> 384 </div> 385 } 386 387 /*---------- Text ----------*/ 388 389 else if (field.GetString("Field.Type") == "Text") 390 { 391 <div class="form-group has-feedback"> 392 <div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Control")</div> 393 </div> 394 } 395 396 /*---------- statisk billed felt ----------*/ 397 398 else if (field.GetString("Field.Type") == "Image") 399 { 400 <div class="form-group @required"> 401 <label for="@field.GetValue("Field.SystemName")" class="control-label">@field.GetValue("Field.Name")</label> 402 @field.GetString("Field.Control").Replace(" id", " alt=\"\" id") 403 <div>@field.GetString("Field.Description")</div> 404 </div> 405 } 406 407 /*---------- Skjult felt ----------*/ 408 409 410 411 else if (field.GetString("Field.Type") == "Hidden") 412 { 413 <div class="form-group has-feedback"> 414 @if(FormName == "wcagfeedback"){ 415 416 <input type="hidden" value="@RefUrl" id="skjult" name="skjult"> 417 }else{ 418 419 @field.GetString("Field.Control").Replace(" id", " value=\"\" id") 420 421 } 422 </div> 423 } 424 425 426 /*---------- default felt ----------*/ 427 428 else if (field.GetString("Field.Type") != "Reset" && field.GetString("Field.Type") != "Submit") 429 { 430 <div class="form-group has-feedback @required"> 431 <label for="@field.GetValue("Field.SystemName")" id="@field.GetValue("Field.SystemName")label" class="col-form-label control-label">@Translate(@field.GetString("Field.Name"))</label> 432 @if (!string.IsNullOrEmpty(Convert.ToString(@field.GetValue("Field.Description")))) 433 { 434 ariaDescribedby = "aria-describedby='" + @field.GetValue("Field.SystemName") + "Desc'"; 435 <div id="@field.GetValue("Field.SystemName")Desc">@field.GetValue("Field.Description")</div> 436 } 437 <input type="@field.GetValue("Field.Type")" class="form-control" name="@field.GetString("Field.SystemName")" id="@field.GetValue("Field.SystemName")" value="@field.GetString("Field.Value")" placeholder="@field.GetString("Field.Placeholder")" data-error="" aria-labelledby="@field.GetValue("Field.SystemName")label" @ariaDescribedby @required 438 data-bv-notempty-message='Udfyld venligst feltet "@Translate(@field.GetString("Field.Name"))"' 439 data-bv-trigger="blur keyup" /> 440 </div> 441 } 442 } 443 444 <!-- Show the messages in #errors --> 445 <div class="form-group hide" id="errordiv" role="alert" aria-atomic="true"> 446 <p><strong>Der er følgende fejl i formularen:</strong></p> 447 <div class="col-sm-12"> 448 <ul id="errors"></ul> 449 </div> 450 </div> 451 452 @foreach (LoopItem field in GetLoop("Fields")) 453 { 454 string required = field.GetBoolean("Field.Required") ? "required" : ""; 455 string ariareq = field.GetBoolean("Field.Required") ? "true" : "false"; 456 string isRequired = field.GetBoolean("Field.Required") ? "true" : "false"; 457 458 /*---------- Reset/annuller knap ----------*/ 459 460 if (field.GetString("Field.Type") == "Reset") 461 { 462 <div class="form-group @required"> 463 @field.GetString("Field.Control").Replace(" id", " class=\"btn btn-danger col-xs-4 col-sm-3 pull-right \" id") 464 </div> 465 } 466 467 /*---------- Send/submit knap ----------*/ 468 469 else if (field.GetString("Field.Type") == "Submit") 470 { 471 <div class="form-group @required"> 472 @field.GetString("Field.Control").Replace(" id", " class=\"btn btn-primary col-xs-5 col-sm-3 pull-left \" id") 473 </div> 474 } 475 } 476 477 @GetValue("Form.FormEnd") 478 <p>&nbsp;</p> 479 480