summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-05-31 01:08:31 -0500
committerTimothy Pearson <[email protected]>2012-05-31 01:08:31 -0500
commit9dc612fd768cd0ec40f7458f2f69534c1acd417a (patch)
tree585232723cb3168c6f9b959281bf486644daaa7e /src
parent6d3279772de658a37abc06c74726c72af9c0a484 (diff)
downloadkcmldapmanager-9dc612fd768cd0ec40f7458f2f69534c1acd417a.tar.gz
kcmldapmanager-9dc612fd768cd0ec40f7458f2f69534c1acd417a.zip
Fix user editing dialog
Diffstat (limited to 'src')
-rw-r--r--src/groupconfigbase.ui8
-rw-r--r--src/groupconfigdlg.cpp3
-rw-r--r--src/ldapmgr.cpp9
-rw-r--r--src/userconfigbase.ui228
-rw-r--r--src/userconfigdlg.cpp26
5 files changed, 252 insertions, 22 deletions
diff --git a/src/groupconfigbase.ui b/src/groupconfigbase.ui
index 87bb1b5..fdf4c67 100644
--- a/src/groupconfigbase.ui
+++ b/src/groupconfigbase.ui
@@ -38,6 +38,14 @@
<property name="name">
<cstring>detailsIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQLabel" row="0" column="1" colspan="1">
<property name="name">
diff --git a/src/groupconfigdlg.cpp b/src/groupconfigdlg.cpp
index 5629d2e..3621977 100644
--- a/src/groupconfigdlg.cpp
+++ b/src/groupconfigdlg.cpp
@@ -33,6 +33,7 @@
#include <tqradiobutton.h>
#include <tqcheckbox.h>
#include <kdatetimewidget.h>
+#include <kiconloader.h>
#include "ldapmgr.h"
#include "groupconfigdlg.h"
@@ -49,6 +50,8 @@ GroupConfigDialog::GroupConfigDialog(LDAPGroupInfo group, LDAPConfig* parent, co
m_base->groupName->setEnabled(false);
}
+ m_base->detailsIcon->setPixmap(SmallIcon("kdmconfig.png"));
+
connect(m_base->addToGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(addSelectedUserToGroup()));
connect(m_base->removeFromGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelectedUserFromGroup()));
connect(m_base->groupName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
diff --git a/src/ldapmgr.cpp b/src/ldapmgr.cpp
index 26007dc..4c153e3 100644
--- a/src/ldapmgr.cpp
+++ b/src/ldapmgr.cpp
@@ -38,6 +38,7 @@
#include <kcombobox.h>
#include <kmessagebox.h>
#include <klineedit.h>
+#include <kiconloader.h>
#include <tdesu/process.h>
@@ -84,6 +85,10 @@ LDAPConfig::LDAPConfig(TQWidget *parent, const char *name, const TQStringList&)
base->machine_name->setEnabled(false);
base->machine_author->setEnabled(false);
+ base->user_icon->setPixmap(SmallIcon("personal.png"));
+ base->group_icon->setPixmap(SmallIcon("kdmconfig.png"));
+ base->machine_icon->setPixmap(SmallIcon("system.png"));
+
connect(base->user_ldapRealm, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(connectToRealm(const TQString&)));
connect(base->group_ldapRealm, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(connectToRealm(const TQString&)));
connect(base->machine_ldapRealm, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(connectToRealm(const TQString&)));
@@ -457,7 +462,9 @@ void LDAPConfig::groupHighlighted() {
base->group_memberList->clear();
for ( TQStringList::Iterator it = group.userlist.begin(); it != group.userlist.end(); ++it ) {
LDAPUserInfo user = findUserByDistinguishedName(*it);
- (void)new TQListViewItem(base->group_memberList, user.name, user.commonName, TQString("%1").arg(user.uid));
+ if (user.name != "") {
+ (void)new TQListViewItem(base->group_memberList, user.name, user.commonName, TQString("%1").arg(user.uid));
+ }
}
processLockouts();
diff --git a/src/userconfigbase.ui b/src/userconfigbase.ui
index f76d243..9417722 100644
--- a/src/userconfigbase.ui
+++ b/src/userconfigbase.ui
@@ -38,6 +38,14 @@
<property name="name">
<cstring>detailsIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQLabel" row="0" column="1" colspan="1">
<property name="name">
@@ -54,7 +62,7 @@
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
- <vsizetype>4</vsizetype>
+ <vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -90,6 +98,14 @@
<property name="name">
<cstring>enabledIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQRadioButton" row="0" column="2" colspan="1">
<property name="name">
@@ -103,6 +119,14 @@
<property name="name">
<cstring>disabledIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
</grid>
</widget>
@@ -141,7 +165,7 @@
<cstring>unnamed</cstring>
</property>
<property name="text">
- <string>Real Name*</string>
+ <string>Display Name*</string>
</property>
</widget>
<widget class="KLineEdit" row="2" column="2" colspan="3">
@@ -149,7 +173,24 @@
<cstring>realName</cstring>
</property>
</widget>
- <widget class="TQLabel" row="3" column="0" colspan="2">
+ <widget class="TQFrame" row="3" column="0" colspan="5">
+ <property name="name">
+ <cstring>unnamed_separator</cstring>
+ </property>
+ <property name="name">
+ <cstring>unnamed_separator</cstring>
+ </property>
+ <property name="minimumHeight">
+ <number>25</number>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="4" column="0" colspan="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -157,7 +198,7 @@
<string>User ID</string>
</property>
</widget>
- <widget class="KIntNumInput" row="3" column="2" colspan="3">
+ <widget class="KIntNumInput" row="4" column="2" colspan="3">
<property name="name">
<cstring>UID</cstring>
</property>
@@ -168,7 +209,7 @@
<number>99999</number>
</property>
</widget>
- <widget class="TQLabel" row="4" column="0" colspan="2">
+ <widget class="TQLabel" row="5" column="0" colspan="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -176,12 +217,12 @@
<string>Primary Group</string>
</property>
</widget>
- <widget class="KComboBox" row="4" column="2" colspan="3">
+ <widget class="KComboBox" row="5" column="2" colspan="3">
<property name="name">
<cstring>primaryGroup</cstring>
</property>
</widget>
- <widget class="TQLabel" row="5" column="0" colspan="2">
+ <widget class="TQLabel" row="6" column="0" colspan="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
@@ -189,7 +230,7 @@
<string>Home Directory*</string>
</property>
</widget>
- <widget class="KURLRequester" row="5" column="2" colspan="3">
+ <widget class="KURLRequester" row="6" column="2" colspan="3">
<property name="name">
<cstring>homeDirectory</cstring>
</property>
@@ -197,15 +238,15 @@
<number>18</number>
</property>
</widget>
- <widget class="TQLabel" row="6" column="0" colspan="2">
+ <widget class="TQLabel" row="7" column="0" colspan="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
- <string>Shell*</string>
+ <string>Shell</string>
</property>
</widget>
- <widget class="KComboBox" row="6" column="2" colspan="3">
+ <widget class="KComboBox" row="7" column="2" colspan="3">
<property name="name">
<cstring>shell</cstring>
</property>
@@ -245,30 +286,159 @@
</property>
<widget class="TQLabel" row="0" column="0" colspan="1">
<property name="name">
+ <cstring>userIcon</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="1" colspan="4">
+ <property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
- <string>Given Name</string>
+ <string>Detailed User Information</string>
</property>
</widget>
- <widget class="KLineEdit" row="0" column="1" colspan="1">
+ <widget class="TQLabel" row="1" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>First Name</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="2" colspan="1">
<property name="name">
<cstring>givenName</cstring>
</property>
</widget>
- <widget class="TQLabel" row="0" column="2" colspan="1">
+ <widget class="TQLabel" row="1" column="3" colspan="1">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
- <string>Surname*</string>
+ <string>Initials</string>
</property>
</widget>
- <widget class="KLineEdit" row="0" column="3" colspan="1">
+ <widget class="KLineEdit" row="1" column="4" colspan="1">
+ <property name="name">
+ <cstring>initials</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="2" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Last Name*</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="2" colspan="3">
<property name="name">
<cstring>surName</cstring>
</property>
</widget>
+ <widget class="TQLabel" row="3" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Title</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="2" colspan="3">
+ <property name="name">
+ <cstring>title</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="4" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Description</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="2" colspan="3">
+ <property name="name">
+ <cstring>description</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="5" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Office</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="2" colspan="3">
+ <property name="name">
+ <cstring>office</cstring>
+ </property>
+ </widget>
+ <widget class="TQFrame" row="6" column="0" colspan="5">
+ <property name="name">
+ <cstring>unnamed_separator</cstring>
+ </property>
+ <property name="name">
+ <cstring>unnamed_separator</cstring>
+ </property>
+ <property name="minimumHeight">
+ <number>25</number>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="7" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Telephone Number</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="7" column="2" colspan="3">
+ <property name="name">
+ <cstring>telephoneNumber</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="8" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Facsimile Number</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="8" column="2" colspan="3">
+ <property name="name">
+ <cstring>faxNumber</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="9" column="0" colspan="2">
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="text">
+ <string>Email Address</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="9" column="2" colspan="3">
+ <property name="name">
+ <cstring>email</cstring>
+ </property>
+ </widget>
<spacer row="10" column="0">
<property name="name" stdset="0">
<cstring>Spacer20</cstring>
@@ -303,6 +473,14 @@
<property name="name">
<cstring>groupsIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQLabel" row="0" column="1" colspan="1">
<property name="name">
@@ -382,6 +560,14 @@
<property name="name">
<cstring>passwordIcon</cstring>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQLabel" row="0" column="1" colspan="1">
<property name="name">
@@ -430,7 +616,7 @@
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
- <vsizetype>4</vsizetype>
+ <vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -528,6 +714,14 @@
<property name="text">
<string>Require new password after:</string>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
<widget class="TQSpinBox" row="0" column="2" colspan="1">
<property name="name">
diff --git a/src/userconfigdlg.cpp b/src/userconfigdlg.cpp
index c49c8ae..a246aab 100644
--- a/src/userconfigdlg.cpp
+++ b/src/userconfigdlg.cpp
@@ -34,6 +34,7 @@
#include <tqcheckbox.h>
#include <kdatetimewidget.h>
#include <kpassdlg.h>
+#include <kiconloader.h>
#include "ldapmgr.h"
#include "userconfigdlg.h"
@@ -53,6 +54,13 @@ UserConfigDialog::UserConfigDialog(LDAPUserInfo user, LDAPConfig* parent, const
}
m_base->lastChanged->setEnabled(false);
+ m_base->detailsIcon->setPixmap(SmallIcon("personal.png"));
+ m_base->enabledIcon->setPixmap(SmallIcon("decrypted.png"));
+ m_base->disabledIcon->setPixmap(SmallIcon("encrypted.png"));
+ m_base->userIcon->setPixmap(SmallIcon("personal.png"));
+ m_base->groupsIcon->setPixmap(SmallIcon("kdmconfig.png"));
+ m_base->passwordIcon->setPixmap(SmallIcon("password.png"));
+
connect(m_base->loginName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
connect(m_base->realName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
connect(m_base->surName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
@@ -63,9 +71,6 @@ UserConfigDialog::UserConfigDialog(LDAPUserInfo user, LDAPConfig* parent, const
connect(m_base->requirePasswordMinAge, TQT_SIGNAL(clicked()), this, TQT_SLOT(processLockouts()));
connect(m_base->primaryGroup, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(processLockouts()));
- // Update fields
-// KPasswordEdit* passwordEntry;
-
if (m_user.status == KRB5_DISABLED_ACCOUNT) {
m_base->userStatusEnabled->setChecked(false);
m_base->userStatusDisabled->setChecked(true);
@@ -95,7 +100,6 @@ UserConfigDialog::UserConfigDialog(LDAPUserInfo user, LDAPConfig* parent, const
item->setOn(group.userlist.contains(m_user.distinguishedName));
}
-// m_base->passwordEntry;
m_base->lastChanged->setText(m_user.password_last_changed.toString(TQt::TextDate));
if (m_user.password_expires) {
m_base->passwordExpireEnabled->setChecked(true);
@@ -116,6 +120,13 @@ UserConfigDialog::UserConfigDialog(LDAPUserInfo user, LDAPConfig* parent, const
// User information
m_base->givenName->setText(m_user.givenName);
m_base->surName->setText(m_user.surName);
+ m_base->initials->setText(m_user.initials);
+ m_base->title->setText(m_user.title);
+ m_base->description->setText(m_user.description);
+ m_base->office->setText(m_user.deliveryOffice);
+ m_base->telephoneNumber->setText(m_user.telephoneNumber);
+ m_base->faxNumber->setText(m_user.faxNumber);
+ m_base->email->setText(m_user.email);
processLockouts();
}
@@ -167,6 +178,13 @@ void UserConfigDialog::slotOk() {
// User information
m_user.givenName = m_base->givenName->text();
m_user.surName = m_base->surName->text();
+ m_user.initials = m_base->initials->text();
+ m_user.title = m_base->title->text();
+ m_user.description = m_base->description->text();
+ m_user.deliveryOffice = m_base->office->text();
+ m_user.telephoneNumber = m_base->telephoneNumber->text();
+ m_user.faxNumber = m_base->faxNumber->text();
+ m_user.email = m_base->email->text();
// Special handler for new group
if (m_user.distinguishedName == "") {