X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Femails%2Fsend.tpl;h=1434bc50f7f37d4f7e1f4458d4e3fa082174159f;hb=19ec6c8a9e24975bf168a07512c58ce300307dec;hp=a37b5f441808dc28f8c828ab25a63851daaf7e46;hpb=6bb2f79ab56e5e7610ba311bbc9d20b1a10cc91b;p=platal.git diff --git a/templates/emails/send.tpl b/templates/emails/send.tpl index a37b5f4..1434bc5 100644 --- a/templates/emails/send.tpl +++ b/templates/emails/send.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2009 Polytechnique.org *} +{* Copyright (C) 2003-2011 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -36,7 +36,7 @@ { _selectAll('to_contacts'); _selectAll('cc_contacts'); - if(form.sujet.value == "" && !confirm("Le sujet de l'email est vide, veux-tu continuer ?")) { + if(form.sujet.value == "" && !confirm("Le sujet de l'email est vide, veux-tu continuer ?")) { form.sujet.focus(); return false; } @@ -46,7 +46,7 @@ alert("Il faut définir au moins un destinataire."); return false; } - if (!confirm("Tous les destinataires sont en copie cachée, veux-tu continuer ?")) { + if (!confirm("Tous les destinataires sont en copie cachée, veux-tu continuer ?")) { form.to.focus(); return false; } @@ -65,7 +65,7 @@ for (var i = 0 ; i < form['cc_contacts[]'].length ; ++i) { ccc += form['cc_contacts[]'].options[i].value + ";"; } - $.post(platal_baseurl + "emails/send", + $.xpost("emails/send", { save: true, token: '{xsrf_token}', from: form.from.value, @@ -150,6 +150,17 @@ saveMessage(); return true; }); + $( + function() { + // Remove empty options in select (they were added only for HTML + // compatibility). + $('#to_contacts option[value=""]').remove(); + $('#cc_contacts option[value=""]').remove(); + }); + + $(function() { + $("[name='to']").focus(); + }); {/literal} //]]> @@ -162,10 +173,10 @@
{xsrf_token_field} - + - + - + - + - + {/if} @@ -283,15 +305,15 @@ {$smarty.request.contenu} {if !$smarty.request.contenu} -- -{$smarty.session.prenom} {$smarty.session.nom} +{$smarty.session.user->full_name} {/if}
Destinataires
de : @@ -176,19 +187,19 @@ {/if}' />
à :
copie :
copie cachée : @@ -211,49 +222,60 @@

+ {if !$to_not_empty} + {* HTML compatibility *} + + {/if} + + {if !$to_not_empty} + {/if} +
Destinataires
- >> >>
- << << + >> >>
+ << <<
En copie
- >> >>
- << << + >> >>
+ << <<
- {foreach item=contact from=$contacts} - - {/foreach}