Sha256: 4aa8c2220c426a36353a9609c8e640380d3157dfaac3b3fb7e546cd1bf88fd3e

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

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

submit.style.display = "none";
notice.style.display = "inline-block";

setTimeout(function () {
    notice.style.display = "none";
    submit.style.display = "inline-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

2 entries across 2 versions & 1 rubygems

Version Path
sail-3.5.1 app/views/sail/settings/update.js.erb
sail-3.5.0 app/views/sail/settings/update.js.erb