show an error if trying to save a contact without an account set (last field)

This commit is contained in:
tibbi 2018-01-02 23:40:15 +01:00
parent 22b4dd0a19
commit 287fb4959c
7 changed files with 11 additions and 0 deletions

View File

@ -502,6 +502,11 @@ class ContactActivity : SimpleActivity() {
return
}
if (contact_source.value.isEmpty()) {
toast(R.string.missing_contact_account)
return
}
contact!!.apply {
val oldPhotoUri = photoUri

View File

@ -4,6 +4,7 @@
<string name="address">Adresse</string>
<string name="inserting">Einfügen…</string>
<string name="updating">Aktualisiere…</string>
<string name="missing_contact_account">Please select an account to which the contact belongs</string>
<string name="new_contact">Neuer Kontakt</string>
<string name="edit_contact">Kontakt bearbeiten</string>

View File

@ -4,6 +4,7 @@
<string name="address">주소</string>
<string name="inserting">Inserting…</string>
<string name="updating">Updating…</string>
<string name="missing_contact_source">Please select an account to which the contact belongs</string>
<string name="new_contact">새로운 연락처</string>
<string name="edit_contact">연락처 수정</string>

View File

@ -4,6 +4,7 @@
<string name="address">Address</string>
<string name="inserting">Inserting…</string>
<string name="updating">Updating…</string>
<string name="missing_contact_source">Please select an account to which the contact belongs</string>
<string name="new_contact">Novo contacto</string>
<string name="edit_contact">Editar contacto</string>

View File

@ -4,6 +4,7 @@
<string name="address">Адрес</string>
<string name="inserting">Добавление…</string>
<string name="updating">Обновление…</string>
<string name="missing_contact_source">Please select an account to which the contact belongs</string>
<string name="new_contact">Новый контакт</string>
<string name="edit_contact">Редактировать контакт</string>

View File

@ -4,6 +4,7 @@
<string name="address">Adresa</string>
<string name="inserting">Vytvára sa…</string>
<string name="updating">Upravuje sa…</string>
<string name="missing_contact_source">Prosím zvoľte účet, ktorému patrí daný kontakt</string>
<string name="new_contact">Nový kontakt</string>
<string name="edit_contact">Upraviť kontakt</string>

View File

@ -4,6 +4,7 @@
<string name="address">Address</string>
<string name="inserting">Inserting…</string>
<string name="updating">Updating…</string>
<string name="missing_contact_account">Please select an account to which the contact belongs</string>
<string name="new_contact">New contact</string>
<string name="edit_contact">Edit contact</string>