cleanup, temp fix for PT bug #160768940
This commit is contained in:
parent
7ae201655a
commit
774df938c4
@ -33,9 +33,9 @@ export default {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
validations: [
|
validations: [
|
||||||
{func: "hasEnvironments", message: "Provide at least one environment name."},
|
{func: this.hasEnvironments, message: "Provide at least one environment name."},
|
||||||
{func: "envNamesAreUnique", message: "Environment names must be unique."},
|
{func: this.envNamesAreUnique, message: "Environment names must be unique."},
|
||||||
{func: "environmentsHaveNames", message: "Environment names cannot be empty."},
|
{func: this.environmentsHaveNames, message: "Environment names cannot be empty."},
|
||||||
],
|
],
|
||||||
errors: [],
|
errors: [],
|
||||||
environments,
|
environments,
|
||||||
@ -60,7 +60,7 @@ export default {
|
|||||||
|
|
||||||
validate: function() {
|
validate: function() {
|
||||||
this.errors = this.validations.map((validation) => {
|
this.errors = this.validations.map((validation) => {
|
||||||
if (!this[validation.func]()) {
|
if (!validation.func()) {
|
||||||
return validation.message
|
return validation.message
|
||||||
}
|
}
|
||||||
}).filter(Boolean)
|
}).filter(Boolean)
|
||||||
|
@ -42,9 +42,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-for="title in errors">
|
<div> {# this extra div prevents this bug: https://www.pivotaltracker.com/story/show/160768940 #}
|
||||||
|
<div v-cloak v-for="title in errors" :key="title">
|
||||||
{{ Alert(message=None, level="error", vue_template=True) }}
|
{{ Alert(message=None, level="error", vue_template=True) }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="block-list project-list-item">
|
<div class="block-list project-list-item">
|
||||||
<header class="block-list__header block-list__header--grow">
|
<header class="block-list__header block-list__header--grow">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user