Avoid accidental auto-submit of new msg form, for subject field
This commit is contained in:
parent
9125d7ef74
commit
714c0a6cfd
3 changed files with 19 additions and 3 deletions
|
@ -221,11 +221,13 @@ class MessageView(MasterView):
|
|||
if self.creating:
|
||||
f.set_widget('subject', dfwidget.TextInputWidget(
|
||||
placeholder="please enter a subject",
|
||||
autocomplete='off'))
|
||||
autocomplete='off',
|
||||
attributes={'@keydown.native': 'subjectKeydown'}))
|
||||
f.set_required('subject')
|
||||
|
||||
# body
|
||||
f.set_widget('body', dfwidget.TextAreaWidget(cols=50, rows=15))
|
||||
f.set_widget('body', dfwidget.TextAreaWidget(
|
||||
cols=50, rows=15, attributes={'ref': 'messageBody'}))
|
||||
|
||||
if self.creating:
|
||||
f.remove('sender', 'sent')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue