aboutsummaryrefslogtreecommitdiffstats
path: root/lib/srtgui/templates/srtool_metadata_include.html
blob: 7471f0f90bf28f419ab18c9ad24678cd8216320b (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!-- Include html for SRTool metadata, edit metadata, edit notification -->

{% if default_category != "FYI" %}
<div class="row" id="display-status" style="padding-left: 25px;">
<fieldset style="border: 1px solid LightGray; padding-right: 20px;"> <!-- class="fieldset-auto-width"  -->
<UL>
    <LI>
    <i>Priority:</i> {{object.get_priority_text}},&nbsp;&nbsp;
    <i>Status:</i> {{object.get_status_text}},&nbsp;&nbsp;
	{% if default_category == "CVE" %}
      {% if request.user.is_creator %}
          <i>Publish</i> = {{object.get_publish_text}}, <i>Publish Date</i> = {{object.publish_date}}
          <!--<a class="btn btn-default navbar-btn " id="login-button" href="">Publish Now</a> -->
      {% else %}
          <i>Publish = {{object.get_publish_text}}</i>
      {% endif %}
      </LI>
      <LI>
        <i>Packages:</i> {{object.packages}}
      </LI>
    {% else %}
      <i>Outcome:</i> {{object.get_outcome_text}}
      <p>
    {% endif %}
    <LI>
      <i>Public Notes:</i> {{object.comments}}
    </LI>
    {% if request.user.is_creator %}
    <LI>
      <i>Private Notes:</i> {{object.comments_private}}
    </LI>
    {% endif %}
</UL>
</fieldset>

</div>
<!-- XHR SRTool Variables -->
<div id="details-quickedit" style="display:none;padding-left: 25px;">
  <fieldset style="border: 1px solid Blue; background-color:LightBlue; padding-left: 25px; padding-right: 20px;"> <!-- class="fieldset-auto-width"  -->
    <p><p>
    <button class="execute btn btn-primary btn-lg" id="submit-quickedit"> Submit Changes </button>
    <p><i>Priority</i> =
    <select name="Priority" id="select-priority-state">
    <option value="0" {% if 0 == object.priority %}selected{% endif %}>Undefined</option>
    <option value="1" {% if 1 == object.priority %}selected{% endif %}>Minor</option>
    <option value="2" {% if 2 == object.priority %}selected{% endif %}>Low</option>
    <option value="3" {% if 3 == object.priority %}selected{% endif %}>Medium</option>
    <option value="4" {% if 4 == object.priority %}selected{% endif %}>High</option>
    </select>
    &nbsp;&nbsp;
    <i>Status</i> =
    <select name="Status" id="select-status-state">
    <option value="0" {% if 0 == object.status %}selected{% endif %}>Historical</option>
    <option value="1" {% if 1 == object.status %}selected{% endif %}>New</option>
    <option value="2" {% if 2 == object.status %}selected{% endif %}>New-Reserved</option>
    <option value="3" {% if 3 == object.status %}selected{% endif %}>Investigate</option>
    <option value="4" {% if 4 == object.status %}selected{% endif %}>Vulnerable</option>
    <option value="5" {% if 5 == object.status %}selected{% endif %}>Not Vulnerable</option>
    </select>
    <p>
	{% if default_category == "CVE" %}
      <i>Publish</i> =
      <select name="Publish" id="select-publish-state">
      <option value="0" {% if 0 == object.publish_state %}selected{% endif %}>Unpublished</option>
      <option value="1" {% if 1 == object.publish_state %}selected{% endif %}>Not to be Published</option>
      <option value="2" {% if 2 == object.publish_state %}selected{% endif %}>Published</option>
      <option value="3" {% if 3 == object.publish_state %}selected{% endif %}>Publish Request (New)</option>
      <option value="4" {% if 4 == object.publish_state %}selected{% endif %}>Publish Request (Update)</option>
      <option value="5" {% if 5 == object.publish_state %}selected{% endif %}>Publish Submitted</option>
      </select>
      <i>Publish Date</i> = <input type="text" placeholder="Auto Publish Date" id="select-publish-date" size="40" value="{{object.publish_date}}"><p>
    {% else %} <!-- for Vulnerablity and Investigation -->
      <i>Outcome</i> =
      <select name="Outcome" id="select-outcome-state">
      <option value="0" {% if 0 == object.outcome_state %}selected{% endif %}>Open</option>
      <option value="1" {% if 1 == object.outcome_state %}selected{% endif %}>Closed (Not Vulnerable)</option>
      <option value="2" {% if 2 == object.outcome_state %}selected{% endif %}>Closed (Fixed)</option>
      <option value="3" {% if 3 == object.outcome_state %}selected{% endif %}>Closed (Won't Fix)</option>
      </select>
    {% endif %}
    <p>Note: <input type="text" placeholder="Edit Note" id="text-note" size="80" value="{{object.comments}}"></p>
    {% if request.user.is_creator %}
      <p>Private Note: <input type="text" placeholder="Edit Private Note" id="text-private-note" size="80" value="{{object.comments_private}}"></p>
    {% endif %}
    <p><p>
  </fieldset>
</div>
{% endif %} {# default_category != "FYI" #}

</div>
<!-- XHR Notification-->
<div id="details-notify-edit" style="display:none;padding-left:25px;">
  <fieldset style="border: 1px solid Blue; background-color:LightBlue; padding-left: 25px; padding-right: 20px;"> <!-- class="fieldset-auto-width"  -->
    <p><p>
    <button class="btn btn-primary btn-lg" id="submit-notification"> Submit Changes </button>
    <p><i>Category</i> =
    <select name="category" id="select-category-notify">
    {% for c in notify_categories %}
      <option value="{{c.category}}" {% if default_category == c.category %}selected{% endif %}>{{c.category}}</option>
    {% endfor %}
    </select>
    &nbsp;&nbsp;
    <i>Priority</i> =
    <select name="Priority" id="select-priority-notify">
    <option value="0">Undefined</option>
    <option value="1">Minor</option>
    <option value="2">Low</option>
    <option value="3" Selected>Medium</option>
    <option value="4">High</option>
    </select>
    <p>
    <p><input type="text" placeholder="Edit Note" id="notification-note" size="80"></p>
    <input type="checkbox" id="notification-url" name="url" value="{% if object.name %}{% url default_url object.name %}{% endif %}" checked>&nbsp;&nbsp;URL: <label>{% if object.name %}({% url default_url object.name %}){% endif %}</label>
    <p><p>
    <i>Users to notify</i> = <p>
	<div class="scrolling" style="width: 300px;">
      {% for user in users %}
        <div class="checkbox">
          <label>
            <input class="checkbox-users" name="notification-users" value="{{user.pk}}" type="checkbox" {% if "All" == user.name %}checked{% endif %}>{{user.name}}
          </label>
        </div>
      {% endfor %}
    </div>

  </fieldset>
</div>

<!-- add spacer before next content -->
<p>
<p>