MyAcc: using JS confirm instead of JS Alert
[unfold.git] / portal / templates / account-view.html
index 83e03d3..3c3d543 100644 (file)
@@ -26,7 +26,7 @@
                                <td class="key">Email</td>
                                <td class="value">
                                                <span id="emailval" class="value" >{{ person.email }}</span>
-                                               <button class="btn btn-default btn-xs" type="button" id="edit_email" onclick="emailAlert()"  title="To change your affiliation please contact the administrator">
+                                               <button class="btn btn-default btn-xs" type="button" id="edit_email" onclick="editAlert()"  title="To change your affiliation please contact the administrator">
                                                <span class="glyphicon glyphicon-question-sign"></span> Edit
                                                </button>
                                        </td>
                                        <td class="key">Authority</td>
                                        <td class="value">
                                                <span id="affval" class="value">{{ authority }}</span>
-                                                <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="affAlert()"  title="To change your authority please contact the administrator">
+                                                <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()"  title="To change your authority please contact the administrator">
                                                <span class="glyphicon glyphicon-question-sign"></span> Edit
                                                 </button>
                                        </td>
                                </tr>
                                <tr class="even">
                                        <td class="key">Generate Keys</td>
-                                       <td> 
-                                               <button id="generate_keypair" class="btn btn-danger btn-xs" name="generate" type="submit" onclick="myFunction()
-                                                               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 
-                                               </button>
+                                       <td>
+                                               <input type="submit" name="generate" class="btn btn-danger btn-xs" value="Generate a new Key Pair" id="generate_keypair
+                                                          onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');" 
+                                                          title="It will generate a new key Pair and your current credentials will be overwritten."/>
                                </td> 
                        </tr>
                        <tr class="odd">
                                                <span class="hide_this" id="span_upload">
                                                        <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_upload"> Cancel </button>
                                                        <div style='display:none;'>
-                                                       <input type='hidden'  name='upload'  /></div>
-                                                       <input type="file" name="pubkey" class="required" id="pubkey"/>  
-                                                       <button class="btn btn-default btn-xs" name="upload_key" id="upload_key"  type="submit" title="Upload your public key">
-                                                               <span class="glyphicon glyphicon-upload"></span> Upload
-                                                       </button>
+                                                               <input type='hidden'  name='upload'  /></div>
+                                                               <input type="file" name="pubkey" class="required" id="pubkey"/>  
+                                                               <input class="btn btn-default btn-xs" name="upload_key" id="upload_key"  type="submit" title="Upload your public key" value="Upload"
+                                                                  onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
                                                </span>
                                                <div style='display:none;'> <input type='hidden'  name='dload'  /> </div> 
                                                <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
                                        <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey">
                                                        <span class="glyphicon glyphicon-download"></span> Download     
                                                </button>
-                                       <button class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
+                                       <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit"  value="Delete" title="Delete your private key"
+                                                               onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/> 
                                </td>
                                  {%else%}
                                        <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform   -->
                                        <button type="submit" name="dl_pkey" class="btn btn-default btn-xs disabled" title="Download your privaye key" id="dl_pkey">
                                                <span class="glyphicon glyphicon-download"></span> Download 
                                        </button>
-                               <button class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key">Delete </button>
+                                       <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key"
+                                                               value="Delete"  />
                                        </td>
                                 {%endif%}              
                                </tr>