You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
490 B
19 lines
490 B
$(document).on('turbolinks:load', function() {
|
|
if ($('body.admins-mirror-repositories-edit-page, body.admins-mirror-repositories-update-page').length > 0) {
|
|
var $form = $('form.edit-mirror');
|
|
|
|
$form.validate({
|
|
errorElement: 'span',
|
|
errorClass: 'danger text-danger',
|
|
rules: {
|
|
"mirror_repository[type_name]": {
|
|
required: true
|
|
}
|
|
}
|
|
});
|
|
|
|
$form.submit(function(e){
|
|
if(!$form.valid()){ e.preventDefault(); }
|
|
});
|
|
}
|
|
}); |