Repeating rules are now required

This commit is contained in:
echarp 2018-01-21 23:25:31 +01:00
parent dde09adbc1
commit cdd2f3de5e
8 changed files with 80822 additions and 2 deletions

View File

@ -14,8 +14,10 @@ $(document).on 'turbolinks:load', ->
$(this).change ->
if $(this).val() > 0
$('.field.rule').show()
$('.field.rule input').attr 'required', 'required'
else
$('.field.rule').hide()
$('.field.rule input').removeAttr 'required'
# Manage event tags edition
$('#event_tags').each ->

View File

@ -100,6 +100,8 @@ input, textarea, select, a.button, .actions > button, .mce-tinymce, div.tagsinpu
[type=radio]:checked + label
color: black
box-shadow: 0 0 0 6px lightgray
[type=radio]:invalid + label
box-shadow: 0 0 1px tomato
.actions
text-align: center

View File

@ -76,7 +76,7 @@
.field.repeat{ title: t('.rule_helper') }
= f.label :repeat
= f.number_field :repeat, in: 0..40
.field.rule
.field.rule.required
= f.label :rule
%span.radios
- Event::RULES.each do |rule|

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long