Skip to content

Commit

Permalink
Capitalisation on weekName was annoying me
Browse files Browse the repository at this point in the history
  • Loading branch information
DC23 committed Dec 15, 2024
1 parent 358010d commit 8e91f44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/weekdaysettings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class WeekdaySettings extends FormApplication {
}

// the name of the week itself
data.weekname = {
id: 'weekname',
data.weekName = {
id: 'weekName',
label: game.i18n.localize('JDTIMEKEEPING.Settings.WeekName.label'),
value: weekName,
}
Expand All @@ -120,8 +120,8 @@ class WeekdaySettings extends FormApplication {
game.settings.set(MODULE_ID, SETTINGS.DAYS_PER_WEEK, data.daysPerWeek)
delete(data.daysPerWeek)

game.settings.set(MODULE_ID, SETTINGS.WEEK_NAME, data.weekname)
delete(data.weekname)
game.settings.set(MODULE_ID, SETTINGS.WEEK_NAME, data.weekName)
delete(data.weekName)

const current = game.settings.get(MODULE_ID, SETTINGS.WEEKDAY_SETTINGS)
if (!Helpers.objectsShallowEqual(data, current)) {
Expand Down Expand Up @@ -163,7 +163,7 @@ class WeekdaySettings extends FormApplication {
})

$(event.delegateTarget).find('[name=daysPerWeek]')[0].value = DEFAULT_DAYS_PER_WEEK
$(event.delegateTarget).find('[name=weekname]')[0].value =
$(event.delegateTarget).find('[name=weekName]')[0].value =
game.i18n.localize('JDTIMEKEEPING.WeekName')

this.#updateDayElements(event.delegateTarget, DEFAULT_DAYS_PER_WEEK)
Expand Down
2 changes: 1 addition & 1 deletion templates/weekdaysettings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
value="{{daysPerWeek.value}}" />
</div>

{{> dayPartial weekname}}
{{> dayPartial weekName}}

<fieldset>
<legend>{{localize "JDTIMEKEEPING.Settings.RenameWeekdays"}}:</legend>
Expand Down

0 comments on commit 8e91f44

Please sign in to comment.