From d7f4d616df836f2f8590c8fd82ab165bd2f97cd5 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 26 Jan 2011 20:58:06 -0500 Subject: dirty If a page is dirty, do not allow additional navigation until changes are saved or committed https://fedorahosted.org/freeipa/ticket/726 --- install/ui/details.js | 42 ++++++++++++++++++++++++++++++++++++-- install/ui/entity.js | 8 ++++++-- install/ui/ipa.js | 36 ++++++++++++++++++++++++++++++++ install/ui/navigation.js | 9 ++++++-- install/ui/test/data/ipa_init.json | 3 ++- install/ui/webui.js | 16 ++++++--------- install/ui/widget.js | 36 +++++++++++++++++++++++++++----- ipalib/plugins/internal.py | 3 ++- 8 files changed, 130 insertions(+), 23 deletions(-) diff --git a/install/ui/details.js b/install/ui/details.js index 84a5c4098..c9e78bdef 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -49,6 +49,16 @@ IPA.details_field = function (spec) { that.record = record; that.values = record[that.name]; that.reset(); + + var param_info = IPA.get_param_info(that.entity_name, that.name); + if (param_info) { + if (param_info['primary_key']) { + that.read_only = true; + } + if ('no_update' in param_info['flags']) { + that.read_only = true; + } + } } that.update = function() { @@ -129,7 +139,10 @@ IPA.details_field = function (spec) { var label = $('