Title: [174772] trunk/Websites/bugs.webkit.org
- Revision
- 174772
- Author
- [email protected]
- Date
- 2014-10-16 09:01:19 -0700 (Thu, 16 Oct 2014)
Log 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.
Modified Paths
Diff
Modified: trunk/Websites/bugs.webkit.org/js/attachment.js (174771 => 174772)
--- trunk/Websites/bugs.webkit.org/js/attachment.js 2014-10-16 16:01:18 UTC (rev 174771)
+++ trunk/Websites/bugs.webkit.org/js/attachment.js 2014-10-16 16:01:19 UTC (rev 174772)
@@ -55,9 +55,23 @@
// if WEBKIT_CHANGES
if (isdisabled) {
document.getElementById('legal').style.display = "table-row";
- document.getElementById('create').value = "Agree and Submit";
+ var createButton = document.getElementById('create');
+ if (createButton && createButton.value == "Submit")
+ createButton.value = "Agree and Submit";
+ else {
+ var commitButton = document.getElementById('commit');
+ if (commitButton && commitButton.value == "Submit Bug")
+ commitButton.value = "Agree and Submit Bug";
+ }
} else {
- document.getElementById('create').value = "Submit";
+ var createButton = document.getElementById('create');
+ if (createButton && createButton.value == "Agree and Submit")
+ createButton.value = "Submit";
+ else {
+ var commitButton = document.getElementById('commit');
+ if (commitButton && commitButton.value == "Agree and Submit Bug")
+ commitButton.value = "Submit Bug";
+ }
document.getElementById('legal').style.display = "none";
}
// endif WEBKIT_CHANGES
Modified: trunk/Websites/bugs.webkit.org/template/en/custom/attachment/createformcontents.html.tmpl (174771 => 174772)
--- trunk/Websites/bugs.webkit.org/template/en/custom/attachment/createformcontents.html.tmpl 2014-10-16 16:01:18 UTC (rev 174771)
+++ trunk/Websites/bugs.webkit.org/template/en/custom/attachment/createformcontents.html.tmpl 2014-10-16 16:01:19 UTC (rev 174772)
@@ -91,6 +91,11 @@
[% END %]
</td>
</tr>
+[%# if WEBKIT_CHANGES %]
+[% USE CGI %]
+[% cgi_product = CGI.param('product') %]
+[% PROCESS attachment/patchlegalese.html.tmpl product = cgi_product %]
+[%# endif // WEBKIT_CHANGES %]
[% BLOCK content_types %]
[%# WEBKIT_CHANGES: Added XHTML source and SVG image. %]
Modified: trunk/Websites/bugs.webkit.org/template/en/custom/attachment/patchlegalese.html.tmpl (174771 => 174772)
--- trunk/Websites/bugs.webkit.org/template/en/custom/attachment/patchlegalese.html.tmpl 2014-10-16 16:01:18 UTC (rev 174771)
+++ trunk/Websites/bugs.webkit.org/template/en/custom/attachment/patchlegalese.html.tmpl 2014-10-16 16:01:19 UTC (rev 174772)
@@ -24,7 +24,7 @@
[%# if WEBKIT_CHANGES %]
[% IF (product == "WebKit" || product == "Security") %]
- <tr id="legal" style="display: none;">
+ <tr id="legal" class="expert_fields" style="display: none;">
<th>Legal:</th>
<td>
<b>WebKit Contribution Terms:</b><br/>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes