mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 02:02:43 +00:00
Add overwrite option for updating locks
This commit is contained in:
@@ -59,7 +59,8 @@ const LockBrew = createClass({
|
|||||||
code : 455,
|
code : 455,
|
||||||
editMessage : '',
|
editMessage : '',
|
||||||
shareMessage : 'This Brew has been locked.',
|
shareMessage : 'This Brew has been locked.',
|
||||||
result : {}
|
result : {},
|
||||||
|
overwrite : false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ const LockBrew = createClass({
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(!this.state.editMessage) return;
|
if(!this.state.editMessage) return;
|
||||||
const newLock = {
|
const newLock = {
|
||||||
|
overwrite : this.state.overwrite,
|
||||||
code : parseInt(this.state.code) || 100,
|
code : parseInt(this.state.code) || 100,
|
||||||
editMessage : this.state.editMessage,
|
editMessage : this.state.editMessage,
|
||||||
shareMessage : this.state.shareMessage,
|
shareMessage : this.state.shareMessage,
|
||||||
@@ -136,6 +138,10 @@ const LockBrew = createClass({
|
|||||||
{this.renderInput('shareMessage')}
|
{this.renderInput('shareMessage')}
|
||||||
</label>
|
</label>
|
||||||
<br />
|
<br />
|
||||||
|
<label>
|
||||||
|
Overwrite
|
||||||
|
<input name='overwrite' className='checkbox' type='checkbox' value={this.state.overwrite} onClick={()=>{return this.setState((prevState)=>{return { overwrite: !prevState.overwrite };});}} />
|
||||||
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type='submit' />
|
<input type='submit' />
|
||||||
</label>
|
</label>
|
||||||
@@ -163,8 +169,8 @@ const LockBrew = createClass({
|
|||||||
<div className='lockMessages'>
|
<div className='lockMessages'>
|
||||||
<h3>Messages</h3>
|
<h3>Messages</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Edit Message:</b> This is the private message that is ONLY displayed to the authors of the locked brew. This message MUST specify exactly what actions must be taken in order to have the brew unlocked.</li>
|
<li><b>Private Message:</b> This is the private message that is ONLY displayed to the authors of the locked brew. This message MUST specify exactly what actions must be taken in order to have the brew unlocked.</li>
|
||||||
<li><b>Share Message:</b> This is the public message that is displayed to the EVERYONE that attempts to view the locked brew.</li>
|
<li><b>Public Message:</b> This is the public message that is displayed to the EVERYONE that attempts to view the locked brew.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user