-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var React = require('react'); | ||
|
||
class Settings extends React.Component { | ||
render() { | ||
return ( | ||
<div className="col-md-6 col-md-offset-3"> | ||
<form className="form" action="/settings" method="post"> | ||
<div className="panel panel-default"> | ||
<div className="panel-body"> | ||
<div className="form-group"> | ||
<div className="checkbox"> | ||
<label> | ||
<input type="checkbox" name="applications_disabled" checked={!this.props.settings.applications_open}/> Disable Applications | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<button type="submit" className="btn btn-primary pull-right">Save</button> | ||
</form> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
Settings.propTypes = { | ||
members: React.PropTypes.array, | ||
}; | ||
|
||
module.exports = Settings; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?hh // strict | ||
|
||
final class :nucleus:settings extends :x:element { | ||
use XHPHelpers; | ||
use XHPReact; | ||
|
||
attribute | ||
:xhp:html-element, | ||
Map<string, bool> settings @required; | ||
|
||
protected function render(): XHPRoot { | ||
$this->constructReactInstance( | ||
'Settings', | ||
Map {'settings' => $this->:settings } | ||
); | ||
|
||
return <div id={$this->getID()} />; | ||
} | ||
} |