Changeset 174772 in webkit


Ignore:
Timestamp:
Oct 16, 2014 9:01:19 AM (10 years ago)
Author:
ddkilzer@apple.com
Message:

Display legal text when uploading a patch with a new bug

  • js/attachment.js:

(setContentTypeDisabledState): Make this work on the Enter Bug
page so that the "Submit Bug" button changes to
"Agree and Submit Bug" when the "patch" checkbox is checked, and
it changes back to "Submit Bug" when unchecked.

  • template/en/custom/attachment/createformcontents.html.tmpl:

Include the attachment/patchlegalese.html.tmpl template when
returning the page so that it will be shown when the "patch"
checkbox is checked. Set the 'product' variable from the CGI
variable of the same name.

  • template/en/custom/attachment/patchlegalese.html.tmpl: Add the

'expert_fields' class to the <tr> element so that it gets
shown/hidden when the Show/Hide Advanced Fields links are
clicked.

Location:
trunk/Websites/bugs.webkit.org
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/bugs.webkit.org/js/attachment.js

    r174771 r174772  
    5656    if (isdisabled) {
    5757        document.getElementById('legal').style.display = "table-row";
    58         document.getElementById('create').value = "Agree and Submit";
     58        var createButton = document.getElementById('create');
     59        if (createButton && createButton.value == "Submit")
     60            createButton.value = "Agree and Submit";
     61        else {
     62            var commitButton = document.getElementById('commit');
     63            if (commitButton && commitButton.value == "Submit Bug")
     64                commitButton.value = "Agree and Submit Bug";
     65        }
    5966    } else {
    60         document.getElementById('create').value = "Submit";
     67        var createButton = document.getElementById('create');
     68        if (createButton && createButton.value == "Agree and Submit")
     69            createButton.value = "Submit";
     70        else {
     71            var commitButton = document.getElementById('commit');
     72            if (commitButton && commitButton.value == "Agree and Submit Bug")
     73                commitButton.value = "Submit Bug";
     74        }
    6175        document.getElementById('legal').style.display = "none";
    6276    }
  • trunk/Websites/bugs.webkit.org/template/en/custom/attachment/createformcontents.html.tmpl

    r174764 r174772  
    9292  </td>
    9393</tr>
     94[%# if WEBKIT_CHANGES %]
     95[% USE CGI %]
     96[% cgi_product = CGI.param('product') %]
     97[% PROCESS attachment/patchlegalese.html.tmpl product = cgi_product %]
     98[%# endif // WEBKIT_CHANGES %]
    9499
    95100[% BLOCK content_types %]
  • trunk/Websites/bugs.webkit.org/template/en/custom/attachment/patchlegalese.html.tmpl

    r174771 r174772  
    2525[%# if WEBKIT_CHANGES %]
    2626[% IF (product == "WebKit" || product == "Security") %]
    27     <tr id="legal" style="display: none;">
     27    <tr id="legal" class="expert_fields" style="display: none;">
    2828      <th>Legal:</th>
    2929      <td>
Note: See TracChangeset for help on using the changeset viewer.