Files
Phraseanet/templates/web/thesaurus/new-synonym-dialog.html.twig
2013-02-28 16:14:33 +01:00

87 lines
3.7 KiB
Twig

{% if 'TS' == typ %}
{% set title = 'thesaurus:: Nouveau terme' | trans %}
{% set label = 'thesaurus:: terme' | trans %}
{% elseif 'SY' == typ %}
{% set title = 'thesaurus:: Nouveau synonyme' | trans %}
{% set label = 'thesaurus:: synonyme' | trans %}
{% else %}
{% set title = '' %}
{% set label = '' %}
{% endif %}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="{{ app['locale.I18n'] }}">
<head>
<title>{{ title }}</title>
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
<script type="text/javascript">
self.returValue = null;
function clkBut(button)
{
switch(button)
{
case "submit":
t = document.forms[0].term.value;
k = document.forms[0].context.value;
if(k != "")
t += " ("+k+")";
self.returnValue = {"t":t, "lng":null };
for(i=0; i<(n=document.getElementsByName("lng")).length; i++)
{
if(n[i].checked)
{
self.returnValue.lng = n[i].value;
break;
}
}
self.close();
break;
case "cancel":
self.close();
break;
}
}
</script>
</head>
<body class="dialog" onload="self.document.forms[0].term.focus();">
<br/>
<form onsubmit="return(false);">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="text-align:right; width:80px;">{{ label }} :&nbsp;</td>
<td></td>
<td><input type="text" style="width:250px;" name="term"></td>
</tr>
<tr>
<td style="text-align:right">{% trans 'thesaurus:: contexte' %} : </td>
<td><b>(</b>&nbsp;</td>
<td><input type="text" style="width:250px;" name="context">&nbsp;<b>)</b></td>
</tr>
<tr>
<td valign="bottom" style="text-align:right">{% trans 'phraseanet:: language' %} :&nbsp;</td>
<td></td>
<td valign="bottom">
{% for code, language in languages %}
<span style="display:inline-block">
<input type="radio" {% if code == piv %}checked{% endif %} name="lng" value="{{ code }}" id="lng_{{ code }}">
<label for="lng_{{ code }}"><img src="/skins/lng/{{ code }}_flag_18.gif" />({{ language }})</label>
</span>
&nbsp;&nbsp;
{% endfor %}
</td>
</tr>
</table>
<br/>
<div style="position:absolute; left:0px; bottom:0px; width:100%; text-align:center">
<input type="button" style="width:80px;" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:80px">
&nbsp;&nbsp;
<input type="button" style="width:80px;" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:80px">
<br/>
<br/>
</div>
</form>
</body>
</html>