Module documentation

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

m.roles.grantee = true
m.roles.contact = true
m.roles.organization = true
m.roles.website = false
m.roles.default = "grantee"

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: white; color: #000000; border-left: 1px solid #ddd; border-top: 1px solid #ddd; border-right: 1px solid #ddd; border-bottom: 7px solid #5748B5;  padding: 12px 20px 20px 20px;"

m.styles.section = {}
m.styles.section.above = ""
m.styles.section.nav = "background-color: #5748B5; padding: .5em 0 .35em 1em; font-size: 1.2em; font-weight: bold; font-family: 'Montserrat', 'Helvetica Neue', sans-serif !important;"
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: 4px; margin-bottom:.5em; padding:.75em;"
m.styles.section.cta = "clear:both;"
m.styles.section.below = ""

m.styles.field = {}
m.styles.field.h1 = ""
m.styles.field.h2 = "margin-bottom:0.5em;"
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: #404040"
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_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 = "Grants:Rapid"
m.fields.nav_text.key = "portal"
m.fields.nav_text.rank = 1

-- head section
m.fields.project = {}
m.fields.project.isRequired = true
m.fields.project.vtype = "text"
m.fields.project.vtype2 = "title"
m.fields.project.style = "display:inline;"
m.fields.project.style2 = ""
m.fields.project.style3 = "font-size: 1.3em;"
m.fields.project.section = "head"
m.fields.project.arg = "project"
m.fields.project.key = ""
m.fields.project.default = "title-default"
m.fields.project.rank = 2

m.fields.image = {}
m.fields.image.isRequired = false
m.fields.image.vtype = "image"
m.fields.image.vtype2 = "thumb"
m.fields.image.style = ""
m.fields.image.style2 = ""
m.fields.image.style3 = "float:right;"
m.fields.image.section = "head"
m.fields.image.arg = "image"
m.fields.image.key = ""
m.fields.image.width = "50px"
m.fields.image.rank = 1

-- main section
m.fields.summary = {}
m.fields.summary.isRequired = false
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 = ""
m.fields.summary.default = "summary-default"
m.fields.summary.rank = 1

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

-- Removing goal from probox field for now (is currently part of application outside of probox)
-- m.fields.goal = {}
-- m.fields.goal.isRequired = true
-- m.fields.goal.vtype = "text"
-- m.fields.goal.vtype2 = "body"
-- m.fields.goal.style = m.styles.field.h2
-- m.fields.goal.style2 = "color: #888888; font-style: italic;"
-- m.fields.goal.style3 = "display:block;"
-- m.fields.goal.section = "main"
-- m.fields.goal.arg = "goal"
-- m.fields.goal.key = "goal"
-- m.fields.goal.default = "goal-default"
-- m.fields.goal.rank = 3

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

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

m.fields.start_date_approved = {}
m.fields.start_date_approved.isRequired = false
m.fields.start_date_approved.vtype = "text"
m.fields.start_date_approved.vtype2 = "body"
m.fields.start_date_approved.style = m.styles.field.h2
m.fields.start_date_approved.style2 = "color: #888888; font-style: italic;"
m.fields.start_date_approved.style3 = "display:block;"
m.fields.start_date_approved.section = "main"
m.fields.start_date_approved.arg = "start_date_approved"
m.fields.start_date_approved.key = "start-date-approved"
m.fields.start_date_approved.rank = 6

m.fields.end_date_approved = {}
m.fields.end_date_approved.isRequired = false
m.fields.end_date_approved.vtype = "text"
m.fields.end_date_approved.vtype2 = "body"
m.fields.end_date_approved.style = m.styles.field.h2
m.fields.end_date_approved.style2 = "color: #888888; font-style: italic;"
m.fields.end_date_approved.style3 = "display:block;"
m.fields.end_date_approved.section = "main"
m.fields.end_date_approved.arg = "end_date_approved"
m.fields.end_date_approved.key = "end-date-approved"
m.fields.end_date_approved.rank = 7

m.fields.amount_local = {}
m.fields.amount_local.isRequired = false
m.fields.amount_local.vtype = "text"
m.fields.amount_local.vtype2 = "body"
m.fields.amount_local.style = m.styles.field.h2
m.fields.amount_local.style2 = "color: #888888; font-style: italic;"
m.fields.amount_local.style3 = "display:block;"
m.fields.amount_local.section = "main"
m.fields.amount_local.arg = "amount_local"
m.fields.amount_local.key = "amount-local"
m.fields.amount_local.rank = 8

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

m.fields.amount_recommended = {}
m.fields.amount_recommended.isRequired = false
m.fields.amount_recommended.vtype = "text"
m.fields.amount_recommended.vtype2 = "body"
m.fields.amount_recommended.style = m.styles.field.h2
m.fields.amount_recommended.style2 = "color: #888888; font-style: italic;"
m.fields.amount_recommended.style3 = "display:block;"
m.fields.amount_recommended.section = "main"
m.fields.amount_recommended.arg = "amount-recommended"
m.fields.amount_recommended.key = "amount-recommended"
m.fields.amount_recommended.rank = 10

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

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

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

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

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

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

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

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

-- 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

m.fields.friendlyspace = {}
m.fields.friendlyspace.isRequired = true
m.fields.friendlyspace.vtype = "text"
m.fields.friendlyspace.vtype2 = "link"
m.fields.friendlyspace.width = "25px"
m.fields.friendlyspace.alignment = "top"
m.fields.friendlyspace.style = ""
m.fields.friendlyspace.style2 = ""
m.fields.friendlyspace.style3 = ""
m.fields.friendlyspace.section = "below"
m.fields.friendlyspace.arg = "friendlyspace"
m.fields.friendlyspace.default = ":foundation:Friendly_space_policy"
m.fields.friendlyspace.key = "friendlyspace"
m.fields.friendlyspace.rank = 2

m.fields.ucc = {}
m.fields.ucc.isRequired = true
m.fields.ucc.vtype = "text"
m.fields.ucc.vtype2 = "link"
m.fields.ucc.width = "25px"
m.fields.ucc.alignment = "top"
m.fields.ucc.style = ""
m.fields.ucc.style2 = ""
m.fields.ucc.style3 = ""
m.fields.ucc.section = "below"
m.fields.ucc.arg = "ucc"
m.fields.ucc.default = "Universal_Code_of_Conduct"
m.fields.ucc.key = "ucc"
m.fields.ucc.rank = 3

m.fields.privacystatement = {}
m.fields.privacystatement.isRequired = true
m.fields.privacystatement.vtype = "text"
m.fields.privacystatement.vtype2 = "link"
m.fields.privacystatement.width = "25px"
m.fields.privacystatement.alignment = "top"
m.fields.privacystatement.style = ""
m.fields.privacystatement.style2 = ""
m.fields.privacystatement.style3 = ""
m.fields.privacystatement.section = "below"
m.fields.privacystatement.arg = "privacystatement"
m.fields.privacystatement.default = ":foundation:Legal:Grant Application Form Privacy Statement"
m.fields.privacystatement.key = "privacystatement"
m.fields.privacystatement.rank = 4

-- 
--m.fields.index = {}
--m.fields.index.isRequired = true
--m.fields.index.vtype = "text"
--m.fields.index.vtype2 = "link"
--m.fields.index.width = "25px"
--m.fields.index.alignment = "top"
--m.fields.index.style = ""
--m.fields.index.style2 = ""
--m.fields.index.style3 = ""
--m.fields.index.section = "below"
--m.fields.index.arg = "index"
--m.fields.index.default = "Grants:Project/Rapid/Browse_applications"
--m.fields.index.key = "index"
--m.fields.index.rank = 3
--

--
-- categories
--
m.categories.default = "Category:Rapid/Proposals"
m.categories.base = "Category:Rapid/Proposals"

m.categories.status = {}
m.categories.status.draft = "/Draft"
m.categories.status.under_review = "/Under review"
m.categories.status.awaiting_grantee_reply = "/Under review"
m.categories.status.proposed = "/Proposed"
m.categories.status.ineligible = "/Ineligible"
m.categories.status.funded = "/Funded"
m.categories.status.approved = "/Funded"
m.categories.status.not_funded = "/Not_funded"
m.categories.status.withdrawn = "/Withdrawn"
m.categories.status.completed = "/Completed"
m.categories.status.incomplete = "/Incomplete"

m.categories.idealab = {}
m.categories.idealab.yes = "/IdeaLab"

--
-- navigation templates
--
-- m.templates.args = {}
-- m.templates.args.date = "2014-15"
-- m.templates.args.status = "2014-15"

 m.templates.passArg = true
 m.templates.status = {} -- add nav template to top, based on proposal status
 -- m.templates.status.status = "Rapid_Grants_request_probox"
-- m.templates.status.open = "Rapid_Grants_request_request/Open"
-- m.templates.status.funded = "Rapid_Grants_request_request/Funded"
-- m.templates.status.not_funded = "Rapid_Grants_request_request/Not_funded"
-- m.templates.status.withdrawn = "Rapid_Grants_request_request/Withdrawn"
-- m.templates.status.cancelled = "Rapid_Grants_request/Cancelled"
--  m.templates.status.draft = "Rapid_Grants_request/Draft"
-- m.templates.status.open = "Rapid_Grants_Support_request/Open"
-- m.templates.status.funded = "Rapid_Grants_request/Funded"
-- m.templates.status.not_funded = "Rapid_Grants_request/Not_funded"
-- m.templates.status.withdrawn = "Rapid_Grants_request/Withdrawn"
-- m.templates.status.args = {}
-- m.templates.status.args.status = ""
-- m.templates.status.args.fiscal_year = ""

return m