summaryrefslogtreecommitdiffstats
path: root/install/ui/dialog.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-06-20 21:20:13 -0400
committerAdam Young <ayoung@redhat.com>2011-06-27 16:33:35 -0400
commitd2d5278c52650cb90f1d77ac748f0a73f401bf5a (patch)
treeeb78ade2f4e74517bb5f377fec80fb35fba02f0e /install/ui/dialog.js
parent3aa371b30182ae2c0c2e824e9532ec1a7e9ce980 (diff)
downloadfreeipa-d2d5278c52650cb90f1d77ac748f0a73f401bf5a.tar.gz
freeipa-d2d5278c52650cb90f1d77ac748f0a73f401bf5a.tar.xz
freeipa-d2d5278c52650cb90f1d77ac748f0a73f401bf5a.zip
optional uid
Make the uid field optional
Diffstat (limited to 'install/ui/dialog.js')
-rw-r--r--install/ui/dialog.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index efbf84ec4..f4aa71828 100644
--- a/install/ui/dialog.js
+++ b/install/ui/dialog.js
@@ -188,6 +188,23 @@ IPA.dialog = function(spec) {
var span = $('<span/>', { 'name': field.name }).appendTo(td);
field.create(span);
+ field.field_span = span;
+
+ if (field.optional){
+ span.css('display','none');
+ td.append(
+ $('<a/>',{
+ text: IPA.messages.widget.optional,
+ href:'',
+ click: function(){
+ var span = $(this).prev();
+ span.css('display','inline');
+ $(this).css('display','none');
+ return false;
+ }
+ }));
+ }
+
}
var sections = that.sections.values;
@@ -327,6 +344,8 @@ IPA.dialog = function(spec) {
var factory = field_spec.factory || IPA.text_widget;
field = factory(field_spec);
+ field.optional = field_spec.optional || false;
+
/* This is a bit of a hack, and is here to support ACI
permissions. The target section is a group of several
widgets together. It makes more sense to do them as a