Commit 991f6ff6 authored by Efthymia Bika's avatar Efthymia Bika

Use 'More'/'Less' link instead of checkbox

parent 540e53bd
......@@ -239,27 +239,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
$('#token-error small').hide();
$('#cert-path-error small').hide();
$("#cert-path").html(DEFAULT_CERT);
if(cloud) {
$("#cloud-name").val(cloud.name);
$("#cloud-url").val(cloud.auth_url);
$("#token").val(cloud.token);
if(cloud.cert) {
$("#cert-path-div").show();
$("#cert-path").html(cloud.cert);
$("#use-cert").prop("checked", true);
} else {
$("#cert-path-div").hide();
$("#cert-path").html(DEFAULT_CERT);
$("#use-cert").prop("checked", false);
}
} else {
$("#cloud-name").val('');
$("#cloud-url").val('');
$("#token").val('');
$("#login").hide();
$("#cert-path-div").hide();
$("#use-cert").prop("checked", false);
$("#cert-path").html(DEFAULT_CERT);
activate_li("dummy");
}
......@@ -279,11 +271,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
cloud.token = token;
cloud.pithos_public = pithos_public;
cloud.uuid = uuid;
if($("#use-cert").is(":checked")) {
cloud.cert = cert;
} else {
cloud.cert = DEFAULT_CERT;
}
if(cert) cloud.cert = cert;
clouds[cloud_name] = cloud;
render_clouds("");
activate_li("li_" + cloud.name);
......@@ -456,18 +445,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
<div class="clearfix">
<div class="small-3 columns">
<label id="cert-show-label" for="cert-path-div"
class="right inline">
Show certificate settings
</label>
</div>
<div class="small-9 columns">
<input type="checkbox" id="use-cert"
onclick="$('#cert-path-div').toggle(this.checked);
toggle_default_button()"/>
<a onclick="toggle_settings('cert-path-div',
'more_icon');toggle_default_button()">
<i class="fa fa-plus-square-o"
id="more_icon">&nbsp;More</i>
</a>
</div>
</div>
<div class="clearfix hide" id="cert-path-div">
<fieldset>
<div class="small-3 columns">
<label id="cert-path-label" for="cert-path"
class="right inline">
......@@ -494,6 +480,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Use default
</a>
</div>
</fieldset>
</div>
<div class="clearfix">
<div class="small-12 columns">&nbsp;</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment