diff options
Diffstat (limited to 'python/Dawn/templates')
| -rw-r--r-- | python/Dawn/templates/wire_blotter.html | 25 | ||||
| -rw-r--r-- | python/Dawn/templates/wire_entry.html | 149 |
2 files changed, 130 insertions, 44 deletions
diff --git a/python/Dawn/templates/wire_blotter.html b/python/Dawn/templates/wire_blotter.html index 8397e5df..9f70621d 100644 --- a/python/Dawn/templates/wire_blotter.html +++ b/python/Dawn/templates/wire_blotter.html @@ -6,34 +6,19 @@ <td>Deal ID</td> <td>Trade Date</td> <td>Settle Date</td> - <td>Buy/Sell</td> - <td>Quantity</td> - <td>Type</td> - <td>Maturity</td> - <td>Price</td> - <td>Commission</td> - <td>Description</td> - <td>Ticker</td> - <td>Counterparty</td> <td>Strategy</td> + <td>Account</td> + <td>Amount</td> </tr> </thead> {% for trade in trades %} <tr> - <td><a href="{{url_for('wire_manage', wire_id=wire.id)}}">{{wire.dealid}}</a></td> + <td><a href="{{url_for('wire_manage', wire_id=trade.id)}}">{{trade.dealid}}</a></td> <td>{{trade.trade_date}}</td> <td>{{trade.settle_date}}</td> - <td>{% if trade.buysell %}Buy{% else %}Sell{% endif %}</td> - <td>{{trade.quantity}}</td> - <td>{{trade.swap_type}}</td> - <td>{{trade.maturity}}</td> - <td>{{trade.price}}</td> - <td>{{trade.commission}}</td> - <td>{{trade.security_desc}}</td> - <td>{{trade.bbg_ticker}}</td> - <td><a href="{{url_for('edit_counterparty', - cpcode=trade.counterparty.code)}}">{{trade.counterparty.name}}</a></td> <td>{{trade.folder}}</td> + <td>{{trade.account.name}}</td> + <td>{{trade.amount}}</td> </tr> {% endfor %} </table> diff --git a/python/Dawn/templates/wire_entry.html b/python/Dawn/templates/wire_entry.html index a5da6b2b..84176890 100644 --- a/python/Dawn/templates/wire_entry.html +++ b/python/Dawn/templates/wire_entry.html @@ -4,48 +4,149 @@ <meta charset="utf-8"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> </head> - <body style="max-width:1024px; margin:0 auto"> - <datalist id="index_list"></datalist> + <body style="max-width:512px; margin:20px auto"> <form method="POST" class="form-horizontal" action="{{action_url}}" enctype="multipart/form-data"> - {% for field in form if field.type != 'BooleanField' %} - <div class="form-group {% if field.id in form.errors %}has-error{% endif %}"> - {% if field.type != 'CSRFTokenField' %} - <label class="control-label col-md-2" for="{{ field.id }}"> - {{ field.label.text }} + <div class="form-group "> + <label class="control-label col-md-4" for="action"> + action </label> - {% endif %} - <div class="col-md-3"> - {{ field(class_="form-control") }} + <div class="col-md-6"> + <select class="form-control" id="action" name="action"> + <option value="NEW" + {% if action and action == 'NEW' %} + selected="selected" + {% endif %}>NEW</option> + <option value="UPDATE" + {% if action and action == 'UPDATE' %} + selected="selected" + {% endif %}>UPDATE</option> + <option value="CANCEL" + {% if action and action == 'CANCEL' %} + selected="selected" + {% endif %}>CANCEL</option> + </select> + </div> + </div> + <fieldset id="outgoing"> + <legend>Outgoing amounts</legend> + </fieldset> + <fieldset id="incoming"> + <legend>Incoming amounts</legend> + </fieldset> + <hr> + <div class="form-group"> + </div> + + <div class="form-group"> + <label class="control-label col-md-4" for="trade_date"> + trade_date + </label> + + <div class="col-md-6"> + <input class="form-control" id="trade_date" name="trade_date" value="{{trade_date}}" type="date"> </div> - {% if field.id in form.errors %} + </div> + + <div class="form-group"> + + <label class="control-label col-md-4" for="settle_date"> + settle_date + </label> + + <div class="col-md-6"> + <input class="form-control" id="settle_date" name="settle_date" value="{{settle_date}}" type="date"> + </div> + + </div> + + <div class="form-group "> + <div class="col-md-3"> - {{form.errors[field.id][0]}} - </div>{% endif %} + <input class="form-control" id="csrf_token" name="csrf_token" value="{{csrf_token()}}" type="hidden"> + </div> + </div> - {% endfor %} + <div class="form-group"> - <div class="col-md-offset-2 col-md-3"> + <div class="col-md-offset-4 col-md-6"> <div class="checkbox"> <label> - <input id="upload_globeop" name="upload_globeop" type="checkbox" value="y">Upload to globeop? + <input id="upload_globeop" name="upload_globeop" value="y" type="checkbox">Upload to globeop? </label> </div> </div> </div> <div class="form-group"> - <div class="col-md-offset-2 col-md-3"> + <div class="col-md-offset-4 col-md-6"> <button type="submit" class="btn btn-default">Submit</button> </div> </div> </form> - {% if 'cds' or 'swaption' in action_url %} - <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.0.min.js"></script> - <script type="text/javascript" - src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" - integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" + <template id="fragment"> + <div class="form-group"> + <label class="control-label col-md-4" for="folder"> + folder + </label> + <div class="col-md-6"> + <select class="form-control" id="folder" name="folder"> + <option value="None">{{strat}}</option> + {% for strat in strategies %} + <option value="{{strat[0]}}">{{strat[1]}}</option> + {% endfor %} + </select> + </div> + + </div> + <div class="form-group "> + + <label class="control-label col-md-4" for="code"> + account + </label> + + <div class="col-md-6"> + <select class="form-control" id="code" name="code"> + <option value="None"></option> + {% for account in accounts %} + <option value="{{account[0]}}">{{account[1]}}</option> + {% endfor %} + </select> + </div> + + </div> + + <div class="form-group "> + <label class="control-label col-md-4" for="amount">amount</label> + + <div class="col-md-6"> + <input class="form-control" id="amount" name="amount" value="" type="text"> + </div> + <div class="col-md-2"> + <input id="btn" type="button" class="btn" value="+"> + </div> + </div> + </template> + <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" + integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" + crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" + integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" + crossorigin="anonymous"></script> + <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" + integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script> - <script type="text/javascript" src="{{ url_for('static', filename='dawn.js') }}"></script> - {% endif %} + <script type="text/javascript" src="{{ url_for('static', filename='wire.js') }}"></script> + <script type="text/javascript"> + {% if outgoing_wires is defined %} + var outgoing_wires = {{outgoing_wires|tojson|safe}} + {% else %} + var outgoing_wires = []; + {% endif %} + {% if incoming_wires is defined %} + var incoming_wires = {{incoming_wires|tojson|safe}} + {% else %} + var incoming_wires = []; + {% endif %} + </script> </body> </html> |
