Skip to content

Commit

Permalink
Fixed issue #10371: bad layout after sending token invitations
Browse files Browse the repository at this point in the history
Description
  • Loading branch information
LouisGac committed Mar 10, 2016
1 parent b859809 commit 64a5bb1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
9 changes: 6 additions & 3 deletions application/controllers/admin/tokens.php
Expand Up @@ -1659,7 +1659,7 @@ function email($iSurveyId, $tokenids = null)
}
else
{
$aData['tokenoutput'].="<strong class='result warning text-warning'>".gT("Not all emails were sent:")."<strong><ul>";
$aData['tokenoutput'].="<strong class='result warning text-warning'>".gT("Not all emails were sent:")."<strong><ul class='list-unstyled'>";
if ($bInvalidDate)
{
$aData['tokenoutput'].="<li>".gT("Some entries had a validity date set which was not yet valid or not valid anymore.")."</li>";
Expand All @@ -1668,7 +1668,8 @@ function email($iSurveyId, $tokenids = null)
{
$aData['tokenoutput'].="<li>".gT("Some emails were not sent because the server did not accept the email(s) or some other error occured.")."</li>";
}
$aData['tokenoutput'].='/ul';
$aData['tokenoutput'].='</ul>';
$aData['tokenoutput'].= '<p><a href="'.App()->createUrl('admin/tokens/sa/index/surveyid/'.$iSurveyId).'" title="" class="btn btn-default btn-lg">'.gT("Ok").'</a></p>';
}
}

Expand All @@ -1680,10 +1681,11 @@ function email($iSurveyId, $tokenids = null)
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Warning"),
'message' => gT("There were no eligible emails to send. This will be because none satisfied the criteria of:")
. "<br/>&nbsp;<ul><li>" . gT("having a valid email address") . "</li>"
. "<br/>&nbsp;<ul class='list-unstyled'><li>" . gT("having a valid email address") . "</li>"

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 10, 2016

Collaborator

I like to have the little dot here :(

. "<li>" . gT("not having been sent an invitation already") . "</li>"
. "<li>" . gT("not having already completed the survey") . "</li>"
. "<li>" . gT("having a token") . "</li></ul>"
. '<p><a href="'.App()->createUrl('admin/tokens/sa/index/surveyid/'.$iSurveyId).'" title="" class="btn btn-default btn-lg">'.gT("Cancel").'</a></p>'
)), $aData);
}
}
Expand Down Expand Up @@ -2452,6 +2454,7 @@ function tokenify($iSurveyId)
. "<input class='btn btn-default' type='submit' value='"
. gT("No") . "' onclick=\"window.open('" . $this->getController()->createUrl("admin/tokens/sa/index/surveyid/$iSurveyId") . "', '_top')\" />\n"
. "<br />\n"
. '<p><a href="'.App()->createUrl('admin/tokens/sa/index/surveyid/'.$iSurveyId).'" title="" class="btn btn-default btn-lg">'.gT("Ok").'</a></p>'
)), $aData);
}
else
Expand Down
28 changes: 15 additions & 13 deletions application/views/admin/token/emailpost.php
@@ -1,15 +1,17 @@
<div class='messagebox ui-corner-all'>
<div class='header ui-widget-header'>
<?php if ($bEmail) eT("Sending invitations..."); else eT("Sending reminders...");?>
</div>
<?php
if ($tokenids)
{
echo " (" . gT("Sending to Token IDs") . ":&nbsp;" . short_implode(", ", "-", $tokenids) . ")";
}
?>
<br /><br />
<div style='border: 1px solid #ccc; height: 200px; overflow: scroll; text-align:left; padding-left:0.5em;'>
<?php echo $tokenoutput ?>
<?php
/**
* Display email result
* @var $title string
* @var $message html
*/
?>
<div class="row" id="token-emailpost-messagebox">
<div class="col-sm-11 col-sm-offset-1 content-right">
<div class="jumbotron message-box">
<h2 ><?php if ($bEmail) eT("Sending invitations..."); else eT("Sending reminders...");?></h2>
<p style='border: 1px solid #ccc; height: 200px; overflow: scroll; text-align:left; padding-left:0.5em;'>
<?php echo $tokenoutput ?>
</p>
</div>
</div>
</div>

0 comments on commit 64a5bb1

Please sign in to comment.