blob: 2b47036fd892d8e6f34dd2d0ee5e2b9708bab61f (
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
|
<form>
<div class="modal-head">
{{#if change}}
<h2>{{t 'coding_rules.change_details'}}</h2>
{{else}}
<h2>{{t 'coding_rules.activate_in_quality_profile'}}</h2>
{{/if}}
</div>
<div class="modal-body modal-body-select2">
<div class="alert alert-danger"></div>
{{#empty qualityProfiles}}
{{#unless change}}
<div class="alert alert-info">{{t 'coding_rules.active_in_all_profiles'}}</div>
{{/unless}}
{{/empty}}
<table>
<tr class="property">
<th class="nowrap"><h3>{{t 'coding_rules.quality_profile'}}</h3></th>
<td>
{{#any key qProfile}}
{{name}}
{{else}}
<select id="coding-rules-quality-profile-activation-select">
{{#each qualityProfiles}}
<option value="{{key}}">{{name}}</option>
{{/each}}
</select>
{{/any}}
</td>
</tr>
<tr class="property">
<th class="nowrap"><h3>{{t 'severity'}}</h3></th>
<td>
<select id="coding-rules-quality-profile-activation-severity">
{{#each severities}}
<option value="{{this}}">{{t 'severity' this}}</option>
{{/each}}
</select>
</td>
</tr>
{{#if isCustomRule}}
<tr class="property">
<td colspan="2" class="note">{{t 'coding_rules.custom_rule.activation_notice'}}</td>
{{else}}
{{#each params}}
<tr class="property">
<th class="nowrap"><h3>{{key}}</h3></th>
<td>
{{#eq type 'TEXT'}}
<textarea class="width100" rows="3" name="{{key}}" placeholder="{{defaultValue}}">{{value}}</textarea>
{{else}}
{{#eq type 'BOOLEAN'}}
<select name="{{key}}" value="{{value}}">
<option value="{{defaultValue}}">{{t 'default'}} ({{t defaultValue}})</option>
<option value="true"{{#eq value 'true'}} selected="selected"{{/eq}}>{{t 'true'}}</option>
<option value="false"{{#eq value 'false'}} selected="selected"{{/eq}}>{{t 'false'}}</option>
</select>
{{else}}
<input type="text" name="{{key}}" value="{{value}}" placeholder="{{defaultValue}}">
{{/eq}}
{{/eq}}
<div class="note">{{{htmlDesc}}}</div>
{{#if extra}}
<div class="note">{{extra}}</div>
{{/if}}
</td>
</tr>
{{/each}}
{{/if}}
</table>
</div>
<div class="modal-foot">
<button id="coding-rules-quality-profile-activation-activate" {{#unless saveEnabled}}disabled="disabled"{{/unless}}>
{{#if change}}{{t 'save'}}{{else}}{{t 'coding_rules.activate'}}{{/if}}
</button>
<a id="coding-rules-quality-profile-activation-cancel" class="js-modal-close">{{t 'cancel'}}</a>
</div>
</form>
|