]> git.parisson.com Git - teleforma.git/commitdiff
prepare user filters for mess writing
authoryomguy <yomguy@parisson.com>
Tue, 12 Jun 2012 23:43:15 +0000 (01:43 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 12 Jun 2012 23:43:15 +0000 (01:43 +0200)
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/postman/base_write.html

index 7da23852ad5a020cd02530edc1ee6ca6a874af60..04f2fb82c34fc9a21710e23286cc58f0f3c582df 100644 (file)
@@ -1586,4 +1586,5 @@ input,textarea{
     font-weight: bold;
     font-size: 0.8125em;
     text-align: center;
-    }
\ No newline at end of file
+    }
+
index 35bc0a35a782dc75b5c986c2bc4fbcaa387b0c95..45a4da83ddbc91c1f00261a0c5c77b41c7039739 100644 (file)
 {% block content %}
 <div id="postman" class="desk_messages">
 <h1>{% block pm_write_title %}{% endblock %}</h1>
+<!--<div style="padding-top: 0.5em;">
+<select id="_professorSelect" name="professors" onchange="update_recipients();">
+<option>{% trans "Choose a professor" %}</option>
+<option value="admin">me</option>
+<option value="a.abou-el-haja">You</option>
+</select>
+</div>-->
+<div class="write_content">
 <form id="_messageForm" action="{% if next_url %}?next={{ next_url|urlencode }}{% endif %}" method="post">{% csrf_token %}
 <table>
 {% block pm_write_recipient %}{% endblock %}
 {{ form.as_table }}
 </table>
-<a href="#" class="component_icon button icon_next" onclick="f=document.getElementById('_messageForm'); f.submit(); return false;">{% trans "Send" %}</a>
 </form>
+<a href="#" class="component_icon button icon_next" id="send_button">{% trans "Send" %}</a>
+</div>
 </div>
 <script type="text/javascript">document.getElementById("id_subject").focus();</script>
+<script type="text/javascript">
+function update_recipients() {
+$("#_professorSelect").click(function () {
+      var htmlStr = $(this).val();
+      $("#id_recipients").val(htmlStr);
+    });
+}
+
+$('#send_button').click(function() {
+  $('#_messageForm').submit();
+});
+
+</script>
 {% endblock %}
\ No newline at end of file