Skip to content

Commit

Permalink
Fix Safari still showing save button for messages and groups with an …
Browse files Browse the repository at this point in the history
…empty name field
  • Loading branch information
renonick87 committed Mar 9, 2022
1 parent 5b9b322 commit d1aedde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
14 changes: 5 additions & 9 deletions src/components/ConsumerMessageDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
</div>
<!-- save button -->
<div v-if="!isNameDefined()">
<div v-if="!isNameDefined">
<br>
<p class="alert color-bg-red color-white d-table" role="alert">
The name field must be defined.
Expand All @@ -53,7 +53,7 @@
type="submit"
class="btn btn-card"
data-style="zoom-in"
v-if="!fieldsDisabled && isNameDefined()"
v-if="!fieldsDisabled && isNameDefined"
v-on:click="saveGroup()"
v-bind:loading="save_button_loading"
v-bind:class="{ 'btn-style-green': !message.is_deleted, 'btn-danger': message.is_deleted }">
Expand Down Expand Up @@ -225,15 +225,11 @@
}
});
},
"isNameDefined": function () {
if (!this.message.message_category) {
return false; //no name defined
}
return true; //no issues
},
},
computed: {
isNameDefined: function () {
return !!this.message.message_category;
},
fieldsDisabled: function () {
return (this.message.is_deleted || this.environment != 'STAGING');
},
Expand Down
14 changes: 5 additions & 9 deletions src/components/FunctionalGroupDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
</div>
<!-- save button -->

<div v-if="!isNameDefined()">
<div v-if="!isNameDefined">
<br>
<p class="alert color-bg-red color-white d-table" role="alert">
The name field must be defined.
Expand All @@ -140,7 +140,7 @@
type="submit"
class="btn btn-card"
data-style="zoom-in"
v-if="!fieldsDisabled && isNameDefined()"
v-if="!fieldsDisabled && isNameDefined"
v-on:click="saveGroup()"
v-bind:loading="save_button_loading"
v-bind:class="{ 'btn-style-green': !fg.is_deleted, 'btn-danger': fg.is_deleted }">
Expand Down Expand Up @@ -384,15 +384,11 @@ import { eventBus } from '../main.js';
}
});
},
"isNameDefined": function () {
if (!this.fg.name) {
return false; //no name defined
}
return true; //no issues
},
},
computed: {
isNameDefined: function () {
return !!this.fg.name;
},
consentPromptOptions: function () {
return this.consent_prompts.map(function (consentPrompt) {
return consentPrompt.name;
Expand Down

0 comments on commit d1aedde

Please sign in to comment.