.col-lg-6 .info-box %span#logo.info-box-img.info-box-icon{style: "background-image: url(#{f.object.logo? ? f.object.logo : '/assets/admin/profile-menu.jpg'})"} .info-box-content %span.info-box-text = f.input :logo .info-box %span#favicon.info-box-img.info-box-icon{style: "background-image: url(#{f.object.favicon? ? f.object.favicon : '/assets/admin/profile-menu.jpg'})"} .info-box-content %span.info-box-text = f.input :favicon .col-lg-6 .box.slice-box .box-header.with-border %h3.box-title Basic information .box-tools.pull-right %a.btn.btn-box-tool{"data-widget" => "collapse", type: "button"} %i.fa.fa-minus .box-body.pure-input = f.input :name, input_html: {class: "form-control"}, :required => true, label: false, placeholder: "Name" = f.input :description, input_html: {class: "form-control"}, :required => true, label: false, placeholder: "Description" = f.input :email, input_html: {class: "form-control"}, :required => true, label: false, placeholder: "Email" = f.input :phone, input_html: {class: "form-control"}, :required => true, label: false, placeholder: "Phone number" = f.input :mobile, input_html: {class: "form-control"}, :required => true, label: false, placeholder: "Mobile" .pull-right = f.button :submit, t("keppler.actions.apply"), :class => "btn-primary" -# .card-image -# - if f.object.favicon? -# = image_tag f.object.favicon -# - else -# = image_tag "admin/profile-menu.jpg" -# %span.card-title Upload Favicon -# .card-action -# = f.input :favicon, as: :file_material, label: false, wrapper_html: { class: "file-field" } :javascript $(document).ready(function(){ $("#setting_logo").change(function(){ $('#logo').css('background-image', "url(" + $(this).val() + ")"); $('#edit_setting_1').submit(); }); $("#setting_favicon").change(function(){ $('#favicon').css('background-image', "url(" + $(this).val() + ")"); $('#edit_setting_1').submit(); }) });