XF.overlayMessage('Confirmation', '<p>Do you agree?</p><button class="button button--primary" onclick="XF.hideOverlays(); do_stuff();">Yes</button> <button class="button" onclick="XF.hideOverlays();">No</button>');
I’m guessing he meant whether there was a function likeMore elegant in what way, exactly?
XF.Confirm() that took title, message, confirmUrl, rejectUrl as arguments and produced that HTML behind the scenes I have to agree on having this as a default function would save some time and lines of coding.I’m guessing he meant whether there was a function likeXF.Confirm()that took title, message, confirmUrl, rejectUrl as arguments and produced that HTML behind the scenes
Which to be fair would not be the worst idea, though I don’t think it exists already.
<div class="p-navgroup p-account {{ $xf.visitor.user_id ? 'p-navgroup--member' : 'p-navgroup--guest' }}" style="margin-right: 5px;">
<a href="{{ link('logout', null, {'t': csrf_token()}) }}"
class="p-navgroup-link p-navgroup-link--iconic"
data-xf-init="tooltip" title="{{ phrase('log_out')|for_attr }}" rel="nofollow">
<i aria-hidden="true"></i>
<span>
<xf:fa icon="fa-sign-out" />
</span>
</a>
</div>
We use essential cookies to make this site work, and optional cookies to enhance your experience.