projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes group payments.
[platal.git]
/
templates
/
emails
/
send.tpl
diff --git
a/templates/emails/send.tpl
b/templates/emails/send.tpl
index
3b4d0e1
..
1434bc5
100644
(file)
--- a/
templates/emails/send.tpl
+++ b/
templates/emails/send.tpl
@@
-1,6
+1,6
@@
{**************************************************************************}
{* *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-201
0
Polytechnique.org *}
+{* Copyright (C) 2003-201
1
Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@
-65,7
+65,7
@@
for (var i = 0 ; i < form['cc_contacts[]'].length ; ++i) {
ccc += form['cc_contacts[]'].options[i].value + ";";
}
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,
{ save: true,
token: '{xsrf_token}',
from: form.from.value,
@@
-150,13
+150,17
@@
saveMessage();
return true;
});
saveMessage();
return true;
});
- $(
document).ready(
+ $(
function() {
// Remove empty options in select (they were added only for HTML
// compatibility).
$('#to_contacts option[value=""]').remove();
$('#cc_contacts option[value=""]').remove();
});
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}
//]]>
</script>
{/literal}
//]]>
</script>
@@
-169,10
+173,10
@@
<form action="emails/send" method="post" enctype="multipart/form-data" id="form_mail" onsubmit="return check(this);">
{xsrf_token_field}
<table class="bicol" cellpadding="2" cellspacing="0">
<form action="emails/send" method="post" enctype="multipart/form-data" id="form_mail" onsubmit="return check(this);">
{xsrf_token_field}
<table class="bicol" cellpadding="2" cellspacing="0">
- <tr>
+ <tr>
<th colspan="2">Destinataires</th>
</tr>
<th colspan="2">Destinataires</th>
</tr>
- <tr>
+ <tr>
<td class="titre">de :</td>
<td>
<input type='hidden' name='signature' value='1' />
<td class="titre">de :</td>
<td>
<input type='hidden' name='signature' value='1' />
@@
-183,19
+187,19
@@
{/if}' />
</td>
</tr>
{/if}' />
</td>
</tr>
- <tr>
+ <tr>
<td class="titre">à :</td>
<td>
<input type='text' name='to' size='60' value="{$smarty.request.to}" />
</td>
</tr>
<td class="titre">à :</td>
<td>
<input type='text' name='to' size='60' value="{$smarty.request.to}" />
</td>
</tr>
- <tr>
+ <tr>
<td class="titre">copie :</td>
<td>
<input type='text' name='cc' size='60' value="{$smarty.request.cc}" />
</td>
</tr>
<td class="titre">copie :</td>
<td>
<input type='text' name='cc' size='60' value="{$smarty.request.cc}" />
</td>
</tr>
- <tr>
+ <tr>
<td class="titre">copie cachée :</td>
<td>
<input type='text' name='bcc' size='60' value="{$smarty.request.bcc}" />
<td class="titre">copie cachée :</td>
<td>
<input type='text' name='bcc' size='60' value="{$smarty.request.bcc}" />
@@
-218,7
+222,7
@@
<div style="float: right; width: 40%;">
<select id="to_contacts" name="to_contacts[]" multiple="multiple" style="width: 100%; height: 5em">
{foreach key=key item=contact from=$contacts}
<div style="float: right; width: 40%;">
<select id="to_contacts" name="to_contacts[]" multiple="multiple" style="width: 100%; height: 5em">
{foreach key=key item=contact from=$contacts}
- {if in_array($contact->hrpid,$smarty.request.to_contacts)}
+ {if
t($smarty.request.to_contacts) &&
in_array($contact->hrpid,$smarty.request.to_contacts)}
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
@@
-235,7
+239,7
@@
<br />
<select id="cc_contacts" name="cc_contacts[]" multiple="multiple" style="width: 100%; height: 5em">
{foreach key=key item=contact from=$contacts}
<br />
<select id="cc_contacts" name="cc_contacts[]" multiple="multiple" style="width: 100%; height: 5em">
{foreach key=key item=contact from=$contacts}
- {if in_array($contact->hrpid,$smarty.request.cc_contacts)}
+ {if
t($smarty.request.cc_contacts) &&
in_array($contact->hrpid,$smarty.request.cc_contacts)}
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
@@
-263,7
+267,8
@@
<div style="float: right; width: 40%">
<select id="contacts" name="all_contacts[]" multiple="multiple" style="height: 10em; width: 100%">
{foreach item=contact from=$contacts}
<div style="float: right; width: 40%">
<select id="contacts" name="all_contacts[]" multiple="multiple" style="height: 10em; width: 100%">
{foreach item=contact from=$contacts}
- {if !in_array($contact->hrpid,$smarty.request.to_contacts) && !in_array($contact->hrpid,$smarty.request.cc_contacts)}
+ {if !(isset($smarty.request.to_contacts|smarty:nodefaults) && isset($smarty.request.cc_contacts|smarty:nodefaults)) ||
+ (!in_array($contact->hrpid,$smarty.request.to_contacts) && !in_array($contact->hrpid,$smarty.request.cc_contacts))}
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
<option value="{$contact->hrpid}">
{$contact->full_name}
</option>
@@
-306,9
+311,9
@@
{literal}
function removeAttachments()
{
{literal}
function removeAttachments()
{
-
Ajax.update_html(null, 'emails/send', null
);
-
document.getElementById('att_already').style.display = 'none'
;
-
document.getElementById('att_form').style.display = ''
;
+
$.xget('email/send'
);
+
$('#att_already').hide()
;
+
$('#att_form').show()
;
}
{/literal}
//]]></script>
}
{/literal}
//]]></script>