Jump to content

Module:Protection banner: Difference between revisions

add custom error for p.renderPadlock
(try different format for behaviors table)
(add custom error for p.renderPadlock)
Line 310: Line 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)
--
-- Both parameters are optional.
--]]
--]]
local root = mw.html.create('div')
local root = mw.html.create('div')
Line 320: Line 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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.