mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
#12 Add FeatureForm for new Features
This commit is contained in:
parent
d727995959
commit
cb88a15ee9
@ -25,45 +25,6 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="content">Loading...</div>
|
<div id="content">Loading...</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
|
||||||
This is the bootstrap form
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<fieldset>
|
|
||||||
|
|
||||||
|
|
||||||
<legend>Add a new feature</legend>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="name">Name </label>
|
|
||||||
<div class="controls">
|
|
||||||
<input id="name" name="name" type="text" placeholder="Superfeature" class="input-large" required="">
|
|
||||||
<p class="help-block">Give the feature a name</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="description">Description</label>
|
|
||||||
<div class="controls">
|
|
||||||
<input id="description" name="description" type="text" placeholder="It does this and that " class="input-large">
|
|
||||||
<p class="help-block">Describe the feature</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="strategy">Strategy</label>
|
|
||||||
<div class="controls">
|
|
||||||
<select id="strategy" name="strategy" class="input-large">
|
|
||||||
<option>Default</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
-->
|
|
||||||
<script type="text/jsx" src="js/unleash.jsx"></script>
|
<script type="text/jsx" src="js/unleash.jsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -16,6 +16,55 @@
|
|||||||
// Meny
|
// Meny
|
||||||
// NewFeatureForm
|
// NewFeatureForm
|
||||||
|
|
||||||
|
var FeatureForm = React.createClass({
|
||||||
|
|
||||||
|
render: function () {
|
||||||
|
return (
|
||||||
|
<form className="form-horizontal">
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
|
<legend>Add a new feature</legend>
|
||||||
|
|
||||||
|
<div className="control-group">
|
||||||
|
<label className="control-label" for="name">Name </label>
|
||||||
|
<div className="controls">
|
||||||
|
<input id="name" name="name" type="text"
|
||||||
|
placeholder="Superfeature" className="input-large" required="" />
|
||||||
|
<p className="help-block">Give the feature a name</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="control-group">
|
||||||
|
<label className="control-label" for="description">Description</label>
|
||||||
|
<div className="controls">
|
||||||
|
<input id="description" name="description" type="text"
|
||||||
|
placeholder="It does this and that " className="input-large" />
|
||||||
|
<p className="help-block">Describe the feature</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="control-group">
|
||||||
|
<label className="control-label" for="strategy">Strategy</label>
|
||||||
|
<div className="controls">
|
||||||
|
<select id="strategy" name="strategy" className="input-large">
|
||||||
|
<option>Default</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="control-group">
|
||||||
|
<label className="control-label" for="submit"></label>
|
||||||
|
<div className="controls">
|
||||||
|
<button id="submit" name="submit" className="btn btn-success">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var Feature = React.createClass({
|
var Feature = React.createClass({
|
||||||
// TODO: validate props?
|
// TODO: validate props?
|
||||||
handleEnableChange: function(event) {
|
handleEnableChange: function(event) {
|
||||||
@ -131,6 +180,7 @@ var FeatureList = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
<div className='panel-body'>
|
<div className='panel-body'>
|
||||||
{featureNodes}
|
{featureNodes}
|
||||||
|
<FeatureForm />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user