diff options
| author | winter | 2025-01-27 20:03:49 +0000 |
|---|---|---|
| committer | winter | 2025-01-27 20:03:49 +0000 |
| commit | df201664df01d5b4ada6b992235f236511ec020f (patch) | |
| tree | 0a22c24376f2b0e79c7193e7eb8e36c4b415a71b /templates/reply_form.php | |
| parent | 5a6300f473b8be0e90a16e2b5992299b0ea1ddff (diff) | |
fix repeated re: in cw and thread page notes not hightlighting
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> |
