+[%- USE T8 %]
[% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
<form action="[% HTML.escape(script) %]" method="post" name="Form">
<input type="hidden" name="allow_creation" value="[% HTML.escape(allow_creation) %]">
<input type="hidden" name="action_on_part_selected" value="[% HTML.escape(action_on_part_selected) %]">
<input type="hidden" name="filter" value="[% HTML.escape(filter) %]">
+ <input type="hidden" name="options" value="[% HTML.escape(options) %]">
<input type="hidden" name="new_description" value="[% HTML.escape(description) %]">
<div class="listtop">[% title %]</div>
<tr>
<td>
[% IF no_parts_found %]
- <translate>No part was found matching the search parameters.</translate>
+ [% 'No part was found matching the search parameters.' | $T8 %]
[% IF allow_creation %]
- <translate>However, you can create a new part which will then be selected.</translate>
+ [% 'However, you can create a new part which will then be selected.' | $T8 %]
[% END %]
[% ELSE %]
- <translate>Please select a part from the list below.</translate>
+ [% 'Please select a part from the list below.' | $T8 %]
[% IF allow_creation %]
- <translate>Alternatively you can create a new part which will then be selected.</translate>
+ [% 'Alternatively you can create a new part which will then be selected.' | $T8 %]
[% END %]
[% END %]
</td>
[% FOREACH part = PARTS %]
<tr class="listrow[% IF loop.count % 2 %]1[% ELSE %]0[% END %]">
- <td><button type="button" onclick="part_selected('[% loop.count %]')"><translate>Select</translate></button></td>
+ <td><button type="button" onclick="part_selected('[% loop.count %]')">[% 'Select' | $T8 %]</button></td>
<td>
<input type="hidden" id="partsid_[% loop.count %]" name="partsid_[% loop.count %]" value="[% HTML.escape(part.id) %]">
<input type="hidden" id="partnumber_[% loop.count %]" name="partnumber_[% loop.count %]" value="[% HTML.escape(part.partnumber) %]">
</table>
[% IF allow_creation %]
- <p><input type="submit" name="action" value="<translate>New part</translate>"></p>
+ <p><input type="submit" name="action" value="[% 'New part' | $T8 %]"></p>
[% END %]
</form>
}
if (document.Form.action_on_part_selected.value != "") {
window.opener.document.getElementsByName("action")[0].value = document.Form.action_on_part_selected.value;
- window.opener.document.Form.submit();
+ window.opener.document.[% formname %].submit();
}
input.value = name;
}
+ [%- IF click_button %]
+ window.opener.document.[% formname %].[% click_button %].click();
+ [%- END %]
+
self.close();
}
//-->