Browse Source

fix contact deletion

pull/1/head
Jonathan Cobb 4 years ago
parent
commit
6e622f75c6
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      src/account/profile/PolicyPage.vue

+ 7
- 8
src/account/profile/PolicyPage.vue View File

@@ -89,7 +89,6 @@
<i aria-hidden="true" :class="messages.field_label_policy_contact_receivePromotionalMessages_icon" :title="messages.field_label_policy_contact_receivePromotionalMessages"></i> <i aria-hidden="true" :class="messages.field_label_policy_contact_receivePromotionalMessages_icon" :title="messages.field_label_policy_contact_receivePromotionalMessages"></i>
<span class="sr-only">{{messages.field_label_policy_contact_receivePromotionalMessages}}</span> <span class="sr-only">{{messages.field_label_policy_contact_receivePromotionalMessages}}</span>
</td> </td>
<td><!-- Edit --></td>
<td><!-- Delete --></td> <td><!-- Delete --></td>
</tr> </tr>
</thead> </thead>
@@ -216,11 +215,6 @@
<i aria-hidden="true" :class="messages.field_label_policy_contact_value_disabled_icon" :title="messages.message_false"></i> <i aria-hidden="true" :class="messages.field_label_policy_contact_value_disabled_icon" :title="messages.message_false"></i>
<span class="sr-only">{{messages.message_false}}</span> <span class="sr-only">{{messages.message_false}}</span>
</td> </td>

<td>
<i aria-hidden="true" :class="messages.button_label_edit_contact_icon" :title="messages.button_label_edit_contact"></i>
<span class="sr-only">{{messages.button_label_edit_contact}}</span>
</td>
<td> <td>
<i @click="removeContact(contact.uuid)" aria-hidden="true" :class="messages.button_label_remove_contact_icon" :title="messages.button_label_remove_contact"></i> <i @click="removeContact(contact.uuid)" aria-hidden="true" :class="messages.button_label_remove_contact_icon" :title="messages.button_label_remove_contact"></i>
<span class="sr-only">{{messages.button_label_remove_contact}}</span> <span class="sr-only">{{messages.button_label_remove_contact}}</span>
@@ -284,6 +278,13 @@
<input type="checkbox" id="receivePromotionalMessages" v-model="newContact.receivePromotionalMessages"> <input type="checkbox" id="receivePromotionalMessages" v-model="newContact.receivePromotionalMessages">
</div> </div>


<hr/>
<div class="form-group">
<label htmlFor="nick">{{messages.field_label_policy_contact_nick}}</label>
<input v-model="newContact.nick" name="nick" class="form-control"/>
<div v-if="contactSubmitted && errors.has('nick')" class="invalid-feedback d-block">{{ errors.first('nick') }}</div>
</div>

<hr/> <hr/>
<div class="form-group"> <div class="form-group">
<button class="btn btn-primary" :disabled="policyStatus.updating || !newContactValid">{{messages.button_label_add_contact}}</button> <button class="btn btn-primary" :disabled="policyStatus.updating || !newContactValid">{{messages.button_label_add_contact}}</button>
@@ -355,14 +356,12 @@
} }
} }
if (!hasAuth) { if (!hasAuth) {
console.log('hasAuth is false, returning this.contactTypes='+JSON.stringify(this.contactTypes));
return this.contactTypes; return this.contactTypes;
} }
const types = []; const types = [];
for (let i=0; i<this.contactTypes.length; i++) { for (let i=0; i<this.contactTypes.length; i++) {
if (this.contactTypes[i] !== 'authenticator') types.push(this.contactTypes[i]); if (this.contactTypes[i] !== 'authenticator') types.push(this.contactTypes[i]);
} }
console.log('hasAuth was true, returning types='+JSON.stringify(types));
return types; return types;
}, },
newContactValid() { newContactValid() {


Loading…
Cancel
Save