Modul:Protection banner: Unterschied zwischen den Versionen
add custom error for p.renderPadlock
(try different format for behaviors table) |
(add custom error for p.renderPadlock) |
||
Zeile 310: | Zeile 310: | ||
-- | -- | ||
-- @parameters: | -- @parameters: | ||
-- image - the image wikitext | -- image - the image wikitext (required) | ||
-- right - the "right" css property value, as a string | -- right - the "right" css property value, as a string (optional) | ||
--]] | --]] | ||
local root = mw.html.create('div') | local root = mw.html.create('div') | ||
Zeile 320: | Zeile 318: | ||
:attr('id', 'protected-icon') | :attr('id', 'protected-icon') | ||
:css{display = 'none', right = right or '55px'} | :css{display = 'none', right = right or '55px'} | ||
:wikitext(image) | :wikitext(image or error('No image parameter specified in p.renderPadlock')) | ||
return tostring(root) | return tostring(root) | ||
end | end |