diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-04-08 19:44:21 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-04-08 19:44:21 -0400 |
commit | f9ec3c66ff1305ca0647454d27793ac5365f7f4a (patch) | |
tree | 6978bc6679654a428b6192eeae856c0f9e2d0223 /include | |
parent | 4760dc9bcb7e43be9c27cf83ba5273344384813d (diff) | |
download | volse-hubzilla-f9ec3c66ff1305ca0647454d27793ac5365f7f4a.tar.gz volse-hubzilla-f9ec3c66ff1305ca0647454d27793ac5365f7f4a.tar.bz2 volse-hubzilla-f9ec3c66ff1305ca0647454d27793ac5365f7f4a.zip |
Added feature setting for auto-save, defaulting to enabled.
Diffstat (limited to 'include')
-rw-r--r-- | include/conversation.php | 5 | ||||
-rw-r--r-- | include/features.php | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php index ce0467770..3834d9866 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1301,7 +1301,9 @@ function status_editor($a, $x, $popup = false) { $id_select = ''; $webpage = ((x($x,'webpage')) ? $x['webpage'] : ''); - + + $feature_auto_save_draft = ((feature_enabled($x['profile_uid'], 'auto_save_draft')) ? "true" : "false"); + $tpl = get_markup_template('jot-header.tpl'); App::$page['htmlhead'] .= replace_macros($tpl, array( @@ -1323,6 +1325,7 @@ function status_editor($a, $x, $popup = false) { '$modalerroralbum' => t('Error getting album'), '$nocomment_enabled' => t('Comments enabled'), '$nocomment_disabled' => t('Comments disabled'), + '$auto_save_draft' => $feature_auto_save_draft, )); $tpl = get_markup_template('jot.tpl'); diff --git a/include/features.php b/include/features.php index 4859a01db..36f4f0433 100644 --- a/include/features.php +++ b/include/features.php @@ -350,6 +350,15 @@ function get_features($filtered = true) { feature_level('suppress_duplicates',1), ], + [ + 'auto_save_draft', + t('Auto-save drafts of posts and comments'), + t('Automatically saves post and comment drafts in local browser storage to help prevent accidental loss of compositions'), + true, + get_config('feature_lock','auto_save_draft'), + feature_level('auto_save_draft',1), + ], + ], // Network Tools |