Sha256: 0b5168897a38513e84802f598cd14a62ea5085d34a9db7f6be05b63f95e300fa

Contents?: true

Size: 732 Bytes

Versions: 3

Compression:

Stored size: 732 Bytes

Contents

var notice = document.getElementById("<%= @successful_update ? "success-#{@setting.name}" : "alert-#{@setting.name}" %>");
var description = document.getElementById("description-<%= @setting.name %>");

notice.style.display = "block";
description.style.display = "none";

setTimeout(function () {
    notice.style.display = "none";
    description.style.display = "block";
}, 1500);

if ("<%= @successful_update %>" === "true") {
    var input = document.getElementById("<%= "input_for_#{@setting.name}" %>");

    if ("<%= @setting.boolean? %>" === "true") {
        input.checked = "<%= @setting.value %>" === "true";
    } else {
        input.value = "<%= @setting.date? ? formatted_date(@setting) : @setting.value %>";
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sail-3.4.0 app/views/sail/settings/update.js.erb
sail-3.3.0 app/views/sail/settings/update.js.erb
sail-3.2.4 app/views/sail/settings/update.js.erb