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 e041c4ec Use utility methods
e041c4ec is described below

commit e041c4ecee5d80cf35aaa9a14df7e630a0f0071c
Author: Sebb <[email protected]>
AuthorDate: Wed Feb 1 13:22:31 2023 +0000

    Use utility methods
---
 www/committers/tm-report.cgi  |  4 +---
 www/members/mentor-update.cgi | 17 +++++++----------
 www/officers/unlistedclas.cgi |  8 ++------
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/www/committers/tm-report.cgi b/www/committers/tm-report.cgi
index 06cdd38a..1cd3790f 100755
--- a/www/committers/tm-report.cgi
+++ b/www/committers/tm-report.cgi
@@ -178,9 +178,7 @@ def emit_form()
       emit_input(label: 'Committer Email of Reporter', name: 'reporteremail', 
readonly: true,
         value: "#{user.public_name} (whimsy) <#{user.id}@apache.org>", icon: 
'glyphicon-user', iconlabel: 'Committer Email')
 
-      _div.col_sm_offset_3.col_sm_9 do
-        _input.btn.btn_default type: 'submit', value: 'Submit Report'
-      end
+      _whimsy_forms_submit(value: 'Submit Report')
     end
   end
 end
diff --git a/www/members/mentor-update.cgi b/www/members/mentor-update.cgi
index 629a7e26..aa1eb6e2 100755
--- a/www/members/mentor-update.cgi
+++ b/www/members/mentor-update.cgi
@@ -33,9 +33,8 @@ def emit_form(apacheid, mdata, button_help, uimap)
         end
       end
 
-      _div.form_group do
-        _label.col_sm_offset_3.col_sm_9.strong.text_left 'How Mentees Should 
Work With You'
-      end
+      _whimsy_forms_subhead(label: 'How Mentees Should Work With You')
+
       emit_mentor_input('contact', mdata, uimap, 'glyphicon-bullhorn', req: 
true)
       field = 'timezone'
       _whimsy_forms_select(label: uimap[field][0], name: field,
@@ -60,16 +59,14 @@ def emit_form(apacheid, mdata, button_help, uimap)
         helptext: uimap[field][1]
       )
 
-      _div.form_group do
-        _label.col_sm_offset_3.col_sm_9.strong.text_left 'What You Could Help 
Mentees With'
-      end
+      _whimsy_forms_subhead(label: 'What You Could Help Mentees With')
+
       emit_mentor_input('experience', mdata, uimap, 'glyphicon-certificate')
       emit_mentor_input('available', mdata, uimap, 'glyphicon-plus-sign')
       emit_mentor_input('mentoring', mdata, uimap, 'glyphicon-minus-sign')
 
-      _div.form_group do
-        _label.col_sm_offset_3.col_sm_9.strong.text_left 'More About You 
Personally'
-      end
+      _whimsy_forms_subhead(label: 'More About You Personally')
+
       emit_mentor_input('homepage', mdata, uimap, 'glyphicon-console')
       emit_mentor_input('pronouns', mdata, uimap, 'glyphicon-user')
       field = 'aboutme'
@@ -79,7 +76,7 @@ def emit_form(apacheid, mdata, button_help, uimap)
       )
 
       _div.form_group do
-        _label.col_sm_offset_3.col_sm_9.strong.text_left 'Temporarily Opt Out 
From Any NEW Mentees'
+        _whimsy_forms_subhead(label: 'Temporarily Opt Out From Any NEW 
Mentees')
         _label.control_label.col_sm_3 'Not Accepting New Mentees', for: 
MentorFormat::NOTAVAILABLE
         _div.col_sm_9 do
           _div.input_group do
diff --git a/www/officers/unlistedclas.cgi b/www/officers/unlistedclas.cgi
index f238e407..a21353fc 100755
--- a/www/officers/unlistedclas.cgi
+++ b/www/officers/unlistedclas.cgi
@@ -18,9 +18,7 @@ end
 def emit_form(search=nil, value=nil)
   _whimsy_panel('Search for ICLA', style: 'panel-success') do
     _form.form_horizontal method: 'post' do
-      _div.form_group do
-        _label.col_sm_offset_3.col_sm_9.strong.text_left 'Enter search term'
-      end
+      _whimsy_forms_subhead(label: 'Enter search term')
       field = 'search'
       _whimsy_forms_input(label: 'Search for', name: field, id: field,
         value: search, helptext: 'Enter email address'
@@ -31,9 +29,7 @@ def emit_form(search=nil, value=nil)
           value: value
         )
       end
-      _div.col_sm_offset_3.col_sm_9 do
-        _input.btn.btn_default type: 'submit', value: 'Search'
-      end
+      _whimsy_forms_submit(value: 'Search')
     end
   end
 end

Reply via email to