Skip to content

Commit

Permalink
merging over a bunch of fixes from contrib for element tags not corre…
Browse files Browse the repository at this point in the history
…ctly closed.
  • Loading branch information
clausjensen committed Aug 7, 2020
1 parent f25ee0a commit d00c075
Show file tree
Hide file tree
Showing 20 changed files with 216 additions and 163 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@

<div>
<div class="flex">
<umb-checkbox model="model.mandatoryRenderSection" text="{{vm.labels.sectionMandatory}}" />
<umb-checkbox model="model.mandatoryRenderSection"
text="{{vm.labels.sectionMandatory}}">
</umb-checkbox>
</div>

<div class="umb-insert-code-box__description">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@

<ng-form name="changePasswordForm">
<umb-control-group alias="resetPassword" label="@user_resetPassword" ng-show="vm.config.enableReset">
<umb-checkbox model="vm.passwordValues.reset" server-validation-field="resetPassword"
on-change="vm.showReset = !vm.showReset" />
<umb-checkbox model="vm.passwordValues.reset"
server-validation-field="resetPassword"
on-change="vm.showReset = !vm.showReset">
</umb-checkbox>
<span ng-messages="changePasswordForm.resetPassword.$error" show-validation-on-submit>
<span class="help-inline" ng-message="valServerField">{{changePasswordForm.resetPassword.errorMsg}}</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
name="publishVariantSelector"
model="variant.publish"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}"
>
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -38,6 +38,7 @@
<span class="umb-variant-selector-entry__description" ng-messages="publishVariantSelectorForm.publishVariantSelector.$error" show-validation-on-submit>
<span class="text-error" ng-message="valServerField">{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}</span>
</span>

</umb-checkbox>

<umb-variant-notification-list notifications="variant.notifications"></umb-variant-notification-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@

var vm = this;

vm.includeUnpublished = false;
vm.includeUnpublished = $scope.model.includeUnpublished || false;

vm.changeSelection = changeSelection;
vm.toggleIncludeUnpublished = toggleIncludeUnpublished;


function onInit() {

vm.variants = $scope.model.variants;
vm.displayVariants = vm.variants.slice(0);// shallow copy, we dont want to share the array-object(because we will be performing a sort method) but each entry should be shared (because we need validation and notifications).
vm.displayVariants = vm.variants.slice(0); // shallow copy, we don't want to share the array-object (because we will be performing a sort method) but each entry should be shared (because we need validation and notifications).
vm.labels = {};

// get localized texts for use in directives
if (!$scope.model.title) {
localizationService.localize("buttons_publishDescendants").then(function (value) {
$scope.model.title = value;
});
}
if (!vm.labels.includeUnpublished) {
localizationService.localize("content_includeUnpublished").then(function (value) {
vm.labels.includeUnpublished = value;
});
}

_.each(vm.variants, function (variant) {
variant.isMandatory = isMandatoryFilter(variant);
Expand Down Expand Up @@ -72,8 +77,9 @@
}

function toggleIncludeUnpublished() {
console.log("toggleIncludeUnpublished")
vm.includeUnpublished = !vm.includeUnpublished;
// make sure this value is pushed back to the scope
$scope.model.includeUnpublished = vm.includeUnpublished;
}

/** Returns true if publishing is possible based on if there are un-published mandatory languages */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
</div>

<div class="flex mb3">
<umb-toggle
checked="vm.includeUnpublished"
input-id="includeUnpublished"
on-click="vm.toggleIncludeUnpublished()"
class="mr2">
</umb-toggle>
<label for="includeUnpublished">
<localize key="content_includeUnpublished">Include drafts and unpublished content items.</localize>
</label>
<umb-toggle checked="vm.includeUnpublished"
on-click="vm.toggleIncludeUnpublished()"
class="mr2"
label-on="{{vm.labels.includeUnpublished}}"
label-off="{{vm.labels.includeUnpublished}}"
label-position="right"
show-labels="true"></umb-toggle>
</div>

</div>
Expand All @@ -26,15 +24,13 @@
</div>

<div class="flex mb3">
<umb-toggle
checked="vm.includeUnpublished"
input-id="includeUnpublished"
on-click="vm.toggleIncludeUnpublished()"
class="mr2">
</umb-toggle>
<label for="includeUnpublished">
<localize key="content_includeUnpublished">Include drafts and unpublished content items.</localize>
</label>
<umb-toggle checked="vm.includeUnpublished"
on-click="vm.toggleIncludeUnpublished()"
class="mr2"
label-on="{{vm.labels.includeUnpublished}}"
label-off="{{vm.labels.includeUnpublished}}"
label-position="right"
show-labels="true"></umb-toggle>
</div>

<div class="umb-list umb-list--condensed">
Expand All @@ -44,11 +40,11 @@
<div class="umb-variant-selector-entry" ng-class="{'umb-list-item--error': publishVariantSelectorForm.publishVariantSelector.$invalid}">

<umb-checkbox input-id="{{variant.htmlId}}"
name="publishVariantSelector"
model="variant.publish"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}"
>
name="publishVariantSelector"
model="variant.publish"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -66,6 +62,7 @@
<span class="umb-variant-selector-entry__description" ng-messages="publishVariantSelectorForm.publishVariantSelector.$error" show-validation-on-submit>
<span class="text-error" ng-message="valServerField">{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}</span>
</span>

</umb-checkbox>

<umb-variant-notification-list notifications="variant.notifications"></umb-variant-notification-list>
Expand Down
15 changes: 7 additions & 8 deletions src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
<ng-form name="saveVariantSelectorForm">
<div class="umb-variant-selector-entry" ng-class="{'umb-list-item--error': saveVariantSelectorForm.saveVariantSelector.$invalid}">

<umb-checkbox
input-id="{{variant.htmlId}}"
name="saveVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}"
>
<umb-checkbox input-id="{{variant.htmlId}}"
name="saveVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -42,12 +41,12 @@
<span class="umb-variant-selector-entry__description" ng-messages="saveVariantSelectorForm.saveVariantSelector.$error" show-validation-on-submit>
<span class="text-error" ng-message="valServerField">{{saveVariantSelectorForm.saveVariantSelector.errorMsg}}</span>
</span>

</umb-checkbox>

<umb-variant-notification-list notifications="variant.notifications"></umb-variant-notification-list>

</div>

</ng-form>
</div>
<br/>
Expand Down
22 changes: 8 additions & 14 deletions src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@
<ng-form name="scheduleSelectorForm" style="width:100%;">
<div class="umb-variant-selector-entry" ng-class="{'umb-list-item--error': scheduleSelectorForm.saveVariantReleaseDate.$invalid}">

<umb-checkbox
input-id="{{variant.htmlId}}"
name="saveVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}"
>
<umb-checkbox input-id="{{variant.htmlId}}"
name="saveVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -105,16 +104,14 @@
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
</span>
<span class="umb-variant-selector-entry__description"
ng-if="!scheduleSelectorForm.$invalid && !(variant.notifications && variant.notifications.length > 0)">
ng-if="!scheduleSelectorForm.$invalid && !(variant.notifications && variant.notifications.length > 0)">
<umb-variant-state variant="variant"></umb-variant-state>
<span ng-show="variant.language.isMandatory"> - <localize key="languages_mandatoryLanguage"></localize></span>
</span>

</umb-checkbox>

<div>



<div class="date-wrapper-mini date-wrapper-mini--checkbox">
<div class="date-wrapper-mini__date" ng-if="(variant.releaseDate || variant.save)">

Expand Down Expand Up @@ -183,12 +180,9 @@

</div>
</div>

</ng-form>
</div>
<br />
</div>

</div>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<div class="umb-variant-selector-entry" ng-class="{'umb-list-item--error': publishVariantSelectorForm.publishVariantSelector.$invalid}">

<umb-checkbox input-id="{{variant.htmlId}}"
name="publishVariantSelector"
model="variant.publish"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}"
>
name="publishVariantSelector"
model="variant.publish"
on-change="vm.changeSelection(variant)"
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -37,6 +37,7 @@
<span class="umb-variant-selector-entry__description" ng-messages="publishVariantSelectorForm.publishVariantSelector.$error" show-validation-on-submit>
<span class="text-error" ng-message="valServerField">{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}</span>
</span>

</umb-checkbox>

<umb-variant-notification-list notifications="variant.notifications"></umb-variant-notification-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
<ng-form name="unpublishVariantSelectorForm">
<div class="umb-variant-selector-entry" ng-class="{'umb-list-item--error': unpublishVariantSelectorForm.unpublishVariantSelector.$invalid}">

<umb-checkbox
input-id="{{variant.htmlId}}"
name="unpublishVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
disabled="variant.disabled"
server-validation-field="{{variant.htmlId}}"
>
<umb-checkbox input-id="{{variant.htmlId}}"
name="unpublishVariantSelector"
model="variant.save"
on-change="vm.changeSelection(variant)"
disabled="variant.disabled"
server-validation-field="{{variant.htmlId}}">

<span class="umb-variant-selector-entry__title" ng-if="!(variant.segment && variant.language)">
<span ng-bind="variant.displayName"></span>
<strong ng-if="variant.isMandatory" class="umb-control-required">*</strong>
Expand All @@ -42,17 +41,15 @@
<span class="umb-variant-selector-entry__description" ng-messages="publishVariantSelectorForm.publishVariantSelector.$error" show-validation-on-submit>
<span class="text-error" ng-message="valServerField">{{publishVariantSelectorForm.publishVariantSelector.errorMsg}}</span>
</span>

</umb-checkbox>

<umb-variant-notification-list notifications="variant.notifications"></umb-variant-notification-list>

</div>

</ng-form>
</div>
<br />
</div>

</div>

</div>
15 changes: 13 additions & 2 deletions src/Umbraco.Web.UI.Client/src/views/content/protect.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
</p>

<div class="pa-select-type">
<umb-radiobutton input-id="protectionTypeMember" name="protectionType" value="member" model="vm.type" text="" />

<umb-radiobutton input-id="protectionTypeMember"
name="protectionType"
value="member"
model="vm.type"
text="">
</umb-radiobutton>

<label for="protectionTypeMember" class="flex flex-column flex-auto">
<strong class="pa-access-header bold"><localize key="publicAccess_paMembers">Specific members protection</localize></strong>
Expand All @@ -28,7 +34,12 @@
</div>

<div class="pa-select-type">
<umb-radiobutton input-id="protectionTypeGroup" name="protectionType" value="group" model="vm.type" />

<umb-radiobutton input-id="protectionTypeGroup"
name="protectionType"
value="group"
model="vm.type">
</umb-radiobutton>

<label for="protectionTypeGroup" class="flex flex-column flex-auto">
<strong class="pa-access-header bold"><localize key="publicAccess_paGroups">Group based protection</localize></strong>
Expand Down
11 changes: 6 additions & 5 deletions src/Umbraco.Web.UI.Client/src/views/datatypes/delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,18 @@ <h5 class="mt4" style="margin-bottom: 20px;">

</div>

<umb-checkbox model="vm.confirmed" text="{{vm.labels.deleteConfirm}}">
<umb-checkbox model="vm.confirmed"
text="{{vm.labels.deleteConfirm}}">
</umb-checkbox>

</div>


<umb-confirm ng-if="vm.confirmed || vm.hasReferences === false"
on-confirm="vm.performDelete"
on-cancel="vm.cancel"
confirm-button-style="danger"
confirm-label-key="general_delete">
on-confirm="vm.performDelete"
on-cancel="vm.cancel"
confirm-button-style="danger"
confirm-label-key="general_delete">
</umb-confirm>
</div>
</ng-switch>
Expand Down
6 changes: 4 additions & 2 deletions src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ <h5><localize key="create_createUnder">Create an item under</localize> {{current
<umb-checkbox ng-if="model.disableTemplates === false"
name="collectionCreateTemplate"
model="model.collectionCreateTemplate"
text="Create template for the Parent Document Type" />
text="Create template for the Parent Document Type">
</umb-checkbox>
</umb-control-group>

<umb-control-group>
Expand All @@ -96,7 +97,8 @@ <h5><localize key="create_createUnder">Create an item under</localize> {{current
<umb-checkbox ng-if="model.disableTemplates === false"
name="collectionItemCreateTemplate"
model="model.collectionItemCreateTemplate"
text="Create template for the Item Document Type" />
text="Create template for the Item Document Type">
</umb-checkbox>
</umb-control-group>

<div class="mt3">
Expand Down
Loading

0 comments on commit d00c075

Please sign in to comment.