1
0
mirror of https://github.com/flarum/core.git synced 2025-07-27 11:40:24 +02:00

SuspendUserModal: Allow re-selecting "Not suspended"

Without this, clicking on the "Not suspended" radio option would
unmark the currently selected value, but not select the first value.

Refs flarum/core#1345.
This commit is contained in:
Franz Liedke
2018-02-08 22:37:54 +01:00
parent f22c792fe0
commit 5a2bf0d015
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ System.register('flarum/suspend/components/SuspendUserModal', ['flarum/component
m( m(
'label', 'label',
{ className: 'checkbox' }, { className: 'checkbox' },
m('input', { type: 'radio', name: 'status', checked: !this.status(), onclick: m.withAttr('value', this.status) }), m('input', { type: 'radio', name: 'status', checked: !this.status(), value: '', onclick: m.withAttr('value', this.status) }),
app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label') app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')
), ),
m( m(

View File

@@ -35,7 +35,7 @@ export default class SuspendUserModal extends Modal {
<label>{app.translator.trans('flarum-suspend.forum.suspend_user.status_heading')}</label> <label>{app.translator.trans('flarum-suspend.forum.suspend_user.status_heading')}</label>
<div> <div>
<label className="checkbox"> <label className="checkbox">
<input type="radio" name="status" checked={!this.status()} onclick={m.withAttr('value', this.status)}/> <input type="radio" name="status" checked={!this.status()} value="" onclick={m.withAttr('value', this.status)}/>
{app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')} {app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')}
</label> </label>