Aklapper has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/107410


Change subject: Some smaller CSS and linebreak cleanup
......................................................................

Some smaller CSS and linebreak cleanup

Upstream trunk saw some smaller cleanups in
http://bzr.mozilla.org/bugzilla/trunk/revision/8842
http://bzr.mozilla.org/bugzilla/trunk/revision/8841
http://bzr.mozilla.org/bugzilla/trunk/revision/8837
so merge simple stuff.

Bonus: Set "General/Unknown" as selected default component in
the guided bug entry form, if it exists for that product.

Change-Id: Idab2c1ceff1182f26248d6ed7b82a55f7af1c325
---
M template/en/custom/bug/create/create-guided.html.tmpl
1 file changed, 34 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications 
refs/changes/10/107410/1

diff --git a/template/en/custom/bug/create/create-guided.html.tmpl 
b/template/en/custom/bug/create/create-guided.html.tmpl
index f371acf..2ec4de9 100644
--- a/template/en/custom/bug/create/create-guided.html.tmpl
+++ b/template/en/custom/bug/create/create-guided.html.tmpl
@@ -40,11 +40,9 @@
   width: 100%;
   height: 250px;
 }
-.field_description {
+th {
   text-align: right; 
   vertical-align: top;
-}
-.field_description > span {
   font-weight: bold;
 }
 .field_content {
@@ -88,10 +86,20 @@
   line-height: 1.5em;
   border-bottom: 1px solid rgb(170, 170, 170);
 }
+.guided_form_field {
+    background-color: #dbeeff;
+}
+#description.comment {
+    color: green;
+    margin-left: 10px;
+    height: 5em;
+    overflow: auto;
+}
+#guided_form #description {
+    display: inline;
+}
   "
  %]
-
-[% tablecolor = "#dbeeff" %]
 
 [%# This script displays the descriptions for selected components. %]
 <script type="text/javascript">
@@ -180,7 +188,7 @@
   tell us more about your issue.
 </p>
 
-<form method="post" action="post_bug.cgi">
+<form id="guided_form" method="post" action="post_bug.cgi">
   <input type="hidden" name="format" value="guided">
   <input type="hidden" name="assigned_to" value="">
   <input type="hidden" name="priority"
@@ -192,20 +200,15 @@
 <table style="vertical-align:top; padding:5px; border-spacing:5px; border:0px; 
margin-right:0px">
 
   <tr>
-    <td class="field_description">
-      <span>Product</span>
-    </td>
+    <th>Product</th>
     <td class="field_content">
       <input type="hidden" name="product" value="[% product.name FILTER html 
%]">
       [% product.name FILTER html %]
     </td>
   </tr>
 
-  <tr>
-  <tr style="background-color:[% tablecolor %];">
-    <td class="field_description">
-      <span>Summary</span>
-    </td>
+  <tr class="guided_form_field">
+    <th>Summary</th>
     <td class="field_content">
       <p>
         How would you summarize the issue in one sentence?
@@ -223,9 +226,7 @@
              maxlength="255" spellcheck="true">
     </td>
   </tr>
-    <td class="field_description">
-      <span>Component</span>
-    </td>
+    <th>Component</th>
     <td class="field_content">
       <p>
         In which area does the issue occur?  If you are unsure, just use 
"General/Unknown".
@@ -238,12 +239,9 @@
       <table style="border:0px; padding:0px; border-spacing:0px; 
margin-right:0px">
         <tr>
           <td class="field_content">
-            <select name="component" id="component"
-                    size="5" onchange="PutDescription()">
+            <select name="component" id="component" size="5" 
onchange="PutDescription()">
               [% IF NOT default.component_ %]
-                [%# Various b.m.o. products have a "General" component,
-                    which is a useful default. %]
-                [% default.component_ = "General" %]
+                [% default.component_ = "General/Unknown" %]
               [% END %]
               [% FOREACH c = product.components %]
                 <option value="[% c.name FILTER html %]"
@@ -254,12 +252,10 @@
             </select>
           </td>
           <td style="vertical-align:top;">
-              <div id="description" style="color: #24569b; margin-left: 10px;
-                                           height: 5em; overflow: auto;">
+              <div id="description" class="comment">
                 <script type="text/javascript">
                   if ((document.getElementById) && (document.body.innerHTML)) {
-                    document.write("\
-                    Select a component to see its description here.");
+                    document.write("Select a component to see its description 
here.");
                   }
                 </script>
               </div>
@@ -269,10 +265,8 @@
     </td>
   </tr>
 
-  <tr style="background-color:[% tablecolor %];">
-    <td class="field_description">
-      <span>Intention</span>
-    </td>
+  <tr class="guided_form_field">
+    <th>Intention</th>
     <td class="field_content">
       <p>
         What were you trying to do (and why)?
@@ -286,9 +280,7 @@
   </tr>
 
   <tr>
-    <td class="field_description">
-      <span>Steps to Reproduce</span>
-    </td>
+    <th>Steps to Reproduce</th>
     <td class="field_content">
       <p>
         What did you do? Describe how to reproduce the
@@ -320,10 +312,8 @@
     </td>
   </tr>
 
-  <tr style="background-color:[% tablecolor %];">
-    <td class="field_description">
-      <span>Results</span>
-    </td>
+  <tr class="guided_form_field">
+    <th>Results</th>
     <td class="field_content">
       <p>
         What happened?
@@ -337,9 +327,7 @@
   </tr>
 
   <tr>
-    <td class="field_description">
-      <span>Expectations</span>
-    </td>
+    <th>Expectations</th>
     <td class="field_content">
       <p>
         What were your expectations instead?
@@ -352,10 +340,8 @@
     </td>
   </tr>
 
-  <tr style="background-color:[% tablecolor %];">
-    <td class="field_description">
-      <span>Severity</span>
-    </td>
+  <tr class="guided_form_field">
+    <th>[% field_descs.bug_severity FILTER html %]</th>
     <td class="field_content">
       <p>
         How serious is the problem?
@@ -388,9 +374,7 @@
   </tr>
 
   <tr>
-    <td class="field_description">
-      <span>URL</span><span> (optional)</span>
-    </td>
+    <th>URL</span><span> (optional)</th>
     <td class="field_content">
       <p>
         Is there a web address where the problem can be seen?
@@ -401,10 +385,8 @@
 
   [% cf_browser = [ "---", "Apple Safari", "Firefox", "Google Chrome", 
"Internet Explorer", "Opera", "Other" ] %]
 
-  <tr style="background-color:[% tablecolor %];">
-    <td class="field_description">
-      <span>Web browser</span><span> (optional)</span>
-    </td>
+  <tr class="guided_form_field">
+    <th>Web browser</span><span> (optional)</th>
     <td class="field_content">
      <p>
         Which web browser do you use to visit internet pages?
@@ -414,9 +396,7 @@
   </tr>
 
   <tr>
-    <td class="field_description">
-      <span>Any Additional Information</span><span> (optional)</span>
-    </td>
+    <th>Any Additional Information</span><span> (optional)</th>
     <td class="field_content">
       <p>
         Do you have any additional information? Anything which may be

-- 
To view, visit https://gerrit.wikimedia.org/r/107410
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idab2c1ceff1182f26248d6ed7b82a55f7af1c325
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bugzilla/modifications
Gerrit-Branch: master
Gerrit-Owner: Aklapper <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to