From 1c0e07a15699e4aaa35a0b3f9e67b01b610606e1 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Tue, 1 Feb 2022 16:35:07 +0300 Subject: [PATCH] * add Markdown checkbox to settings --- src/content/lang/en.json | 2 ++ src/content/lang/ru.json | 4 +++- src/includes/class.config.php | 2 +- src/settings.php | 8 ++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/content/lang/en.json b/src/content/lang/en.json index ea8fa73..876b704 100644 --- a/src/content/lang/en.json +++ b/src/content/lang/en.json @@ -144,6 +144,8 @@ "set_timezone": "Time zone", "set_autotag": "Autotagging", "set_autotag_descr": "(automatically adds tag of current tag filter to newly created task)", + "set_markdown": "Markdown", + "set_markdown_descr": "(adds support of Markdown in notes, disable if you want to use old markup)", "set_firstdayofweek": "First day of week", "set_custom": "Custom", "set_date": "Date format", diff --git a/src/content/lang/ru.json b/src/content/lang/ru.json index 9804eed..7370269 100644 --- a/src/content/lang/ru.json +++ b/src/content/lang/ru.json @@ -142,8 +142,10 @@ "set_smartsyntax": "Smart syntax", "set_smartsyntax2_descr": "Пример синтаксиса: +1 Задача #Тэг1 #Тэг2", "set_timezone": "Часовой пояс", - "set_autotag": "Autotagging", + "set_autotag": "Автотеги", "set_autotag_descr": "(автодобавление текущего тега из фильтра в новую задачу)", + "set_markdown": "Markdown", + "set_markdown_descr": "(возможность использовать Markdown в заметках, выключите если хотите использовать старую разметку)", "set_firstdayofweek": "Первый день недели", "set_custom": "другой", "set_date": "Формат даты", diff --git a/src/includes/class.config.php b/src/includes/class.config.php index 9fd6b14..84c2dfa 100644 --- a/src/includes/class.config.php +++ b/src/includes/class.config.php @@ -70,7 +70,7 @@ class Config 'duedateformat' => array('default'=>1, 'type'=>'i'), # First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday - 'firstdayofweek' => array('default'=>1, 'type'=>'i'), + 'firstdayofweek' => array('default'=>1, 'type'=>'i', 'options'=>array(0,1,2,3,4,5,6)), # Date/time formats 'clock' => array('default'=>24, 'type'=>'i', 'options'=>array(12,24)), diff --git a/src/settings.php b/src/settings.php index 008f05b..1e94753 100644 --- a/src/settings.php +++ b/src/settings.php @@ -41,6 +41,7 @@ if(isset($_POST['save'])) catch (Exception $e) { } Config::set('autotag', (int)_post('autotag')); + Config::set('markup', (int)_post('markdown') == 0 ? 'v1' : 'markdown'); Config::set('firstdayofweek', (int)_post('firstdayofweek')); Config::set('clock', (int)_post('clock')); Config::set('dateformat', removeNewLines(_post('dateformat')) ); @@ -175,6 +176,13 @@ header('Content-type:text/html; charset=utf-8'); +
+
:
+
+
+ +
+
: