Hi,
please review attached patch. It change Restore certificate strings to
Remove certificate hold to be consistent with CLI.
https://fedorahosted.org/freeipa/ticket/5878
--
Pavel^3 Vomacka
From bd0c90c5c52120a5cc7989fd2e6160a13a845ee4 Mon Sep 17 00:00:00 2001
From: Pavel Vomacka <pvoma...@redhat.com>
Date: Fri, 20 May 2016 12:46:53 +0200
Subject: [PATCH] Change 'Restore' to 'Remove Hold'
To be consistent with CLI the restoring certificate is renamed to
removing certificate hold in all WebUI components.
https://fedorahosted.org/freeipa/ticket/5878
---
install/ui/src/freeipa/certificate.js | 24 +++++++++++++-----------
install/ui/test/data/ipa_init.json | 10 ++++++----
ipalib/plugins/internal.py | 10 ++++++----
3 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js
index ae05ebb3d45974cd1df50c16e19d0ab9fd27a19b..ec653a0a464adad80f7ad847909e13d0d025a7fc 100755
--- a/install/ui/src/freeipa/certificate.js
+++ b/install/ui/src/freeipa/certificate.js
@@ -810,17 +810,18 @@ IPA.cert.revoke_action = function(spec) {
return that;
};
-IPA.cert.restore_action = function(spec) {
+IPA.cert.remove_hold_action = function(spec) {
spec = spec || {};
- spec.name = spec.name || 'restore_cert';
- spec.label = spec.label || '@i18n:objects.cert.restore_certificate_simple';
+ spec.name = spec.name || 'remove_hold_cert';
+ spec.label = spec.label || '@i18n:objects.cert.remove_hold';
spec.enable_cond = spec.enable_cond || ['has_certificate', 'certificate_hold'];
spec.hide_cond = spec.hide_cond || ['ra_disabled'];
- spec.confirm_msg = spec.confirm_msg || '@i18n:objects.cert.restore_confirmation';
+ spec.confirm_msg = spec.confirm_msg ||
+ '@i18n:objects.cert.remove_certificate_hold_confirmation';
spec.confirm_dialog = spec.confirm_dialog || {
$factory: IPA.confirm_dialog,
- ok_label: '@i18n:buttons.restore'
+ ok_label: '@i18n:buttons.remove_hold'
};
spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : true;
@@ -834,9 +835,10 @@ IPA.cert.restore_action = function(spec) {
var entity_label = that.entity_label || facet.entity.metadata.label_singular;
var entity_name = certificate.entity_info.name;
- var title = text.get('@i18n:objects.cert.restore_certificate_simple');
+ var title = text.get('@i18n:objects.cert.remove_certificate_hold_simple');
+
if (entity_name && entity_label) {
- title = text.get('@i18n:objects.cert.restore_certificate');
+ title = text.get('@i18n:objects.cert.remove_certificate_hold');
title = title.replace('${entity}', entity_label);
title = title.replace('${primary_key}', entity_name);
}
@@ -855,7 +857,7 @@ IPA.cert.restore_action = function(spec) {
args: [certificate.serial_number],
on_success: function(data, text_status, xhr) {
facet.refresh();
- IPA.notify_success('@i18n:objects.cert.restored');
+ IPA.notify_success('@i18n:objects.cert.hold_removed');
facet.certificate_updated.notify([], that.facet);
}
}).execute();
@@ -1334,14 +1336,14 @@ return {
disable_facet_tabs: true,
actions: [
'cert_revoke',
- 'cert_restore'
+ 'cert_remove_hold'
],
state: {
evaluators: [
IPA.cert.certificate_evaluator
]
},
- header_actions: ['revoke_cert', 'restore_cert'],
+ header_actions: ['revoke_cert', 'remove_hold_cert'],
sections: [
{
name: 'details',
@@ -1529,7 +1531,7 @@ exp.register = function() {
a.register('cert_get', IPA.cert.get_action);
a.register('cert_request', IPA.cert.request_action);
a.register('cert_revoke', IPA.cert.revoke_action);
- a.register('cert_restore', IPA.cert.restore_action);
+ a.register('cert_remove_hold', IPA.cert.remove_hold_action);
e.register({type: 'cert', spec: exp.entity_spec});
};
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 1b9b69ff909a9668c1e1867008459d25d5e062a9..a2f23db206651d52440c47d8b1d16164c330b1e9 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -79,6 +79,7 @@
"refresh": "Refresh",
"refresh_title": "Reload current settings from the server.",
"remove": "Delete",
+ "remove_hold": "Remove hold",
"reset": "Reset",
"reset_password_and_login": "Reset Password and Login",
"restore": "Restore",
@@ -245,6 +246,7 @@
"find_validnotbefore_from": "Valid not before from",
"find_validnotbefore_to": "Valid not before to",
"get_certificate": "Get Certificate",
+ "hold_removed": "Certificate Hold Removed",
"issue_certificate_generic": "Issue New Certificate",
"issue_certificate": "Issue New Certificate for ${entity} ${primary_key}",
"issued_by": "Issued By",
@@ -260,13 +262,13 @@
"present": "${count} certificate(s) present",
"privilege_withdrawn": "Privilege Withdrawn",
"reason": "Reason for Revocation",
+ "remove_hold": "Remove Hold",
+ "remove_certificate_hold": "Remove Certificate Hold for ${entity} ${primary_key}",
+ "remove_certificate_hold_simple": "Remove Certificate Hold",
+ "remove_certificate_hold_confirmation": "To confirm your intention to remove the certificate hold, click the \"Remove hold\" button.",
"remove_from_crl": "Remove from CRL",
"request_message": "<ol> <li>Create a certificate database or use an existing one. To create a new database:<br/> <code># certutil -N -d <database path></code> </li> <li>Create a CSR with subject <em>CN=<${cn_name}>,O=<realm></em>, for example:<br/> <code># certutil -R -d <database path> -a -g <key size> -s 'CN=${cn},O=${realm}'</code> </li> <li> Copy and paste the CSR (from <em>-----BEGIN NEW CERTIFICATE REQUEST-----</em> to <em>-----END NEW CERTIFICATE REQUEST-----</em>) into the text area below: </li> </ol>",
"requested": "Certificate requested",
- "restore_certificate": "Restore Certificate for ${entity} ${primary_key}",
- "restore_certificate_simple": "Restore Certificate",
- "restore_confirmation": "To confirm your intention to restore this certificate, click the \"Restore\" button.",
- "restored": "Certificate restored",
"revocation_reason": "Revocation reason",
"revoke_certificate": "Revoke Certificate for ${entity} ${primary_key}",
"revoke_certificate_simple": "Revoke Certificate",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 54871f76de99d92f0f23129b4d636cc4fccfbb8b..c6295eba18439f9f98dcd978ed49e2c1946de232 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -222,6 +222,7 @@ class i18n_messages(Command):
"refresh": _("Refresh"),
"refresh_title": _("Reload current settings from the server."),
"remove": _("Delete"),
+ "remove_hold": _("Remove hold"),
"reset": _("Reset"),
"reset_password_and_login": _("Reset Password and Login"),
"restore": _("Restore"),
@@ -389,6 +390,7 @@ class i18n_messages(Command):
"find_validnotbefore_to": _("Valid not before to"),
"fingerprints": _("Fingerprints"),
"get_certificate": _("Get Certificate"),
+ "hold_removed": _("Certificate Hold Removed"),
"issue_certificate": _("Issue New Certificate for ${entity} ${primary_key}"),
"issue_certificate_generic": _("Issue New Certificate"),
"issued_by": _("Issued By"),
@@ -404,13 +406,13 @@ class i18n_messages(Command):
"present": _("${count} certificate(s) present"),
"privilege_withdrawn": _("Privilege Withdrawn"),
"reason": _("Reason for Revocation"),
+ "remove_hold": _("Remove Hold"),
+ "remove_certificate_hold": _("Remove Certificate Hold for ${entity} ${primary_key}"),
+ "remove_certificate_hold_simple": _("Remove Certificate Hold"),
+ "remove_certificate_hold_confirmation": _("To confirm your intention to remove the certificate hold, click the \"Remove hold\" button."),
"remove_from_crl": _("Remove from CRL"),
"request_message": _("<ol> <li>Create a certificate database or use an existing one. To create a new database:<br/> <code># certutil -N -d <database path></code> </li> <li>Create a CSR with subject <em>CN=<${cn_name}>,O=<realm></em>, for example:<br/> <code># certutil -R -d <database path> -a -g <key size> -s 'CN=${cn},O=${realm}'</code> </li> <li> Copy and paste the CSR (from <em>-----BEGIN NEW CERTIFICATE REQUEST-----</em> to <em>-----END NEW CERTIFICATE REQUEST-----</em>) into the text area below: </li> </ol>"),
"requested": _("Certificate requested"),
- "restore_certificate": _("Restore Certificate for ${entity} ${primary_key}"),
- "restore_certificate_simple": _("Restore Certificate"),
- "restore_confirmation": _("To confirm your intention to restore this certificate, click the \"Restore\" button."),
- "restored": _("Certificate restored"),
"revocation_reason": _("Revocation reason"),
"revoke_certificate": _("Revoke Certificate for ${entity} ${primary_key}"),
"revoke_certificate_simple": _("Revoke Certificate"),
--
2.5.5
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code