Advertisement
Guest User

Untitled

a guest
Mar 5th, 2012
13,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. formElement =
  2.   if _.include(@config.htmlTextarea, key)
  3.     "<textarea class='html' id='#{key}' name='#{key}'></textarea>"
  4.   else if _.include(@config.boolean, key)
  5.     "<input id='#{key}' name='#{key}' type='checkbox'></input>"
  6.   else if key is "pageType"
  7.     "<select id='#{key}' name='#{key}'>
  8.    #{_.map @config.pageTypes, (type) ->
  9.      "<option value=#{type}>
  10.         #{type.underscore().humanize()}
  11.       </option>"
  12.    .join("")
  13.    }
  14.    </select>"
  15.   else
  16.     "<input id='#{key}' name='#{key}' type='text'></input>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement