Created
February 17, 2015 11:35
-
-
Save rubys/0bf8ac8bbe68987e5356 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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