Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
tweak(Tasks): warning tooltipp if due is in the past, saving is still…
Browse files Browse the repository at this point in the history
… possible
  • Loading branch information
sstamer committed May 9, 2022
1 parent 5df2656 commit 3afc23e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tine20/Tasks/js/TaskEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ Ext.namespace('Tine.Tasks');
}], [new Ext.ux.form.DateTimeField({
defaultTime: '12:00',
fieldLabel: this.app.i18n._('Due date'),
name: 'due'
name: 'due',
listeners: {scope: this, change: this.validateDue},
}),
new Tine.Tinebase.widgets.keyfield.ComboBox({
fieldLabel: this.app.i18n._('Priority'),
Expand Down Expand Up @@ -261,7 +262,16 @@ Ext.namespace('Tine.Tasks');
}), this.alarmPanel
]
};
}
},

validateDue: function() {
var dueField = this.getForm().findField('due'),
due = dueField.getValue();

if (Ext.isDate(due) && due.getTime() - Date.now() <= 0) {
dueField.markInvalid(this.app.i18n._('Attention: This due date is in the past!'));
}
}
});

/**
Expand Down
9 changes: 9 additions & 0 deletions tine20/Tasks/translations/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ msgstr ""
msgid "Add New Task"
msgstr "Neue Aufgabe hinzufügen"

msgid "Create New Task"
msgstr "Als neue Aufgabe hinzufügen"

#: js/TaskEditDialog.js:140
msgid "You have to supply a due date, because an alarm ist set!"
msgstr "Sie müssen ein Fälligkeitsdatum angeben, da ein Alarm gesetzt wurde!"
Expand Down Expand Up @@ -323,3 +326,9 @@ msgstr "Gemeinsame Aufgaben-Favoriten verwalten"
#: Acl/Rights.php:102
msgid "Create or update shared tasks favorites"
msgstr "Gemeinsame Aufgaben-Favoriten erstellen oder bearbeiten"

msgid "Creating new Task..."
msgstr "Erstelle neue Aufgabe..."

msgid "Attention: This due date is in the past!"
msgstr "Achtung: Das Fälligkeitsdatum liegt in der Vergangenheit!"

0 comments on commit 3afc23e

Please sign in to comment.