From 9f9c6d2c795d42920170d4304bb4579ae6f93eca Mon Sep 17 00:00:00 2001 From: phamt Date: Thu, 27 Jun 2013 15:25:13 +0000 Subject: [PATCH] Fixed bug in xCAT-UI where empty inputs are not set as empty values in the policy table. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16810 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/js/configure/users.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/xCAT-UI/js/configure/users.js b/xCAT-UI/js/configure/users.js index d50152278..54b059949 100644 --- a/xCAT-UI/js/configure/users.js +++ b/xCAT-UI/js/configure/users.js @@ -326,26 +326,37 @@ function openCreateUserDialog(data) { var args = ""; if (usrName) { args += ' policy.name=' + usrName; - } if (host) { - args += " policy.host='" + host + "'"; - } if (parameters) { - args += " policy.parameters='" + parameters + "'"; - } if (nodeRange) { - args += " policy.noderange='" + nodeRange + "'"; } if (rule) { args += ' policy.rule=' + rule; } if (disable) { args += ' policy.disable=' + disable; - } + } - // Handle cases where there are comments and no comments + // Handle cases where there are value or no value + if (host) { + args += " policy.host='" + host + "'"; + } else { + args += " policy.host=''"; + } + + if (parameters) { + args += " policy.parameters='" + parameters + "'"; + } else { + args += " policy.parameters=''"; + } + + if (nodeRange) { + args += " policy.noderange='" + nodeRange + "'"; + } else { + args += " policy.noderange=''"; + } + if (comments) { args += " policy.comments='" + comments + "'"; } else { args += " policy.comments=''"; } - // Handle cases where there are commands and no commands if (commands) { args += " policy.commands='" + commands + "'"; } else {