Skip to content

Instantly share code, notes, and snippets.

@mwiencek
Created March 7, 2015 03:58
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 mwiencek/aed5d1061b018afc073f to your computer and use it in GitHub Desktop.
Save mwiencek/aed5d1061b018afc073f to your computer and use it in GitHub Desktop.
// This file is part of MusicBrainz, the open internet music database.
// Copyright (C) 2015 MetaBrainz Foundation
// Licensed under the GPL version 2, or (at your option) any later version:
// http://www.gnu.org/licenses/gpl-2.0.txt
var React = require('react');
var PartialDate = require('./PartialDate.js');
var i18n = require('../../../common/i18n.js');
var DatePeriod = React.createClass({
render: function () {
var relationship = this.props.relationship;
// var error = ???
return (
<PartialDate label={i18n.addColon('Begin date')} date={relationship.beginDate} />
<PartialDate label={i18n.addColon('End date')} date={relationship.endDate} />
{error &&
<tr>
<td></td>
<td class="error">{error}</td>
</tr>}
<tr>
<td colspan="2">
<label>
<input type="checkbox" checked={relationship.ended} onChange={this.props.endedChangeCallback} />
{i18n.l('This relationship has ended.')}
</label>
</td>
</tr>
);
}
});
module.exports = DatePeriod;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment