diff --git a/application/models/TokenDynamic.php b/application/models/TokenDynamic.php
index 17df16d960d..b2bff634ea3 100644
--- a/application/models/TokenDynamic.php
+++ b/application/models/TokenDynamic.php
@@ -716,6 +716,7 @@ public function getbuttons()
$sPreviewUrl = App()->createUrl("/survey/index/sid/".self::$sid."/token/".$this->token.'/lang/'.$this->language.'/newtest/Y');
$sEditUrl = App()->createUrl("/admin/tokens/sa/edit/iSurveyId/".self::$sid."/iTokenId/$this->tid");
$sInviteUrl = App()->createUrl("/admin/tokens/sa/email/surveyid/".self::$sid."/tokenids/$this->tid");
+ $sRemindUrl = App()->createUrl("admin/tokens/sa/email/action/remind/surveyid/".self::$sid."/tokenids/$this->tid");
$button = '';
if ($this->survey->isActive)
@@ -739,15 +740,55 @@ public function getbuttons()
}
else
{
- // Add some space for other buttons to be at the same place
+ // TODO: Add some space for other buttons to be at the same place
}
- $button .= '';
- //$button .= '';
- $button .= '';
- $button .= '';
+ if( $this->completed=="N" || $this->completed=="" || $this->survey->alloweditaftercompletion == "Y" )
+ {
+ $button .= '';
+ }
+ else
+ {
+ // TODO: Add some space for other buttons to be at the same place
+ }
+
+ if($this->emailstatus && $this->email )
+ {
+ if($this->completed == 'N' && $this->usesleft > 0)
+ {
+ if($this->sent == 'N')
+ {
+ $button .= '';
+ }
+ else
+ {
+ $button .= '';
+ }
+ }
+ else
+ {
+ //TODO: Add some space for other buttons to be at the same place
+ }
+
+ }
+ else
+ {
+ // TODO: Add some space for other buttons to be at the same place
+ }
+ // TODO: permission check
+ $button .= '';
+
+ if (!empty($this->participant_id) && $this->participant_id != "" )
+ {
+ $onClick = "sendPost('".$this->getController()->createUrl('admin/participants/sa/displayParticipants')."','',['searchcondition'],['participant_id||equal||{$this->participant_id}']);";
+ $button .= '';
+ }
+ else
+ {
+ // TODO: Add some space for other buttons to be at the same place
+ }
return $button;
}