'; printf('', htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, htmlspecialchars($val), $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); if ($attribute->getHelper()) { echo ' | '; $this->draw('AttributeHelper',$attribute,$i); echo ' |
', htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); echo ' | '; printf('(%s)',_('confirm')); echo ' |
'; $input_name = sprintf('new_values[%s][%s]',htmlspecialchars($attribute->getName()),$i); $id = sprintf('new_values_%s_%s',htmlspecialchars($attribute->getName()),$i); printf(' ', $input_name,$id,htmlspecialchars($val), $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '', ($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : ''); # Draw a link for popping up the entry browser if this is the type of attribute that houses DNs. draw_chooser_link(sprintf('entry_form.%s',$id),false); echo ''; if ($attribute->getHelper()) { echo ' | '; $this->draw('Helper',$attribute,$i); echo ' |
'; $obfuscate_password = obfuscate_password_display($enc_type); $id = sprintf('new_values_%s_%s',htmlspecialchars($attribute->getName()),$i); printf('', ($obfuscate_password ? 'password' : 'text'), htmlspecialchars($attribute->getName()),$i,$id, htmlspecialchars($val), $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); echo ' | '; if ($attribute->getHelper()) $this->draw('Helper',$attribute,$i); else $this->draw('DefaultHelper',$attribute,$i); echo ' |
'; if ($attribute->getVerify() && $obfuscate_password) { printf('', htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); echo ' | '; printf('(%s)',_('confirm')); echo ' |
'; } $this->draw('CheckLink',$attribute,$id); echo ' |
%s | |
%s |
';
$found = false;
$empty_value = false;
# If we are a required attribute, and the selection is blank, then the user cannot submit this form.
if ($attribute->isRequired() && ! count($attribute->getSelection()))
system_message(array(
'title'=>_('Template Value Error'),
'body'=>sprintf('This template uses a selection list for attribute [%s], however the selection list is empty. You may need to create some dependancy entries in your LDAP server so that this attribute renders with values. Alternatively, you may be able to define the appropriate selection values in the template file.',$attribute->getName(false)), 'type'=>'warn')); printf(''; if ($attribute->getHelper()) { echo ' | '; $this->draw('Helper',$attribute,$i); echo ' |