diff --git a/ChangeLog b/ChangeLog index 4b07d3d9a..605651a26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ New features: * Automatic action to assign tasks to its creator * Add the possibility to create a comment when a task is sent by email * Add dropdown menu to autocomplete email field from project members +* Add configurable list of predefined subjects when sending a task by email Version 1.0.44 (May 28, 2017) ----------------------------- diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index f23077fcb..32d3d02ff 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php index fb4c640dd..0f5a21104 100644 --- a/app/Locale/ca_ES/translations.php +++ b/app/Locale/ca_ES/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 7c7244fbf..75952c954 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index acecf83d6..d9a1541c8 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index 797dd9932..ca25b828c 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php index 3f31b0e6e..560a823ee 100644 --- a/app/Locale/el_GR/translations.php +++ b/app/Locale/el_GR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 8de5059ff..b43b1188d 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 83c5ea66d..07e7f674f 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 37a51c63e..66a399b9d 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -1337,4 +1337,6 @@ return array( 'Assign the task to its creator' => 'Assigner une tâche à son créateur', 'This task was sent by email to "%s" with subject "%s".' => 'Cette tâche a été envoyée par courrier électronique à « %s » avec le sujet « %s ».', 'Log this action in a comment' => 'Enregistrez cette action dans un commentaire', + 'Predefined Email Subjects' => 'Sujets de courrier électronique prédéfinis', + 'Write one subject by line.' => 'Écrivez un sujet par ligne.', ); diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php index 090ec0c5e..f676c31d8 100644 --- a/app/Locale/hr_HR/translations.php +++ b/app/Locale/hr_HR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index f2a01e166..16dd9a949 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index 0d34be86e..f857eec33 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 2c544f758..ec7f00846 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index 5971fb679..f6749ba66 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php index 42b1160a5..6bc810ece 100644 --- a/app/Locale/ko_KR/translations.php +++ b/app/Locale/ko_KR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php index 3374ad3c1..c78bc7379 100644 --- a/app/Locale/my_MY/translations.php +++ b/app/Locale/my_MY/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 618d89cfb..b6042e99e 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index fd7b26e61..6b39c8939 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index a65df0037..7922bf4bd 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index dd0b9e90a..7bbdb8dc8 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index 7f5110ecb..23c7d7f1c 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index fea135913..34357e01f 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index dc4aae94d..83d7c3da6 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index d3e1b5adb..a04dfdcde 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 3b9d426c6..4cb4b5e75 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 0f99c4b56..d09e7bb02 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 21466d0e9..211756817 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -1337,4 +1337,6 @@ return array( // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Log this action in a comment' => '', + // 'Predefined Email Subjects' => '', + // 'Write one subject by line.' => '', ); diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 782338d46..20ef00803 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 123; +const VERSION = 124; + +function version_124(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_123(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index e6096d740..a5b52b2bc 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 102; +const VERSION = 103; + +function version_103(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_102(PDO $pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index ddcff861a..3966d373d 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 114; +const VERSION = 115; + +function version_115(PDO $pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN predefined_email_subjects TEXT'); +} function version_114(PDO $pdo) { diff --git a/app/Template/project_edit/show.php b/app/Template/project_edit/show.php index 62bd9af67..d4d0f8a64 100644 --- a/app/Template/project_edit/show.php +++ b/app/Template/project_edit/show.php @@ -63,5 +63,11 @@ = $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?> +
+ = $this->modal->submitButtons(array('tabindex' => 11)) ?> diff --git a/app/Template/task_mail/create.php b/app/Template/task_mail/create.php index 4df81a6b6..63a515ff2 100644 --- a/app/Template/task_mail/create.php +++ b/app/Template/task_mail/create.php @@ -22,6 +22,22 @@ = $this->form->label(t('Subject'), 'subject') ?> = $this->form->text('subject', $values, $errors, array('required', 'tabindex="2"')) ?> + + + = $this->form->checkbox('add_comment', t('Log this action in a comment'), 1) ?> diff --git a/assets/js/app.min.js b/assets/js/app.min.js index d1e3081b5..7f5f5e2e4 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1,2 +1,2 @@ -!function(){function e(e,a,i){if(!o)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=i&&i.debug||!1;if(r){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);var l=s.style,c=window.getComputedStyle?getComputedStyle(e):e.currentStyle;l.whiteSpace="pre-wrap","INPUT"!==e.nodeName&&(l.wordWrap="break-word"),l.position="absolute",r||(l.visibility="hidden"),t.forEach(function(e){l[e]=c[e]}),n?e.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",s.textContent=e.value.substring(0,a),"INPUT"===e.nodeName&&(s.textContent=s.textContent.replace(/\s/g," "));var u=document.createElement("span");u.textContent=e.value.substring(a)||".",s.appendChild(u);var m={top:u.offsetTop+parseInt(c.borderTopWidth),left:u.offsetLeft+parseInt(c.borderLeftWidth)};return r?u.style.backgroundColor="#aaa":document.body.removeChild(s),m}var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],o="undefined"!=typeof window,n=o&&null!=window.mozInnerScreenX;"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=e:o&&(window.getCaretCoordinates=e)}(),function(){function e(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=o.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e}var t,o={polyfill:e,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(t=1;t<25;t++)o.keys[111+t]="F"+t;var n="";for(t=65;t<91;t++)n=String.fromCharCode(t),o.keys[t]=[n.toLowerCase(),n.toUpperCase()];o.polyfill()}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;--o>=0&&t.item(o)!==this;);return o>-1});var KB={components:{},utils:{},html:{},http:{},listeners:{clicks:{},changes:{},keys:[],internals:{}}};KB.on=function(e,t){this.listeners.internals.hasOwnProperty(e)||(this.listeners.internals[e]=[]),this.listeners.internals[e].push(t)},KB.trigger=function(e,t){if(this.listeners.internals.hasOwnProperty(e))for(var o=0;o