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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-05-20 12:46:53 +02:00 committed by Petr Vobornik
parent b16e59bdaa
commit fdd2265bc4
3 changed files with 25 additions and 19 deletions

View File

@ -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});
};

View File

@ -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",
@ -247,6 +248,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",
@ -262,13 +264,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 &lt;database path&gt;</code> </li> <li>Create a CSR with subject <em>CN=&lt;${cn_name}&gt;,O=&lt;realm&gt;</em>, for example:<br/> <code># certutil -R -d &lt;database path&gt; -a -g &lt;key size&gt; -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",

View File

@ -215,6 +215,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"),
@ -384,6 +385,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"),
@ -399,13 +401,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 &lt;database path&gt;</code> </li> <li>Create a CSR with subject <em>CN=&lt;${cn_name}&gt;,O=&lt;realm&gt;</em>, for example:<br/> <code># certutil -R -d &lt;database path&gt; -a -g &lt;key size&gt; -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"),