diff --git a/client/MainWindow.cpp b/client/MainWindow.cpp
index c386f8349..ff151f95f 100644
--- a/client/MainWindow.cpp
+++ b/client/MainWindow.cpp
@@ -704,12 +704,14 @@ void MainWindow::updateMyEid(const QSmartCardData &data)
return;
bool pin1Blocked = data.retryCount(QSmartCardData::Pin1Type) == 0;
bool pin2Blocked = data.retryCount(QSmartCardData::Pin2Type) == 0;
+ bool pukBlocked = data.retryCount(QSmartCardData::PukType) == 0;
bool pin1Locked = data.pinLocked(QSmartCardData::Pin1Type);
bool pin2Locked = data.pinLocked(QSmartCardData::Pin2Type);
+ bool isPUKReplacable = data.isPUKReplacable();
ui->myEid->warningIcon(
pin1Blocked || pin1Locked ||
pin2Blocked || pin2Locked ||
- data.retryCount(QSmartCardData::PukType) == 0);
+ pukBlocked);
ui->signContainerPage->cardChanged(data.signCert(), pin2Blocked || pin2Locked);
ui->cryptoContainerPage->cardChanged(data.authCert(), pin1Blocked || pin1Locked);
@@ -718,13 +720,17 @@ void MainWindow::updateMyEid(const QSmartCardData &data)
ui->warnings->showWarning({LockedCardWarning});
else
{
- if(pin1Blocked)
+ if(pin1Blocked && pukBlocked)
+ ui->warnings->showWarning({isPUKReplacable ? Pin1PukBlockedResetWarning : Pin1PukBlockedWarning});
+ else if(pin1Blocked)
ui->warnings->showWarning({UnblockPin1Warning, 0,
[this]{ changePinClicked(QSmartCardData::Pin1Type, QSmartCard::UnblockWithPuk); }});
if(pin2Locked && pin2Blocked)
ui->warnings->showWarning({ActivatePin2WithPUKWarning, 0,
[this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::ActivateWithPuk); }});
+ else if(pin2Blocked && pukBlocked)
+ ui->warnings->showWarning({isPUKReplacable ? Pin2PukBlockedResetWarning : Pin2PukBlockedWarning});
else if(pin2Blocked)
ui->warnings->showWarning({UnblockPin2Warning, 0,
[this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::UnblockWithPuk); }});
diff --git a/client/translations/en.ts b/client/translations/en.ts
index ee897b53f..6b4f7b544 100644
--- a/client/translations/en.ts
+++ b/client/translations/en.ts
@@ -3040,6 +3040,10 @@ Additional licenses and components
Certificates expire soon!
Certificates expire soon!
+
+ https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/
+ https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/
+
Additional information
Additional information
diff --git a/client/translations/et.ts b/client/translations/et.ts
index e476e9e41..79a54df20 100644
--- a/client/translations/et.ts
+++ b/client/translations/et.ts
@@ -3040,6 +3040,10 @@ Täiendavad litsentsid ja komponendid
Certificates have expired!
Sertifikaadid on aegunud!
+
+ https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/
+ https://www.politsei.ee/et/juhend/id-kaardi-taotlemine-taeiskasvanule/id-kaardi-kasutaja-meelespea/
+
Additional information
Lisainfo
diff --git a/client/translations/ru.ts b/client/translations/ru.ts
index 273a42f99..3db3d9bbb 100644
--- a/client/translations/ru.ts
+++ b/client/translations/ru.ts
@@ -3045,6 +3045,10 @@ Additional licenses and components
Certificates expire soon!
Срок действия сертификатов скоро истекает!
+
+ https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/
+ https://www.politsei.ee/ru/instruktsii/hodataystvo-o-vydache-id-karty-vzroslomu/pamyatka-dlya-polzovatelya-id-karti/
+
Additional information
Дополнительная информация
diff --git a/client/widgets/WarningItem.cpp b/client/widgets/WarningItem.cpp
index 5c87b3b84..75d94cdf2 100644
--- a/client/widgets/WarningItem.cpp
+++ b/client/widgets/WarningItem.cpp
@@ -85,6 +85,26 @@ void WarningItem::lookupWarning()
url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/");
_page = MyEid;
break;
+ case Pin1PukBlockedWarning:
+ ui->warningText->setText(VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(1));
+ url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/");
+ _page = MyEid;
+ break;
+ case Pin1PukBlockedResetWarning:
+ ui->warningText->setText(VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(1));
+ url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/");
+ _page = MyEid;
+ break;
+ case Pin2PukBlockedWarning:
+ ui->warningText->setText(VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(2));
+ url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/");
+ _page = MyEid;
+ break;
+ case Pin2PukBlockedResetWarning:
+ ui->warningText->setText(VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(2));
+ url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/");
+ _page = MyEid;
+ break;
case ActivatePin1WithPUKWarning:
case UnblockPin1Warning:
ui->warningText->setText(QStringLiteral("%1 %2").arg(
diff --git a/client/widgets/WarningItem.h b/client/widgets/WarningItem.h
index 4e83b5514..505567742 100644
--- a/client/widgets/WarningItem.h
+++ b/client/widgets/WarningItem.h
@@ -31,6 +31,10 @@ struct WarningText {
CertExpiredError,
CertExpiryWarning,
+ Pin1PukBlockedWarning,
+ Pin1PukBlockedResetWarning,
+ Pin2PukBlockedWarning,
+ Pin2PukBlockedResetWarning,
UnblockPin1Warning,
UnblockPin2Warning,
ActivatePin2Warning,