getAttributes();
$rdn_attr = $entry->getRdnAttribute();
echo '
|
';
printf(' | %s%s | ','RDN',_(':'));
echo ' |
';
}
protected function drawDefaultCreatingEntryShownAttributes($entry) {
$attrs = array();
// put required attributes first
foreach ($this->shown_attributes as $sa) {
if ($sa->isRequired()) $attrs[] = $sa;
}
foreach ($this->shown_attributes as $sa) {
if (!$sa->isRequired()) $attrs[] = $sa;
}
$has_required_attrs = false;
$has_optional_attrs = false;
foreach ($attrs as $attr) {
if ($attr->isRequired()) {
if (!$has_required_attrs) {
echo ' |
';
$has_required_attrs = true;
}
} else {
if (!$has_optional_attrs) {
if (!$has_required_attrs) {
// no required attributes
}
echo ' |
';
$has_optional_attrs = true;
}
}
$this->draw('', $attr);
echo "\n";
}
if (!$has_optional_attrs) {
// no optional attributes
}
}
public function drawDefaultCreatingEntryStepFormSubmitButton($entry, $step) {
echo ' |
';
if ($step == 1) {
echo '';
printf('', _('Proceed >>'));
echo ' |
';
} else {
echo '';
printf('', _('Create Object'));
echo ' |
';
}
}
/*******************************/
/* Paint a DefaultEditingEntry */
/*******************************/
protected function drawDefaultEditingEntryInternalAttributes($entry) {
$counter = 0;
echo ' |
';
foreach ($this->internal_attributes as $attr) {
$this->draw('', $attr);
$counter++;
echo "\n";
}
if ($counter == 0) {
echo '(';
echo _('No internal attributes');
echo ') |
';
}
}
protected function drawDefaultEditingEntryShownAttributes($entry) {
echo ' |
';
parent::drawDefaultEditingEntryShownAttributes($entry);
}
protected function drawDefaultEditingEntryFormSubmitButton($entry) {
echo ' |
';
echo ' |
';
}
/*********************************/
/* Paint a TemplateCreatingEntry */
/*********************************/
protected function drawTemplateCreatingEntryShownAttributes($entry) {
if ($entry->getSelectedTemplateName()) {
echo ' |
';
}
parent::drawTemplateCreatingEntryShownAttributes($entry);
}
/********************************/
/* Paint a TemplateEditingEntry */
/********************************/
protected function drawTemplateEditingEntryShownAttributes($entry) {
echo ' |
';
parent::drawTemplateEditingEntryShownAttributes($entry);
}
/**************************/
/* Paint an Attribute */
/**************************/
protected function drawAttribute($attribute) {
if ($attribute->isVisible()) {
if (($this->context == ENTRY_WRITER_EDITING_CONTEXT) && $attribute->hasBeenModified()) {
echo '';
} else {
echo '
';
}
$this->draw('Informations', $attribute);
}
$this->draw('Values', $attribute);
if ($attribute->isVisible()) {
echo '
';
if (($this->context == ENTRY_WRITER_EDITING_CONTEXT) && $attribute->hasBeenModified()) {
//echo ' |
';
}
if ($attribute->hasProperty('spacer') && $attribute->getProperty('spacer')) {
echo ' |
';
}
}
}
protected function drawAttributeInformations($attribute) {
echo '';
$this->draw('Icon', $attribute, '');
echo ' | ';
echo '';
$this->draw('Name', $attribute);
echo _(':');
echo ' ';
if ($_SESSION['plaConfig']->GetValue('appearance', 'show_attribute_notes')) {
$this->draw('Notes', $attribute);
}
echo ' | ';
}
protected function drawAttributeNotes($attribute) {
$attr_note = '';
$alias_note = $this->get('AliasNote', $attribute);
if ($alias_note) {
if (trim($attr_note)) $attr_note .= ', ';
$attr_note .= $alias_note;
}
$required_note = $this->get('RequiredNote', $attribute);
if ($required_note) {
if (trim($attr_note)) $attr_note .= ', ';
$attr_note .= $required_note;
}
$rdn_note = $this->get('RdnNote', $attribute);
if ($rdn_note) {
if (trim($attr_note)) $attr_note .= ', ';
$attr_note .= $rdn_note;
}
if ($attr_note) printf('%s', $attr_note);
if ($attribute->isReadOnly() && $this->ldapserver->isAttrReadOnly($attribute->getName())) {
printf('(%s)',
_('This attribute has been flagged as read only by the phpLDAPadmin administrator'),
_('read only'));
}
}
protected function drawAttributeStartValueLine($attribute) {
echo '';
}
protected function drawAttributeEndValueLine($attribute) {
echo ' | ';
}
protected function drawAttributeValue($attribute, $i) {
if (DEBUG_ENABLED)
debug_log('Entered with (%s, %d)',1,__FILE__,__LINE__,__METHOD__,$attribute->getName(),$i);
$val = $attribute->getValue($i);
if (!is_string($val)) $val = '';
if ($attribute->isVisible()) {
echo '';
}
$this->draw('OldValue', $attribute, $i);
$this->draw('NewValue', $attribute, $i);
if ($attribute->isVisible()) {
echo ' | ';
if (($i == 0) && $attribute->isRequired() && $attribute->getEntry() && !$attribute->getEntry()->isReadOnly()) {
echo ' ';
$this->draw('RequiredSymbol', $attribute);
}
echo ' |
';
}
}
protected function drawAttributeMenu($attribute) {
if ($attribute->getHint() /*&& $_SESSION['plaConfig']->GetValue('appearance', 'show_hints')*/) {
echo ' '.$attribute->getHint().'';
}
parent::drawAttributeMenu($attribute);
}
/***************************/
/* Paint a BinaryAttribute */
/***************************/
/***************************/
/* Paint a DateAttribute */
/***************************/
/***************************/
/* Paint a DnAttribute */
/***************************/
/***************************/
/* Paint a GidAttribute */
/***************************/
/***************************/
/* Paint a JpegAttribute */
/***************************/
/******************************/
/* Paint a MultiLineAttribute */
/******************************/
/********************************/
/* Paint a ObjectClassAttribute */
/********************************/
/*****************************/
/* Paint a PasswordAttribute */
/*****************************/
/***********************************/
/* Paint a RandomPasswordAttribute */
/***********************************/
/******************************/
/* Paint a SelectionAttribute */
/******************************/
/***************************/
/* Paint a ShadowAttribute */
/***************************/
}
?>