This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new c49ca19 Move rejections to end, so list can easily expand
c49ca19 is described below
commit c49ca19cc2d6eea922336e06bc32af0e1b6b881b
Author: Sebb <[email protected]>
AuthorDate: Fri Feb 18 21:57:07 2022 +0000
Move rejections to end, so list can easily expand
---
www/secretary/workbench/views/parts.js.rb | 95 ++++++++++++++++---------------
1 file changed, 50 insertions(+), 45 deletions(-)
diff --git a/www/secretary/workbench/views/parts.js.rb
b/www/secretary/workbench/views/parts.js.rb
index dd40f9f..c0c241f 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -151,9 +151,26 @@ class Parts < Vue
_hr
- _h4 'Reject email with message:'
+ _label do
+ _input type: 'radio', name: 'doctype', value: 'forward',
+ onClick: -> {@form = Forward}
+ _span 'forward email'
+ end
+
+ _hr
+
+ _label do
+ _input type: 'radio', name: 'doctype', value: 'forward',
+ onClick: -> {@form = Note}
+ if @headers&.secmail&.notes
+ _span 'edit note'
+ else
+ _span 'add note'
+ end
+ end
+
+ _hr
- # reject message with message
_form method: 'POST', target: 'content' do
_input type: 'hidden', name: 'message',
value: window.parent.location.pathname
@@ -162,8 +179,20 @@ class Parts < Vue
_input type: 'hidden', name: 'missing_address', value:
@missing_address
_input type: 'hidden', name: 'missing_email', value: @missing_email
+ # Defer processing (must be part of POST block)
+
+ _label do
+ _input type: 'radio', name: 'doctype', value: 'pubkey',
+ onClick: self.reject
+ _span 'upload public key'
+ end
+
+ # The reject reason list will grow, so do it last
+
+ _h4 'Reject email with message:'
+
_label do
- _span 'Copy project: '
+ _span 'Cc project: '
_select name: 'project', value: @project, disabled: @filed do
_option ''
@@projects.each do |project|
@@ -172,25 +201,27 @@ class Parts < Vue
end
end
- spacer = "\u00A0" * 4 # non-breaking space as UTF-8
- _label do
- _ spacer
- _input type: 'checkbox', checked: @missing_address,
- onClick:-> {@missing_address = !@missing_address}
- _span ' missing or partial postal address'
- end
-
- _label do
- _ spacer
- _input type: 'checkbox', checked: @missing_email,
- onClick: -> {@missing_email = !@missing_email}
- _span ' missing email address'
- end
-
_label do
_input type: 'radio', name: 'doctype', value: 'incomplete',
onClick: self.reject
- _span 'incomplete form'
+ _span 'incomplete form (select missing items below first)'
+ end
+
+ _ul do
+ _li do
+ _label do
+ _input type: 'checkbox', checked: @missing_address,
+ onClick: -> {@missing_address = !@missing_address}
+ _span ' missing or partial postal address'
+ end
+ end
+ _li do
+ _label do
+ _input type: 'checkbox', checked: @missing_email,
+ onClick: -> {@missing_email = !@missing_email}
+ _span ' missing email address'
+ end
+ end
end
_label do
@@ -205,32 +236,6 @@ class Parts < Vue
_span 'resubmitted form'
end
- _label do
- _input type: 'radio', name: 'doctype', value: 'pubkey',
- onClick: self.reject
- _span 'upload public key'
- end
-
- end
-
- _hr
-
- _label do
- _input type: 'radio', name: 'doctype', value: 'forward',
- onClick: -> {@form = Forward}
- _span 'forward email'
- end
-
- _hr
-
- _label do
- _input type: 'radio', name: 'doctype', value: 'forward',
- onClick: -> {@form = Note}
- if @headers&.secmail&.notes
- _span 'edit note'
- else
- _span 'add note'
- end
end
end