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 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'install/ui/details.js') diff --git a/install/ui/details.js b/install/ui/details.js index 84a5c409..c9e78bde 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 = $('