review slice layout for resources - the 'customize resources layout' area only makes...
[myslice.git] / portal / templates / account-view.html
1 {% extends "layout-unfold1.html" %}
2
3 {% block head %}
4 <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/account_view_html.css" />
5 <script type="text/javascript" src="{{STATIC_URL}}/jquery.validate.js"></script> 
6 <script type="text/javascript" src="{{STATIC_URL}}/my_account.edit_profile.js"></script>
7 <script type="text/javascript" src="{{STATIC_URL}}/my_account.register.js"></script>
8 {% endblock %}
9
10 {% block unfold1_main %}
11
12
13 <h2>Platform Access</h2>
14 <div id="middle" align="center">
15         <div class="well">
16                 <table class="mytable"> 
17                         <tr class="odd"> 
18                         <th>Platform</th> 
19                         <th>Account Type</th> 
20                         <th>user_hrn</th>
21                         <th>Pub Key</th>
22                 </tr>   
23                         {% for row in data %}         
24                         <tr class="border_bottom">
25                         <td class="odd"> {{ row.platform_name }} </td>
26                         <td class="even"> {{ row.account_type }} </td>
27                         <td class="odd"> {{ row.usr_hrn }}  </td>
28                         <td class="even"> {{ row.usr_pubkey }} </td>
29                 </tr> 
30                         {%endfor%}               
31                 </table>
32         </div>
33 </div>
34
35
36 <h2>MySlice  Account</h2>
37 <div id="middle" align="center">
38         <div class="well">
39                 <form id="editForm"  method="POST" action="account_process" enctype="multipart/form-data">
40                 {% csrf_token %}
41                         <table class="profile">          
42                         <tr class="odd">
43                                 <td colspan="2">
44                                                 <div id="info">Personal Details</div>
45                                 </td>
46                         </tr>
47                         <tr class="even">
48                                 <td class="key">Email</td>
49                                 <td class="value">
50                                                 <span id="emailval" class="value" >{{ person.email }}</span>
51                                                 <img class="logo" src="{{STATIC_URL}}/img/ques_icon.png" onclick="emailAlert()"  title="To change your email please contact the administrator" 
52                                                          style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; margin-top: -9px;">
53                                         </td>
54                         </tr>
55                         <tr class="odd">
56                                         <td class="key">Password</td>
57                                         <td class="value"> 
58                                                 <button class="edit" type="button" title="Password" name="edit_pass" id="edit_pass">Edit</button>
59                                                 <span id="passval"class="value">******** </span>
60                                                 <span class="hide_this" id="span_pass">
61                                                 <button type="button" class="cancel" title="Cancel" id="cancel_pass_change"> Cancel </button>
62                                                 <div style='display:none;' id="pass_form">
63                                                 <input type='hidden'  value='' /></div>
64                                                 <table id="edit_password">
65                                                         <tr>
66                                                                         <td>Enter password: </td>
67                                                                         <td class="field"> <input type="password" name="password" id="password" /> </td>
68                                                                 </tr>
69                                                                 <tr>
70                                                                         <td>Confirm password: </td>
71                                                                         <td class="field"> 
72                                                                                 <input type="password" name="confirmpassword" id="confirmpassword" /> 
73                                                                                 <input type="submit" name="submit_pass" value="Save"/> 
74                                                                         </td>
75                                                         </tr>
76                                                 </table>
77                                                 </span> 
78                                         </td>
79                         </tr>
80                         <tr class="even">
81                                         <td class="key">Full Name</td>
82                                         <td class="value">
83                                                 <span id="nameval" class="value" >{{ fullname }} </span>
84                                                 <span class="hide_this" id="span_name">
85                                                 <button type="button" class="cancel" title="Cancel" id="cancel_name_change"> Cancel </button> 
86                                                 <div style='display:none;'><input type='hidden'  name='nameform'  /></div>
87                                                 <input id="fname" type="text" name="fname" class="required"  maxlength="200" value="{{firstname}}" />
88                                                 <input id="lname" type="text" name="lname" class="required"  maxlength="200" value="{{lastname}}" />
89                                                 <input type="submit" name="submit_name" value="Save"/>
90                                                 </span>
91                                                 <button class="edit" type="button"title="Full Name" id="edit_name">Edit</button>
92                                         </td>
93                         </tr>
94                         <tr class="odd">
95                                         <td class="key">Authority</td>
96                                         <td class="value">
97                                                 <span id="affval" class="value">{{ authority }}</span>
98                                                 <img class="logo" src="{{STATIC_URL}}/img/ques_icon.png" onclick="affAlert()"  title="To change your affiliation please contact the administrator" 
99                                                          style="height: 20px; width: 20px; position: absolute; left: 625px; left: 900px; ">
100                                         </td>
101                                 </tr>
102                                 <tr class="even">
103                                         <td class="key">Generate Keys</td>
104                                         <td> 
105                                                 <button id="generate_keypair" name="generate" type="submit" onclick="myFunction()" 
106                                                                 title="Generate a new key pair. After it is generated, you will need to download your public and private keys again.">Generate a new Key Pair 
107                                                 </button>
108                                 </td> 
109                         </tr>
110                         <tr class="odd">
111                                 <td class="key">Public Key</td>
112                                 <td class="value">
113                                                 <span id="keyval" class="value">******** </span>
114                                                 <span class="hide_this" id="span_upload">
115                                                         <button type="button" class="cancel" title="Cancel" id="cancel_upload"> Cancel </button>
116                                                         <div style='display:none;'>
117                                                         <input type='hidden'  name='upload'  /></div>
118                                                         <input type="file" name="pubkey" class="required" id="pubkey"/>  
119                                                         <button name="upload_key" id="upload_key"  type="submit" title="Delete your private key">Upload </button>
120                                                 </span>
121                                                 <div style='display:none;'> <input type='hidden'  name='dload'  /> </div> 
122                                                 <button type="submit" name="dl_pubkey" class="download" title="Download your public key" id="dl_file"> Download </button>
123                                                 <button id="upload_file" type="button" title="Upload a public key"> Upload </button>       
124                                 </td>
125                         </tr>
126                         <tr class="even" id="pkey_row" display="none">
127                                 <td class="key">Private Key </td>
128                                 <td class="value">********<a href="#">
129                                         <button type="submit" name="dl_pkey" class="download" title="Download your privaye key" id="dl_pkey"> Download </button>
130                                         <button id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
131                                 </td>
132                                 </tr>
133                                 <tr class="odd">
134                                 <td colspan="2">
135                                         <p class="warning" id="pkey_del_msg"> For better security we recommend that you download and delete your private key from the server. 
136                                                                                                                           Always store your private key in a secure location. 
137                                                 </p>
138                                 </td>
139                                 </tr>
140                         </table>
141                 </form>
142         </div>
143 </div>
144
145 {% endblock %}