summaryrefslogtreecommitdiffstats
path: root/templates/translation/edit.html
blob: 049be6cbd43118536c8f98510fd9dd94c1fd8a07 (plain) (blame)
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
<div class="container">
	<div class="panel panel-default">
		<div class="panel-heading">
			{{path}}
		</div>
		<div class="panel-body">
			<p>{{lang_templateAdminHelp}}</p>
			<div class="alert alert-info">
				{{lang_templateHint}}
			</div>
			<form action="?do=Translation" method="post">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>Mustache Tag</th>
							{{#langs}}
							<th>{{lang}}</th>
							{{/langs}}
							<th></th>
						</tr>
					</thead>
					<tbody>
						{{#tags}}
							<tr class="{{class}}" id="{{tag}}">
								<td>{{tag}}</td>
								{{#langs}}
								<td>
									<input type="text" class="form-control" placeholder="{{placeholder}}" value="{{translation}}" name="lang#{{lang}}#{{tag}}">
								</td>
								{{/langs}}
								<td>
									<button type="submit" class="btn btn-danger btn-xs" name="delete" value="{{tag}}"><span class="glyphicon glyphicon-remove"></span> {{lang_deleteTAG}}</button>
								</td>
							</tr>
						{{/tags}}
						<tr id="newTag">
						</tr>
					</tbody>
				</table>
				<a class="btn btn-primary" href='?do=Translation' >{{lang_back}}</a>
				<button class="btn btn-primary" type="button" onclick="addTag()" >{{lang_createTag}}</button> 
				<input type="hidden" name="path" value="{{path}}">
				<input type="hidden" name="token" value="{{token}}">
				<button type="submit" class="btn btn-primary" name="update" value="true">{{lang_save}}</button>
			</form>
		</div>
	</div>
</div>
<script>
function addTag(){
	var target = document.getElementById('newTag');
	target.innerHTML = "<td> <input type='text' class='form-control' placeholder='{{lang_newTAG}}' name='newtag'> </td> <td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_germanTAG}}' name='lang#de#newtag'> </td> <td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_englishTAG}}' name='lang#en#newtag'> </td>	<td style='width:250px;text-align:center;'> <input type='text' class='form-control' placeholder='{{lang_portugueseTAG}}' name='lang#pt#newtag'> </td><td></td>";
}
</script>