Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions admin/class-decker-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ public function settings_init() {
'alert_color' => __( 'Alert Color', 'decker' ), // Alert color radio buttons.
'alert_message' => __( 'Alert Message', 'decker' ), // Alert message field.
'minimum_user_profile' => __( 'Minimum User Profile', 'decker' ), // User profile dropdown.
'task_editor_type' => __( 'Task Editor Type', 'decker' ),
'shared_key' => __( 'Shared Key', 'decker' ),
'allow_email_notifications' => __( 'Allow Email Notifications', 'decker' ),
'clear_all_data_button' => __( 'Clear All Data', 'decker' ),
Expand Down Expand Up @@ -294,6 +295,29 @@ public function ignored_users_render() {
echo '<p class="description">' . esc_html__( 'Enter comma-separated user IDs to ignore from Decker functionality.', 'decker' ) . '</p>';
}

/**
* Render Task Editor Type Field.
*
* Outputs the HTML for the task_editor_type field.
*/
public function task_editor_type_render() {
$options = get_option( 'decker_settings', array() );
$editor_type = isset( $options['task_editor_type'] ) ? $options['task_editor_type'] : 'classic';
$editors = array(
'classic' => __( 'Classic Editor', 'decker' ),
'quill' => __( 'Quill Editor', 'decker' ),
);

foreach ( $editors as $value => $label ) {
echo '<label style="margin-right: 15px;">';
echo '<input type="radio" name="decker_settings[task_editor_type]" value="' . esc_attr( $value ) . '" ' . checked( $editor_type, $value, false ) . '>';
echo esc_html( $label );
echo '</label>';
}

echo '<p class="description">' . esc_html__( 'Choose which editor to use for task descriptions. Collaborative editing always uses Quill.', 'decker' ) . '</p>';
}

/**
* Render Clear All Data Button.
*
Expand Down Expand Up @@ -377,6 +401,14 @@ public function settings_validate( $input ) {
$input['minimum_user_profile'] = isset( $input['minimum_user_profile'] ) ? $input['minimum_user_profile'] : 'editor';
}

// Validate task editor type.
$valid_editors = array( 'classic', 'quill' );
if ( isset( $input['task_editor_type'] ) && ! in_array( $input['task_editor_type'], $valid_editors, true ) ) {
$input['task_editor_type'] = 'classic';
} else {
$input['task_editor_type'] = isset( $input['task_editor_type'] ) ? $input['task_editor_type'] : 'classic';
}

// Validate alert message.
$input['alert_message'] = isset( $input['alert_message'] ) ? wp_kses_post( $input['alert_message'] ) : '';

Expand Down
Binary file modified languages/decker-es_ES.mo
Binary file not shown.
63 changes: 63 additions & 0 deletions languages/decker-es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -1409,3 +1409,66 @@ msgstr "No se pudo copiar la URL. Por favor, cópiala manualmente:"

msgid "There are no tasks from previous days to import."
msgstr "No hay tareas de días anteriores para importar."

msgid "The task has been saved successfully."
msgstr "La tarea se ha guardado correctamente."

msgid "Are you sure you want to clone this task?"
msgstr "¿Seguro que quieres clonar esta tarea?"

msgid "A copy of this task will be created."
msgstr "Se creará una copia de esta tarea."

msgid "Clone"
msgstr "Clonar"

msgid "The task has been successfully cloned."
msgstr "La tarea se ha clonado correctamente."

msgid "An error occurred while cloning the task."
msgstr "Se ha producido un error al clonar la tarea."

msgid "Search tasks..."
msgstr "Buscar tareas..."

msgid "Type to search tasks by title"
msgstr "Escribe para buscar tareas por título"

msgid "to navigate"
msgstr "para navegar"

msgid "to select"
msgstr "para seleccionar"

msgid "to close"
msgstr "para cerrar"

msgid "No tasks found"
msgstr "No se encontraron tareas"

msgid "Error searching tasks"
msgstr "Error al buscar tareas"

msgid "Connecting..."
msgstr "Conectando..."

msgid "Collaborative mode"
msgstr "Modo colaborativo"

msgid "Disconnected"
msgstr "Desconectado"

msgid "you"
msgstr "tú"

msgid "Task Editor Type"
msgstr "Tipo de editor de tareas"

msgid "Classic Editor"
msgstr "Editor clásico"

msgid "Quill Editor"
msgstr "Editor Quill"

msgid "Choose which editor to use for task descriptions. Collaborative editing always uses Quill."
msgstr "Elige qué editor usar para las descripciones de las tareas. La edición colaborativa siempre usa Quill."
Loading