mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
fix checking if a document link may be deleted
This commit is contained in:
parent
40ca91d9d7
commit
51b72eb7b2
|
@ -1454,10 +1454,10 @@ $(document).ready( function() {
|
|||
}
|
||||
print "<td><span class=\"actions\">";
|
||||
print getMLText("document_link_by")." ".htmlspecialchars($responsibleUser->getFullName());
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) {
|
||||
print "<br />".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||
print "<form action=\"".$this->params['settings']->_httpRoot."op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$documentid."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
|
||||
}
|
||||
print "</span></td>";
|
||||
echo $this->documentListRowEnd($targetDoc);
|
||||
}
|
||||
|
@ -1521,9 +1521,10 @@ $(document).ready( function() {
|
|||
print "<td><span class=\"actions\">";
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||
print getMLText("document_link_by")." ".htmlspecialchars($responsibleUser->getFullName());
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL ))
|
||||
if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) {
|
||||
print "<br />".getMLText("document_link_public").": ".(($link->isPublic()) ? getMLText("yes") : getMLText("no"));
|
||||
print "<form action=\"".$this->params['settings']->_httpRoot."op/op.RemoveDocumentLink.php\" method=\"post\">".createHiddenFieldWithKey('removedocumentlink')."<input type=\"hidden\" name=\"documentid\" value=\"".$sourceDoc->getId()."\" /><input type=\"hidden\" name=\"linkid\" value=\"".$link->getID()."\" /><button type=\"submit\" class=\"btn btn-danger btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>";
|
||||
}
|
||||
print "</span></td>";
|
||||
echo $this->documentListRowEnd($sourceDoc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user