Module documentation

local m = {}
m.styles = {}
m.sections = {}
m.fields = {}
m.categories = {}
m.templates = {}
m.roles = {}

m.roles.creator = true
m.roles.boardmember = true

m.sections.above = true
m.sections.nav = true
m.sections.head = true
m.sections.main = true
m.sections.participants = true
m.sections.cta = true
m.sections.below = true

m.styles.box = {}
m.styles.box.outer = "float:right; margin: 0 0 1em 4%; min-width: 22em; width: 28%;"
m.styles.box.inner = "background-color: #eeeeee; color: #000000; border-left: 1px solid #ddd; border-top: 1px solid #ddd; border-right: 1px solid #ddd; border-bottom: 3px solid #D0D0D0; border-radius: 1px; padding: 12px 20px 20px 20px;"

m.styles.section = {}
m.styles.section.above = ""
m.styles.section.nav = "background-color: #32afaf; padding: .25em 0 0 1em; font-size: 1.3em"
m.styles.section.head = "margin-bottom:1em;"
m.styles.section.main = "margin-bottom:1em;"
m.styles.section.participants = "background-color:white; border: 1px solid #DDD; border-radius: 1px; margin-bottom:.5em; padding:.75em;"
m.styles.section.cta = "clear:both;"
m.styles.section.below = ""

m.styles.field = {}
m.styles.field.h1 = "display:inline; word-wrap:break-word;"
m.styles.field.h2 = "margin-bottom:0.5em; word-wrap:break-word;"
m.styles.field.p = ""
m.styles.field.img = ""

-- fields

-- above box
m.fields.status = {}
m.fields.status.isRequired = true
m.fields.status.vtype = "text"
m.fields.status.vtype2 = "body"
m.fields.status.style = ""
m.fields.status.style2 = "font-style:italic; padding-right:.5em; color: #888888"
m.fields.status.style3 = "font-weight:bold"
m.fields.status.section = "above"
m.fields.status.arg = "status"
m.fields.status.key = "status"
m.fields.status.default = "status-default"
m.fields.status.rank = 1

-- nav section
m.fields.nav_icon = {}
m.fields.nav_icon.isRequired = true
m.fields.nav_icon.vtype = "image"
m.fields.nav_icon.vtype2 = "link"
m.fields.nav_icon.style = "display:inline; padding-right:.25em;"
m.fields.nav_icon.style2 = ""
m.fields.nav_icon.style3 = ""
m.fields.nav_icon.section = "nav"
m.fields.nav_icon.width = "25px"
m.fields.nav_icon.alignment = "top"
m.fields.nav_icon.arg = "nav_icon"
m.fields.nav_icon.default = "File:Wikimedia-logo black.svg"
m.fields.nav_icon.key = ""
m.fields.nav_icon.link = "Portal:Chapter & Thematic Org Applications"
m.fields.nav_icon.rank = 1

m.fields.nav_text = {}
m.fields.nav_text.isRequired = true
m.fields.nav_text.vtype = "text"
m.fields.nav_text.vtype2 = "link"
m.fields.nav_text.style = "display:inline;"
m.fields.nav_text.style2 = "color:#FFFFFF"
m.fields.nav_text.style3 = ""
m.fields.nav_text.section = "nav"
m.fields.nav_text.arg = "nav_text"
m.fields.nav_text.default = "Portal:Chapter & Thematic Org Applications"
m.fields.nav_text.key = "portal"
m.fields.nav_text.rank = 2

-- head section
m.fields.org = {}
m.fields.org.isRequired = true
m.fields.org.vtype = "text"
m.fields.org.vtype2 = "title"
m.fields.org.style = m.styles.field.h1
m.fields.org.style2 = ""
m.fields.org.style3 = "font-size: 1.3em;"
m.fields.org.section = "head"
m.fields.org.arg = "org"
m.fields.org.key = "org"
m.fields.org.default = "org-default"
m.fields.org.rank = 1

m.fields.incorporation = {}
m.fields.incorporation.isRequired = true
m.fields.incorporation.vtype = "text"
m.fields.incorporation.vtype2 = "body"
m.fields.incorporation.style = m.styles.field.h2
m.fields.incorporation.style2 = "color: #888888; font-style: italic;"
m.fields.incorporation.style3 = "display:block;"
m.fields.incorporation.section = "main"
m.fields.incorporation.arg = "incorporation"
m.fields.incorporation.key = "To be incorporated as"
m.fields.incorporation.default = "incorporation-default"
m.fields.incorporation.rank = 2

-- Image
--Implementing stage image. Would be good to implement a select or If then statement here to change default image using stage argument
m.fields.image = {}
m.fields.image.isRequired = true
m.fields.image.vtype = "image"
m.fields.image.vtype2 = "thumb2"
m.fields.image.style = ""
m.fields.image.style2 = ""
m.fields.image.style3 = ""
m.fields.image.section = "main"
m.fields.image.arg = "image"
m.fields.image.key = ""
m.fields.image.width = "280px"
m.fields.image.default = "File:CTAPP-0.png"
m.fields.image.rank = 3

m.fields.summary = {}
m.fields.summary.isRequired = true
m.fields.summary.vtype = "text"
m.fields.summary.vtype2 = "body"
m.fields.summary.style = m.styles.field.h2
m.fields.summary.style2 = "color: #888888; font-style: italic;"
m.fields.summary.style3 = "display:block;"
m.fields.summary.section = "main"
m.fields.summary.arg = "summary"
m.fields.summary.key = "summary"
m.fields.summary.default = "summary-default"
m.fields.summary.rank = 4

m.fields.country = {}
m.fields.country.isRequired = true
m.fields.country.vtype = "text"
m.fields.country.vtype2 = "body"
m.fields.country.style = m.styles.field.h2
m.fields.country.style2 = "color: #888888; font-style: italic;"
m.fields.country.style3 = "display:block;"
m.fields.country.section = "main"
m.fields.country.arg = "country"
m.fields.country.key = "country"
m.fields.country.default = "country-default"
m.fields.country.rank = 5

m.fields.website = {}
m.fields.website.isRequired = true
m.fields.website.vtype = "text"
m.fields.website.vtype2 = "body"
m.fields.website.style = m.styles.field.h2
m.fields.website.style2 = "color: #888888; font-style: italic;"
m.fields.website.style3 = "display:block;"
m.fields.website.section = "main"
m.fields.website.arg = "website"
m.fields.website.key = "org-website"
m.fields.website.default = "org-website-default"
m.fields.website.rank = 6

m.fields.socialmedia = {}
m.fields.socialmedia.isRequired = true
m.fields.socialmedia.vtype = "text"
m.fields.socialmedia.vtype2 = "body"
m.fields.socialmedia.style = m.styles.field.h2
m.fields.socialmedia.style2 = "color: #888888; font-style: italic;"
m.fields.socialmedia.style3 = "display:block;"
m.fields.socialmedia.section = "main"
m.fields.socialmedia.arg = "social-media"
m.fields.socialmedia.key = "social-media"
m.fields.socialmedia.default = "social-media-default"
m.fields.socialmedia.rank = 7

m.fields.annualreport = {}
m.fields.annualreport.isRequired = true
m.fields.annualreport.vtype = "text"
m.fields.annualreport.vtype2 = "body"
m.fields.annualreport.style = m.styles.field.h2
m.fields.annualreport.style2 = "color: #888888; font-style: italic;"
m.fields.annualreport.style3 = "display:block;"
m.fields.annualreport.section = "main"
m.fields.annualreport.arg = "annual-report"
m.fields.annualreport.key = "annual-report"
m.fields.annualreport.default = "annual-report-default"
m.fields.annualreport.rank = 8

m.fields.membership = {}
m.fields.membership.isRequired = true
m.fields.membership.vtype = "text"
m.fields.membership.vtype2 = "body"
m.fields.membership.style = m.styles.field.h2
m.fields.membership.style2 = "color: #888888; font-style: italic;"
m.fields.membership.style3 = "display:block;"
m.fields.membership.section = "main"
m.fields.membership.arg = "membership"
m.fields.membership.key = "membership"
m.fields.membership.default = "membership-default"
m.fields.membership.rank = 9

--sub-section
m.fields.creator = {}
m.fields.creator.isRequired = true
m.fields.creator.vtype = "participant"
m.fields.creator.style = m.styles.field.h2
m.fields.creator.style2 = ""
m.fields.creator.style3 = "display:block;"
m.fields.creator.section = "participants"
m.fields.creator.arg = "creator"
m.fields.creator.key = "creator"
m.fields.creator.default = "creator-default"
m.fields.creator.rank = 1

m.fields.boardmember = {}
m.fields.boardmember.isRequired = false
m.fields.boardmember.vtype = "participant"
m.fields.boardmember.style = m.styles.field.h2
m.fields.boardmember.style2 = ""
m.fields.boardmember.style3 = "display:block;"
m.fields.boardmember.section = "participants"
m.fields.boardmember.arg = "boardmember"
m.fields.boardmember.key = "boardmember"
m.fields.boardmember.rank = 2

-- call to action section (buttons, etc)
m.fields.talk = {}
m.fields.talk.isRequired = true
m.fields.talk.vtype = "text"
m.fields.talk.vtype2 = "link"
m.fields.talk.style = "display: inline; float:left; margin-right: 1em; margin-top: .5em"
m.fields.talk.style2 = ""
m.fields.talk.style3 = ""
m.fields.talk.section = "cta"
m.fields.talk.arg = "talk"
m.fields.talk.key = "talk"
m.fields.talk.rank = 1

m.fields.endorse = {}
m.fields.endorse.isRequired = true
m.fields.endorse.vtype = "image"
m.fields.endorse.vtype2 = "ui_button"
m.fields.endorse.style = "display:inline; float:right; margin-right: 1em;"
m.fields.endorse.style2 = ""
m.fields.endorse.style3 = ""
m.fields.endorse.class = "wp-endorse-button mw-ui-button mw-ui-progressive"
m.fields.endorse.section = "cta"
m.fields.endorse.arg = "endorse"
m.fields.endorse.key = "endorse"
m.fields.endorse.rank = 2

-- below box
m.fields.timestamp = {}
m.fields.timestamp.isRequired = false
m.fields.timestamp.vtype = "text"
m.fields.timestamp.vtype2 = "body"
m.fields.timestamp.style = "display:inline; font-style: italic; font-size: .75em"
m.fields.timestamp.style2 = "margin-right: .25em"
m.fields.timestamp.style3 = ""
m.fields.timestamp.section = "below"
m.fields.timestamp.arg = "timestamp"
m.fields.timestamp.key = "timestamp"
m.fields.timestamp.rank = 1

--
-- categories
-- Note that, these categories won't be reflected on the Template,
-- Meta or User namespace as it's excluded in the Lua module implementation
-- of the template. See: https://meta.wikimedia.org/w/index.php?title=Module:Probox&diff=19138192&oldid=19119153
--
m.categories.default = "Category:Wikimedia_Chapter&ThOrg_Applications"
m.categories.base = "Category:Wikimedia_Chapter&ThOrg_Applications"

m.categories.status = {}
m.categories.status.open = "_open"
m.categories.status.bylaws_review = "_bylaws_review"
m.categories.status.committee_review = "_Committee_review"
m.categories.status.recommendation_drafting = "_recommendation_drafting"
m.categories.status.recommendation_submitted = "_recommendation_submitted"
m.categories.status.application_completed = "_completed"
m.categories.status.application_cancelled = "_cancelled"

--
-- navigation templates

return m