Skip to content

Commit

Permalink
Dev: Tokens display, icon coherence between buttons and massive actio…
Browse files Browse the repository at this point in the history
…ns for invinte and remind
  • Loading branch information
LouisGac committed May 27, 2016
1 parent 6f07ce4 commit 4a231eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion application/models/TokenDynamic.php
Expand Up @@ -719,11 +719,12 @@ public function getbuttons()
$sRemindUrl = App()->createUrl("admin/tokens/sa/email/action/remind/surveyid/".self::$sid."/tokenids/$this->tid");
$button = '';

// View response details
if ($this->survey->isActive)
{
if (count($this->responses)>0)
{
// Only one answer, direct link

if (count($this->responses)<2)
{
$sResponseUrl = App()->createUrl("admin/responses/sa/viewbytoken/surveyid/".self::$sid, array('token'=>$this->token));
Expand All @@ -743,6 +744,7 @@ public function getbuttons()
// TODO: Add some space for other buttons to be at the same place
}

// Launch the survey with this token
if( $this->completed=="N" || $this->completed=="" || $this->survey->alloweditaftercompletion == "Y" )
{
$button .= '<a class="btn btn-default btn-xs" href="'.$sPreviewUrl.'" target="_blank" role="button" data-toggle="tooltip" title="'.gT('Launch the survey with this token').'"><span class="icon-do" ></span></a>';
Expand All @@ -752,6 +754,7 @@ public function getbuttons()
// TODO: Add some space for other buttons to be at the same place
}

// Invite or Remind
if($this->emailstatus && $this->email )
{
if($this->completed == 'N' && $this->usesleft > 0)
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/massive_actions/_selector.php
Expand Up @@ -33,7 +33,7 @@
data-action="invite"
data-modal-warning-title="<?php eT('Send email invitations');?>"
data-modal-warning-text="<?php eT('Send an invitation email to the selected entries (if they have not yet been sent an invitation email)');?> <?php eT('Continue?');?>">
<span class="ui-icon ui-icon-mail-closed" ></span>
<span class="icon-invite text-success" ></span>
<?php eT('Send email invitations');?>
</a>
</li>
Expand All @@ -45,7 +45,7 @@
data-action="remind"
data-modal-warning-title="<?php eT('Send email reminder');?>"
data-modal-warning-text="<?php eT('Send a reminder email to the selected entries (if they have already received the invitation email)');?> <?php eT('Continue?');?>">
<span class="ui-icon ui-icon-mail-open" ></span>
<span class="icon-remind text-success" ></span>
<?php eT('Send email reminder');?>
</a>
</li>
Expand Down

0 comments on commit 4a231eb

Please sign in to comment.