Commit 69be160f authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 560003: Hide the "Add Bug URLs" box behind an (add) link.

r=timello, a=mkanat
parent 1dc3eb46
......@@ -203,6 +203,12 @@ function updateCalendarFromField(date_field) {
}
}
function setupEditLink(id) {
var link_container = 'container_showhide_' + id;
var input_container = 'container_' + id;
var link = 'showhide_' + id;
hideEditableField(link_container, input_container, link);
}
/* Hide input fields and show the text with (edit) next to it */
function hideEditableField( container, input, action, field_id, original_value ) {
......
......@@ -175,11 +175,20 @@
[% '</ul>' IF value.size %]
[% IF Param('use_see_also') %]
<label for="[% field.name FILTER html %]">
<strong>Add [% terms.Bug %] URLs:</strong>
</label><br>
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input" name="[% field.name FILTER html %]">
<span id="container_showhide_[% field.name FILTER html %]"
class="bz_default_hidden">
<a href="#" id="showhide_[% field.name FILTER html %]">(add)</a>
</span>
<div id="container_[% field.name FILTER html %]">
<label for="[% field.name FILTER html %]">
<strong>Add [% terms.Bug %] URLs:</strong>
</label><br>
<input type="text" id="[% field.name FILTER html %]" size="40"
class="text_input" name="[% field.name FILTER html %]">
</div>
<script type="text/javascript">
setupEditLink('[% field.name FILTER js %]');
</script>
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<div id="keyword_container">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment