dnExists($request['dn'])) error(sprintf(_('The entry (%s) does not exist.'),$request['dn']),'error','index.php'); $request['page'] = new TemplateRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none')); $request['page']->setDN($request['dn']); $request['page']->accept(true); $request['template'] = $request['page']->getTemplate(); /* if ($request['attribute']->isReadOnly()) error(sprintf(_('The attribute (%s) is in readonly mode.'),$request['attr']),'error','index.php'); */ # Render the form if (get_request('meth','REQUEST') != 'ajax') { # Render the form. $request['page']->drawTitle(sprintf('%s %s %s %s',_('Add new'),$request['attr'],_('value to'),get_rdn($request['dn']))); $request['page']->drawSubTitle(); if (! strcasecmp($request['attr'],'objectclass')) { echo '
'; } else { # Draw a blank field echo ''; $request['page']->draw('FormValue',$request['attribute'],$request['count']); echo ' |
';
$sattr = $app['server']->getSchemaAttribute($request['attr']);
if ($sattr->getDescription())
printf('%s: %s ',_('Description'),$sattr->getDescription()); if ($sattr->getType()) printf('%s: %s ',_('Syntax'),$sattr->getType()); if ($sattr->getMaxLength()) printf('%s: %s %s ', _('Maximum Length'),number_format($sattr->getMaxLength()),_('characters')); echo ' '; printf('',_('Add New Value')); echo ' |