Repeating rules are now required
This commit is contained in:
parent
dde09adbc1
commit
cdd2f3de5e
@ -14,8 +14,10 @@ $(document).on 'turbolinks:load', ->
|
|||||||
$(this).change ->
|
$(this).change ->
|
||||||
if $(this).val() > 0
|
if $(this).val() > 0
|
||||||
$('.field.rule').show()
|
$('.field.rule').show()
|
||||||
|
$('.field.rule input').attr 'required', 'required'
|
||||||
else
|
else
|
||||||
$('.field.rule').hide()
|
$('.field.rule').hide()
|
||||||
|
$('.field.rule input').removeAttr 'required'
|
||||||
|
|
||||||
# Manage event tags edition
|
# Manage event tags edition
|
||||||
$('#event_tags').each ->
|
$('#event_tags').each ->
|
||||||
|
@ -100,6 +100,8 @@ input, textarea, select, a.button, .actions > button, .mce-tinymce, div.tagsinpu
|
|||||||
[type=radio]:checked + label
|
[type=radio]:checked + label
|
||||||
color: black
|
color: black
|
||||||
box-shadow: 0 0 0 6px lightgray
|
box-shadow: 0 0 0 6px lightgray
|
||||||
|
[type=radio]:invalid + label
|
||||||
|
box-shadow: 0 0 1px tomato
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
text-align: center
|
text-align: center
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
.field.repeat{ title: t('.rule_helper') }
|
.field.repeat{ title: t('.rule_helper') }
|
||||||
= f.label :repeat
|
= f.label :repeat
|
||||||
= f.number_field :repeat, in: 0..40
|
= f.number_field :repeat, in: 0..40
|
||||||
.field.rule
|
.field.rule.required
|
||||||
= f.label :rule
|
= f.label :rule
|
||||||
%span.radios
|
%span.radios
|
||||||
- Event::RULES.each do |rule|
|
- 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
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user