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