Jump to content

Module:Feedback

From The Petit Planet Wiki
Revision as of 11:49, 16 September 2026 by ReisuDesign (talk | contribs) (Replaced content with "------------------------------------------------------------ -- Resolve control ------------------------------------------------------------ local function renderResolveControl( parent, id, compact, page ) if not id or id == '' then return end local control = parent:tag('span') :addClass('feedback-resolve-button') :attr( 'data-feedback-id', id ) if page and page ~= '' then control:attr( 'data-feedback-page', page ) end if...")
Module documentation

This module implements {{Feedback}}.

------------------------------------------------------------
-- Resolve control
------------------------------------------------------------

local function renderResolveControl(
	parent,
	id,
	compact,
	page
)

	if not id or id == '' then
		return
	end

	local control =
		parent:tag('span')
			:addClass('feedback-resolve-button')
			:attr(
				'data-feedback-id',
				id
			)

	if page and page ~= '' then
		control:attr(
			'data-feedback-page',
			page
		)
	end

	if compact then

		control
			:addClass('feedback-resolve-button--compact')
			:attr('aria-label', 'Resolve feedback')
			:attr('title', 'Resolve feedback')
			:wikitext('✓')

	else

		control
			:attr('role', 'button')
			:attr('tabindex', '0')
			:attr('aria-label', 'Resolve feedback')
			:wikitext('Resolve')

	end
end