Skip to content

Commit

Permalink
Merge pull request #171 from Vrijdagonline/master
Browse files Browse the repository at this point in the history
Added Localization keys and null checks
  • Loading branch information
kjac authored Jan 31, 2018
2 parents 3c54d0b + 15e0c45 commit d8ab42d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Source/Umbraco/Plugin/editor/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ <h5 form-editor-localize key="validation.rules.header">If these rules are fulfil
<h5 form-editor-localize key="action.task.header">...perform this action:</h5>
<div class="form-action-task">
<select ng-model="action.task">
<option value="core.showfield">Show</option>
<option value="core.hidefield">Hide</option>
<option value="core.showfield" form-editor-localize key="action.task.showField">Show</option>
<option value="core.hidefield" form-editor-localize key="action.task.hideField">Hide</option>
</select>
<span>the field</span>
<span form-editor-localize key="action.task.theField">the field</span>
<select ng-model="action.field" ng-options="field.name for field in allValueFields()">
<option value=""></option>
</select>
Expand Down
3 changes: 3 additions & 0 deletions Source/Umbraco/Plugin/js/langs/da-dk.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
"actions.header": "Handlinger",
"actions.text": "Her kan du oprette handlinger, der viser eller skjuler felter baseret på andre felters værdi - f.eks. \"vis kun felt A hvis felt B ikke er tomt\".",
"action.task.header": "...skal denne handling udføres:",
"action.task.theField": "",
"action.task.showField": "",
"action.task.hideField": "",
"action.add": "Tilføj en handling",
"action.text.noFields": "Du skal tilføje felter til formularen, før du kan oprette handlinger.",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="form-group required @(Model.Invalid ? "has-error" : null) consent">

<div class="text">
@Html.Raw(Umbraco.ReplaceLineBreaksForHtml(Model.ConsentText))
@Html.Raw(Umbraco.ReplaceLineBreaksForHtml(String.IsNullOrWhiteSpace(Model.ConsentText) ? String.Empty : Model.ConsentText))
</div>

@if (string.IsNullOrWhiteSpace(Model.LinkText) == false && Model.Page != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inherits Umbraco.Web.Mvc.UmbracoViewPage<FormEditor.Fields.TextParagraphField>
<p>
@Html.Raw(Umbraco.ReplaceLineBreaksForHtml(Model.Text))
@Html.Raw(Umbraco.ReplaceLineBreaksForHtml(String.IsNullOrWhiteSpace(Model.Text) ? String.Empty : Model.Text))
</p>

0 comments on commit d8ab42d

Please sign in to comment.