diff --git a/html/themes/breezy/dialog.css b/html/themes/breezy/dialog.css index b3d3478137c0733b9a33f281c1d49a60ecb139f6..3b8b0f7129823adb1ecc22eb5bfe9a6ec31f4246 100644 --- a/html/themes/breezy/dialog.css +++ b/html/themes/breezy/dialog.css @@ -23,10 +23,6 @@ top: 200px; } } -div.msgdialog .description { -font-style: italic; -} - /* Small screens (i.e. phones) */ @media (max-width: 640px) { div.msgdialog { diff --git a/include/class_msgPool.inc b/include/class_msgPool.inc index 9ec3bff10cab494e6a7d0df3310c09563a59eebc..b2ebc176e5cd611edfdb9a494ff989eac62bc83a 100644 --- a/include/class_msgPool.inc +++ b/include/class_msgPool.inc @@ -398,22 +398,13 @@ class msgPool { * * \param string $name The entry duplicated */ - public static function duplicated($name, $dn = NULL, $ldapName = '', $description = '') + public static function duplicated($name, $dn = NULL) { - if (empty($name)) { - $fieldName = sprintf('<em>%s</em>', $ldapName); - } else { - $fieldName = sprintf(_('"%s"'), $name); - } if ($dn == NULL) { - $msg = sprintf(_('There is already an entry with this %s attribute in the system!'), $fieldName); + return sprintf(_("There is already an entry with this '%s' attribute in the system!"), $name); } else { - $msg = sprintf(_('The entry "%s" already use this %s attribute!'), $dn, $fieldName); - } - if (!empty($description)) { - $msg .= sprintf('<p class="description">%s</p>', $description); + return sprintf(_("The entry '%s' already use this '%s' attribute!"), $dn, $name); } - return $msg; } /*! @@ -421,18 +412,9 @@ class msgPool { * * \param string $name Name of the field */ - public static function required($name, $ldapName = '', $description = '') + public static function required($name) { - if (empty($name)) { - $fieldName = sprintf('<em>%s</em>', $ldapName); - } else { - $fieldName = sprintf(_('"%s"'), $name); - } - $msg = sprintf(_('The required field %s is empty!'), $fieldName); - if (!empty($description)) { - $msg .= sprintf('<p class="description">%s</p>', $description); - } - return $msg; + return sprintf(_("The required field '%s' is empty!"), $name); } /*! diff --git a/include/simpleplugin/attributes/class_SetAttribute.inc b/include/simpleplugin/attributes/class_SetAttribute.inc index 13d609f3be0f2403d8fb0d0ac9b12b15dcf99bc1..f8be21e6897149e890c0a9e04aa8fa95d18ebcb7 100644 --- a/include/simpleplugin/attributes/class_SetAttribute.inc +++ b/include/simpleplugin/attributes/class_SetAttribute.inc @@ -579,13 +579,7 @@ class OrderedArrayAttribute extends SetAttribute $this->attribute->loadPostValue(); $this->attribute->applyPostValue(); if ($error = $this->attribute->check()) { - $label = $this->getLabel(); - if (empty($label)) { - $label = '<em>'.$this->getLdapName().'</em>'; - } else { - $label = sprintf(_('"%s"'), $label); - } - msg_dialog::display(sprintf(_('Invalid value for %s'), $label), $error); + msg_dialog::display(sprintf(_('Invalid value for %s'), $this->getLabel()), $error); } else { $this->addPostValue($this->attribute->getValue()); } diff --git a/include/simpleplugin/class_Attribute.inc b/include/simpleplugin/class_Attribute.inc index 44586cd8ffaca9cd3f410d32af6cf0083c54eb0e..14bf31c406bc2db2f0caf87d45c45bc49f839368 100644 --- a/include/simpleplugin/class_Attribute.inc +++ b/include/simpleplugin/class_Attribute.inc @@ -431,7 +431,7 @@ class Attribute global $config; $value = $this->getValue(); if ($this->isRequired() && !$this->disabled && (($value === "") || ($value === array()))) { - return msgPool::required($this->getLabel(), $this->getLdapName(), $this->getDescription()); + return msgPool::required($this->getLabel()); } elseif (($this->unique !== FALSE) && !$this->disabled) { $value = $this->computeLdapValue(); if (($value === "") || ($value === array())) { @@ -527,7 +527,7 @@ class Attribute continue; } - return msgPool::duplicated($this->getLabel(), $attrs['dn'], $this->getLdapName(), $this->getDescription()); + return msgPool::duplicated($this->getLabel(), $attrs['dn']); } } }