Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
<%= simple_form_for([:settings,@category, @settings_menu_item],:html => {:onsubmit=>"return validateForm()"}) do |f| %>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -92,4 +92,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function validateForm() {
|
||||||
|
var x = $(".item_attributes").val();
|
||||||
|
if (x == null) {
|
||||||
|
swal({
|
||||||
|
title: "Opps!",
|
||||||
|
text: "Item attributes must be filled out",
|
||||||
|
type: 'error',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<%= simple_form_for([:settings,@category, @settings_menu_item]) do |f| %>
|
<%= simple_form_for([:settings,@category, @settings_menu_item],:html => {:onsubmit=>"return validateForm()"}) do |f| %>
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -88,4 +88,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function validateForm() {
|
||||||
|
var x = $(".item_attributes").val();
|
||||||
|
if (x == null) {
|
||||||
|
swal({
|
||||||
|
title: "Opps!",
|
||||||
|
text: "Item attributes must be filled out",
|
||||||
|
type: 'error',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user