Skip to content

Instantly share code, notes, and snippets.

@rubys
Created February 17, 2015 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubys/0bf8ac8bbe68987e5356 to your computer and use it in GitHub Desktop.
Save rubys/0bf8ac8bbe68987e5356 to your computer and use it in GitHub Desktop.
docTypes = %w(icla grant ccla nda other)
class DocumentForm < React
def getInitialState()
end
def handleDocTypeChange(event)
var type = event.target.value;
end
def render
_form.documentForm do
docTypes.each do |docType|
_input type: 'radio', name: 'doctype' , value: docType,
onChange: self.handleDocTypeChange
end
_input type: "submit", value: "post"
end
end
end
class IclaForm < React
def render
_div.specificForm do
_input name: 'realname', type: 'text'
_input name: 'pubname', type: 'text'
_input name: 'email', type: 'text'
_input name: 'filename', type: 'text'
end
end
end
class NdaForm < React
def render
_div.specificForm do
_input name: 'name', type: 'text'
_input name: 'id', type: 'text'
_input name: 'email', type: 'email'
_input name: 'filename', type: 'text'
end
end
end
class GrantForm < React
def render
_div.specificForm do
_input name: 'from', type: 'text'
_textarea name: 'description', rows: 5
_input name: 'name', type: 'text'
_input name: 'email', type: 'email'
_input name: 'filename', type: 'text'
end
end
end
class CclaForm < React
def render
_div.specificForm do
_input name: 'company', type: 'text'
_input name: 'product', type: 'text'
_input name: 'contact', type: 'text'
_input name: 'email', type: 'text'
_textarea name: 'employees', rows: 5
_input name: 'filename', type: 'text'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment