diff --git a/htdocs/update_confirm.php b/htdocs/update_confirm.php index 6c956a8..d969ed1 100644 --- a/htdocs/update_confirm.php +++ b/htdocs/update_confirm.php @@ -187,9 +187,9 @@ if (count($request['template']->getLDAPmodify(true))) { echo '
'; echo '
'; - printf('', - _('Commit'), - (isAjaxEnabled() ? sprintf('onclick="return ajSUBMIT(\'BODY\',document.getElementById(\'update_form\'),\'%s\');"',_('Updating Object')) : '')); + // @todo cant use AJAX here, it affects file uploads. + printf('', + _('Update Object')); printf('', _('Cancel'), diff --git a/lib/PageRender.php b/lib/PageRender.php index 02cdb80..0bfb51a 100644 --- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -836,7 +836,10 @@ class PageRender extends Visitor { } protected function drawFormReadOnlyValueJpegAttribute($attribute,$i) { - draw_jpeg_photo($this->getServer(),$this->template->getDN(),$attribute->getName(),$i,false,false); + $this->draw('HiddenValue',$attribute,$i); + $_SESSION['tmp'][$attribute->getName()][$i] = $attribute->getValue($i); + + draw_jpeg_photo(null,$this->template->getDN(),$attribute->getName(),$i,false,false); } protected function drawFormReadOnlyValueMultiLineAttribute($attribute,$i) { diff --git a/lib/Template.php b/lib/Template.php index 47360a4..295ac46 100644 --- a/lib/Template.php +++ b/lib/Template.php @@ -708,6 +708,10 @@ class Template extends xmlTemplate { } } } + + // @todo If this is a Jpeg Attribute, we need to mark it read only, since it cant be deleted like text attributes can + if (strcasecmp(get_class($attribute),'jpegAttribute') == 0) + $attribute->setReadOnly(); } # If we have any RDN values left over, there werent in the original entry and need to be added. diff --git a/lib/TemplateRender.php b/lib/TemplateRender.php index b53b79e..58aaf83 100644 --- a/lib/TemplateRender.php +++ b/lib/TemplateRender.php @@ -1444,9 +1444,8 @@ class TemplateRender extends PageRender { if (DEBUGTMP) printf('%s
',__METHOD__); if (! $this->template->isReadOnly()) - printf('', - _('Update Object'), - (isAjaxEnabled() ? sprintf('onclick="return ajSUBMIT(\'BODY\',document.getElementById(\'entry_form\'),\'%s\');"',_('Updating DN')) : ''), + // @todo cant use AJAX here, it affects file uploads. + printf('', _('Update Object')); } @@ -1546,9 +1545,9 @@ class TemplateRender extends PageRender { if ($page < $this->pagelast) printf(' ',_('Proceed >>')); else - printf('', - _('Create Object'), - (isAjaxEnabled() ? sprintf('onclick="return ajSUBMIT(\'BODY\',document.getElementById(\'entry_form\'),\'%s\');"',_('Creating Object')) : '')); + // @todo cant use AJAX here, it affects file uploads. + printf('', + _('Create Object')); echo ''; }