summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/certificate.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-04-15 19:23:15 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:26 +0200
commit49b7f4c06e17b91372decf33b812a7fbbfa01ff4 (patch)
tree5fc871af96dec687a36e0986c0c3b829ce9de3b5 /install/ui/src/freeipa/certificate.js
parent849ece00e32747238c819eb7d3ac70f0bdc90833 (diff)
downloadfreeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.tar.gz
freeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.tar.xz
freeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.zip
Replace IPA.widget_factories and IPA_field_factories with registry
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src/freeipa/certificate.js')
-rwxr-xr-xinstall/ui/src/freeipa/certificate.js28
1 files changed, 22 insertions, 6 deletions
diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js
index db262159b..a46fd46e9 100755
--- a/install/ui/src/freeipa/certificate.js
+++ b/install/ui/src/freeipa/certificate.js
@@ -19,8 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define(['./ipa', './jquery','dojo/_base/lang', './text', './dialog'],
- function(IPA, $, lang, text) {
+define([
+ 'dojo/_base/lang',
+ './ipa',
+ './jquery',
+ './phases',
+ './reg',
+ './text',
+ './dialog'],
+ function(lang, IPA, $, phases, reg, text) {
IPA.cert = {};
@@ -934,8 +941,7 @@ IPA.cert.status_field = function(spec) {
return that;
};
-IPA.widget_factories['certificate_status'] = IPA.cert.status_widget;
-IPA.field_factories['certificate_status'] = IPA.cert.status_field;
+
IPA.cert.entity = function(spec) {
@@ -1299,10 +1305,20 @@ IPA.cert.cert_update_policy = function(spec) {
return IPA.facet_update_policy(spec);
};
-IPA.field_factories['revocation_reason'] = IPA.revocation_reason_field;
-IPA.widget_factories['revocation_reason'] = IPA.text_widget;
+
IPA.register('cert', IPA.cert.entity);
+phases.on('registration', function() {
+ var w = reg.widget;
+ var f = reg.field;
+
+ w.register('certificate_status', IPA.cert.status_widget);
+ f.register('certificate_status', IPA.cert.status_field);
+
+ f.register('revocation_reason', IPA.revocation_reason_field);
+ w.register('revocation_reason', IPA.text_widget);
+});
+
return {};
}); \ No newline at end of file