Changeset 7479


Ignore:
Timestamp:
Apr 16, 2018, 2:15:32 PM (5 years ago)
Author:
Nicklas Nordborg
Message:

References #2112: Add support for SSH private keys to file server items

Fixed the "remove existing private key" checkbox so that it removes the key and disables the other controls.

Renamed the "HTTPS certificates" tab to "HTTPS options".

Location:
trunk/www/filemanager/fileservers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/filemanager/fileservers/edit_fileserver.jsp

    r7472 r7479  
    8888      extensions="<%=invoker%>">
    8989    <t:tab id="info" title="File server" helpid="fileserver.edit">
    90       <table class="fullform input100">
     90      <table class="fullform input100 larger">
    9191      <tr>
    9292        <th>Name</th>
     
    180180      </table>
    181181    </t:tab>
    182     <t:tab id="serverCertificate" title="HTTPS certificates"
     182    <t:tab id="httpsOptions" title="HTTPS options"
    183183      helpid="fileserver.edit">
    184184     
    185       <table class="fullform input100">
     185      <table class="fullform input100 larger">
    186186      <tr class="big">
    187187        <th>Server certificate</th>
     
    228228    <t:tab id="sshOptions" title="SSH options"
    229229      helpid="fileserver.edit">
    230       <table class="fullform input100">
     230      <table class="fullform input100 larger">
    231231      <tr>
    232232        <th>SSH fingerprint</th>
  • trunk/www/filemanager/fileservers/fileservers.js

    r7472 r7479  
    4242      // Tab validation
    4343      TabControl.addTabValidator('settings.info', fileServers.validateFileServer);
    44       TabControl.addTabValidator('settings.serverCertificate', fileServers.validateCertificates);
     44      TabControl.addTabValidator('settings.httpsOptions', fileServers.validateHttpsOptions);
    4545      TabControl.addTabValidator('settings.sshOptions', fileServers.validateSshOptions);
    4646     
     
    5252      Events.addEventHandler('removeServerCertificate', 'click', fileServers.removeServerCertificateOnClick);
    5353      Events.addEventHandler('removeClientCertificate', 'click', fileServers.removeClientCertificateOnClick);
     54      Events.addEventHandler('removeSshPrivateKey', 'click', fileServers.removeSshPrivateKeyOnClick);
    5455     
    5556    }
     
    112113  }
    113114 
    114   fileServers.validateCertificates = function()
     115  fileServers.validateHttpsOptions = function()
    115116  {
    116117    return true;
     
    184185  }
    185186
     187  fileServers.removeSshPrivateKeyOnClick = function()
     188  {
     189    var frm = document.forms['server'];
     190    if (frm.remove_ssh_private_key.checked)
     191    {
     192      frm.ssh_private_key.value = '';
     193      frm.ssh_private_key.disabled = true;
     194      frm.ssh_private_key_password.disabled = true;
     195      frm.ssh_private_key_format.disabled = true;
     196    }
     197    else
     198    {
     199      frm.ssh_private_key.disabled = false;
     200      frm.ssh_private_key_password.disabled = false;
     201      frm.ssh_private_key_format.disabled = false;
     202    }
     203  }
    186204
    187205  return fileServers;
Note: See TracChangeset for help on using the changeset viewer.