aboutsummaryrefslogtreecommitdiff
blob: 0d0ef575e88974d10342a8f15a84289c5bd60eac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<h1>New GLSA request</h1>

<%= form_tag(:action => "create") do %>
<div class="box w40em">
  <input type="hidden" name="what" value="request" />
  <%= box_title('Bugs', :icon => 'icons/bug.png') %>
  <p><label for="bugs">Please enter the relevant bug ID(s), separate more than one bug with a comma:</label></p>

  <p><input type="text" name="bugs" id="bugs" class="hugetext nice" value="<%= params[:bugs] %>"/></p>
  <script language="javascript">
    $("bugs").observe('change', function(event) {
      new Ajax.Request("<%= url_for :controller => 'tools', :action => 'bugs_ajax_info' %>", {
         method: 'get',
         parameters: { bugs: $('bugs').getValue() },
         onSuccess : function(transport) {
           $('ajaxbugs').update(transport.responseJSON.buginfo);
           $('suggesteddescr').update(transport.responseJSON.title);
         }
      });
    });
  </script>
  <div id="ajaxbugs"></div>
</div>
<br />
<div class="box w40em">
  <%= box_title('Title', :icon => 'icons/edit.png') %>
  <p><label for="title">Either take the suggested title or enter a new custom one:</label></p>
  <div id="suggesteddescr"></div>
  <p><textarea name="title" id="title" class="largetext nice" rows="2"><%= params[:title] %></textarea></p>
</div>
<br />
<div class="box w40em">
  <%= box_title('Comment ' << content_tag('small', '(optional)'), :icon => 'icons/comment.png', :escape => false) %>
  <p><label for="comment">If you want to add a comment, enter it here:</label></p>
  <p><textarea name="comment" id="comment" class="nice" rows="4"><%= params[:comment] %></textarea></p>
</div>
<br />
<div class="box w40em">
  <%= box_title('References', :icon => 'icons/reference.png') %>
  <p>
    <input type="checkbox" name="import_references" id="import_references" value="1" checked="checked" />
    <label for="import_references">Import all references from linked bugs</label>
  </p>
</div>
<br />
<%- if current_user.access >= 1 -%>
<div class="box w40em">
  <%= box_title('Permissions', :icon => 'icons/permission.png') %>
  <p><label for="access">Mark this request as</label>:
    <select name="access" id="access">
      <%= options_for_select %w{ public confidential }, params[:access] || "public" %>
    </select>
  </p>
</div>
<br />
<%- end -%>
<div style="width: 40em; text-align: right; display: inline-block;">
  <input type="submit" class="button" value="File request &raquo;"/>
</div>
<% end -%>