diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb
index bbd075095..1bed4880d 100644
--- a/app/controllers/conferences_controller.rb
+++ b/app/controllers/conferences_controller.rb
@@ -135,7 +135,9 @@ def create
def update
authorize @conference, :orga?
respond_to do |format|
- if @conference.update_attributes(existing_conference_params)
+ if not params[:conference]
+ format.html { redirect_to(edit_conference_path(conference_acronym: @conference.acronym), notice: t('conferences_module.notice_conference_not_updated')) }
+ elsif @conference.update_attributes(existing_conference_params)
format.html { redirect_to(edit_conference_path(conference_acronym: @conference.acronym), notice: t('conferences_module.notice_conference_updated')) }
else
flash_model_errors(@conference)
diff --git a/app/views/conferences/_form.html.haml b/app/views/conferences/_form.html.haml
index 6f9928700..feccebcc0 100644
--- a/app/views/conferences/_form.html.haml
+++ b/app/views/conferences/_form.html.haml
@@ -53,7 +53,11 @@
:coffeescript
duration_to_time = (minutes) ->
two_digits = (n) ->
- (n).toString().padStart(2, '0')
+ if n < 10
+ return "0" + n
+ else
+ return "" + n
+
two_digits(minutes // 60) + ':' + two_digits(minutes % 60)
render_duration_checkboxes = () ->
@@ -65,7 +69,7 @@
ul.empty()
for slots in [1..max_timeslots]
minutes = slots * minutes_per_slot
- is_checked = checked_items.includes(minutes.toString()) || minutes == default_submission_in_minutes
+ is_checked = minutes.toString() in checked_items || minutes == default_submission_in_minutes
is_disabled = minutes==default_submission_in_minutes
item = $('', { class: 'accepted-duration-checkbox', type: 'checkbox', value: minutes, checked: is_checked, disabled: is_disabled})
ul.append(item).append(duration_to_time(minutes)).append(' ')
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 329f9d95c..45465cb75 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -536,6 +536,7 @@ de:
Fügen Sie mit der Schaltfläche rechts eine Konferenz hinzu.
notice_bulk_notification_queued: Alle Benachrichtigungen für die Einreichungen in %{notification} an den Ticket-Server übergeben.
notice_conference_created: Die Konferenz wurde erfolgreich erstellt.
+ notice_conference_not_updated: Konferenz wurde nicht aktualisiert.
notice_conference_updated: Die Konferenz wurde erfolgreich aktualisiert.
past_conferences: Frühere Konferenzen
recent_changes: Letzte Änderungen
diff --git a/config/locales/en.yml b/config/locales/en.yml
index b4f38bd39..21cffed0e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -515,6 +515,7 @@ en:
button on the right.
notice_bulk_notification_queued: Bulk notifications for events in %{notification} enqueued.
notice_conference_created: Conference was successfully created.
+ notice_conference_not_updated: Conference was not updated.
notice_conference_updated: Conference was successfully updated.
past_conferences: Past Conferences
recent_changes: Recent changes
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 2c286fc37..572f8a64d 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -560,6 +560,7 @@ es:
botón a la derecha.
notice_bulk_notification_queued: Notificaciones masivas para eventos en %{notification} en cola.
notice_conference_created: La conferencia fue creada con éxito.
+ notice_conference_not_updated: La conferencia no se actualizó.
notice_conference_updated: La conferencia fue actualizada con éxito.
past_conferences: Conferencias pasadas
recent_changes: Cambios recientes
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index f87781fc3..fd3dc4006 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -524,6 +524,7 @@ fr:
en cliquant sur le bouton de droite.
notice_bulk_notification_queued: Groupe de notifications pour les évènements dans %{notification} mises en file d’attente..
notice_conference_created: Conférence créée avec succès.
+ notice_conference_not_updated: La conférence n'a pas été mise à jour.
notice_conference_updated: Conférence mise à jour avec succès.
past_conferences: Conférences passées
recent_changes: Changements récents
diff --git a/config/locales/it.yml b/config/locales/it.yml
index 5047a84a2..fa6cbb43d 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -524,6 +524,7 @@ it:
cliccando sul tasto destro.
notice_bulk_notification_queued: Gruppo di notifica per eventi in %{notification} in coda.
notice_conference_created: Conferenza creata con successo.
+ notice_conference_not_updated: La conferenza non è stata aggiornata.
notice_conference_updated: Conferenza aggiornata con successo.
past_conferences: Conferenze passate
recent_changes: Cambiamenti recenti
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 14ab36927..cf0f5a6f1 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -537,6 +537,7 @@ pt-BR:
botão à direita.
notice_bulk_notification_queued: Notificações em massa para eventos em %{notification} enfileirados.
notice_conference_created: Conferência foi criada com sucesso.
+ notice_conference_not_updated: A conferência não foi atualizada.
notice_conference_updated: Conferência foi atualizada com sucesso.
past_conferences: Conferências passadas
recent_changes: Mudanças recentes
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index a7fe2c135..bd8333903 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -515,6 +515,7 @@ ru:
справа.
notice_bulk_notification_queued: Массовые уведомления для событий в %{notification} в очереди.
notice_conference_created: Конференция была успешно создана.
+ notice_conference_not_updated: Конференция не обновлялась.
notice_conference_updated: Конференция была успешно обновлена.
past_conferences: Прошедшие конференции
recent_changes: Недавние изменения
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index e02759bb1..eeef5a61c 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -515,6 +515,7 @@ zh:
按钮在右边。
notice_bulk_notification_queued: 批量通知%{notification}中的事件入队。
notice_conference_created: 会议成功创建。
+ notice_conference_not_updated: 会议未更新。
notice_conference_updated: 会议已成功更新。
past_conferences: 过去的会议
recent_changes: 近期变动
diff --git a/test/features/editing_conference_test.rb b/test/features/editing_conference_test.rb
index 877729c44..c352067a0 100644
--- a/test/features/editing_conference_test.rb
+++ b/test/features/editing_conference_test.rb
@@ -26,4 +26,17 @@ class EditingConferenceTest < FeatureTest
assert_content page, 'Events'
assert_content page, Event.last.title
end
+
+ it 'edit classifiers', js: true do
+ sign_in_user(@admin)
+ visit "/#{@conference.acronym}/conference/edit_classifiers"
+ assert_content page, 'Here you can create and edit the classifiers'
+ click_on 'Update conference'
+ assert_content page, 'Conference was not updated.'
+ click_on 'Classifiers'
+ click_on 'Add classifier'
+ fill_in 'Name', with: 'classifier1'
+ click_on 'Update conference'
+ assert_content page, 'Conference was successfully updated.'
+ end
end