diff options
Diffstat (limited to 'templates/reply_form.php')
| -rw-r--r-- | templates/reply_form.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/reply_form.php b/templates/reply_form.php index 57a0dd0..915189e 100644 --- a/templates/reply_form.php +++ b/templates/reply_form.php @@ -2,6 +2,15 @@ use Digitigrade\Model\UserAccount; $user = UserAccount::findByCurrentSession(); + +$summaryText = ''; +if ($note->summary) { + if (strtolower(substr($note->summary, 0, 3)) == 're:') { + $summaryText = $note->summary; + } else { + $summaryText = "re: $note->summary"; + } +} ?> <form class="noteReplyForm" id="replyForm-<?= $note->id ?>" _="on submit send toggle to previous <button.reply/> then wait 1s then trigger update on #liveTimelineUpdater on toggle or submit toggle @hidden" @@ -13,7 +22,7 @@ $user = UserAccount::findByCurrentSession(); <div class="row"> <label for="replySummary-<?= $note->id ?>"><?= __('writeNote.summary.label') ?></label> <input type="text" id="replySummary-<?= $note->id ?>" name="summary" autocomplete="off" - value="<?= $note->summary ? "re: $note->summary" : '' ?>"> + value="<?= $summaryText ?>"> </div> <div class="row"> <label class="standalone"><?= __('writeNote.mentions.label') ?></label> |
