{{-- IMAGES ONLINE --}}
<div class="imagery-type-wrapper mb-8">
<div class="flex mb-8">
- <input type="radio" id="imagery_web" name="imagery-type" value="{{ __('Images en ligne', 'ccv') }}">
<label for="imagery_web" class="imagery-icon">@svg('imagery-web', 'w-22 md:w-20 sm:w-16')</label>
<div class="ml-4">
<div class="text-lg sm:text-base font-normal leading-tight mb-1">
</form>
<script>
(function ($) {
+ $('.imagery-link-block').each(function(i, el) {
+ $(this).find('input').on("input", function() {
+ if($(this).val() !== '') {
+ $(this).parents('.imagery-link-block').find('input').attr('data-parsley-required', 'true').attr('required');
+ }else {
+ $(this).parents('.imagery-link-block').find('input').removeAttr('data-parsley-required required');
+ }
+ })
+ })
+
$('[name=social-cover]').on('change', function() {
var isChecked = $(this).is(':checked');
if (isChecked) {
}
// Re-validate the form to apply the changes
- $('[name=work-accident]').parsley().validate();
+ $('[name=work-accident]').parsley().validate()
});
// Clicking browse triggers the file form. It opens the dialog to capture images or browse files