Plugin Directory

Changeset 2830701


Ignore:
Timestamp:
12/08/2022 03:59:41 PM (3 years ago)
Author:
wxkz
Message:

Added department email, max subject and thread length

Location:
wdesk/trunk
Files:
3 added
14 edited

Legend:

Unmodified
Added
Removed
  • wdesk/trunk/README.md

    r2825348 r2830701  
    7777    - [X] Last update
    7878    - [X] Tags
    79     - [ ] Department email
    80     - [ ] Due date
    81     - [ ] Time worked
     79    - [X] Department email
    8280    - [ ] Rich text
    83     - [ ] Due date notify
    84 - [ ] Add more customization and tools
     81- [X] Add more customization and tools
    8582    - [X] Date format
    86     - [ ] Ban emails
    87     - [ ] Ban email providers
    88     - [ ] Reports
    89     - [ ] Darkmode
    90     - [ ] Max text, subject, file
    91     - [ ] Fields in ticket creation
    92     - [ ] Cron status
    93     - [ ] Autoclose
    94     - [ ] Color scheme
     83    - [X] Ban emails
     84    - [X] Ban email providers
     85    - [X] Reports
     86    - [X] Max subject, thread
     87    - [X] Autoclose
  • wdesk/trunk/admin/departments/html.php

    r2825348 r2830701  
    2020                                <input type="hidden" name="id" value="<?php echo esc_textarea($department->id) ?>"/>
    2121                                <tr><th><?php _e('Name', 'wdesk') ?>: <br><input type="text" name="name" placeholder="<?php _e('Department name', 'wdesk') ?>" value="<?php echo esc_textarea($department->name) ?>" style="padding: 0 8px; margin: 0;"/></th></tr>
     22                                <tr><th><?php _e('Email', 'wdesk') ?>: <br><input type="email" name="email" placeholder="<?php _e('Department email', 'wdesk') ?>" value="<?php echo esc_textarea($department->email) ?>" style="padding: 0 8px; margin: 0;"/></th></tr>
    2223                                <tr>
    2324                                    <th>
     
    7273                    <form method="post">
    7374                        <tr><th><?php _e('Name', 'wdesk') ?>: <br><input type="text" name="name" placeholder="<?php _e('Department name', 'wdesk') ?>" style="padding: 0 8px; margin: 0;"/></th></tr>
     75                        <tr><th><?php _e('Email', 'wdesk') ?>: <br><input type="email" name="email" placeholder="<?php _e('Department email', 'wdesk') ?>" style="padding: 0 8px; margin: 0;"/></th></tr>
    7476                        <tr>
    7577                            <th>
  • wdesk/trunk/admin/settings/html.php

    r2825348 r2830701  
    5555                        <tr>
    5656                            <th>
     57                                <?php _e('Max subject', 'wdesk') ?>: <br>
     58                                <input type="number" name="subject" placeholder="<?php _e('Ex: 180', 'wdesk') ?>" value="<?php echo esc_html($settings[4]->value) ?>" style="padding: 0 8px; margin: 0;"/>
     59                            </th>
     60                        </tr>
     61                        <tr>
     62                            <th>
     63                                <?php _e('Max thread', 'wdesk') ?>: <br>
     64                                <input type="number" name="thread" placeholder="<?php _e('Ex: 2800', 'wdesk') ?>" value="<?php echo esc_html($settings[5]->value) ?>" style="padding: 0 8px; margin: 0;"/>
     65                            </th>
     66                        </tr>
     67                        <tr>
     68                            <th>
    5769                                <input type="submit" class="button action" name="wdesk-setting-update" value="<?php _e('Update', 'wdesk') ?>"/>                         
     70                            </th>
     71                        </tr>
     72                    </form>
     73                </tbody>
     74            </table>
     75            &nbsp;
     76            <table class="wp-list-table widefat fixed striped table-view-list" style="width: 400px; height: -webkit-fill-available;">
     77                <thead>
     78                    <tr>
     79                        <th><?php _e('Email blocklist', 'wdesk') ?></th>
     80                    </tr>
     81                </thead>
     82                <tbody>
     83                    <form method="post">
     84                        <?php
     85                        $blocked_emails = $wpdb->get_results("SELECT * FROM `wdesk_settings_emails`");
     86                        foreach ($blocked_emails as $blocked_email) {
     87                            ?>
     88                            <tr>
     89                                <th>
     90                                    <div style="display: flex; flex-direction: row; justify-content: space-between;">
     91                                        <input type="hidden" name="id" value="<?php echo esc_textarea($blocked_email->id) ?>" />
     92                                        <label><?php echo esc_textarea($blocked_email->email) ?></label>
     93                                        <input type="submit" class="button action" name="wdesk-setting-email-delete" value="<?php _e('Delete', 'wdesk') ?>"/>                           
     94                                    </div>
     95                                </th>
     96                            </tr>
     97                        <?php
     98                        }
     99                        ?>
     100                        <tr>
     101                            <th>
     102                                <?php _e('Email', 'wdesk') ?>: <br>
     103                                <input type="text" name="email" placeholder="<?php _e('Full email', 'wdesk') ?>" style="padding: 0 8px; margin: 0;"/>
     104                            </th>
     105                        </tr>
     106                        <tr>
     107                            <th>
     108                                <input type="submit" class="button action" name="wdesk-setting-email-add" value="<?php _e('Add', 'wdesk') ?>"/>                         
     109                            </th>
     110                        </tr>
     111                    </form>
     112                </tbody>
     113            </table>
     114            &nbsp;
     115            <table class="wp-list-table widefat fixed striped table-view-list" style="width: 400px; height: -webkit-fill-available;">
     116                <thead>
     117                    <tr>
     118                        <th><?php _e('Email provider blocklist', 'wdesk') ?></th>
     119                    </tr>
     120                </thead>
     121                <tbody>
     122                    <form method="post">
     123                        <?php
     124                        $blocked_providers = $wpdb->get_results("SELECT * FROM `wdesk_settings_email_providers`");
     125                        foreach ($blocked_providers as $blocked_provider) {
     126                            ?>
     127                            <tr>
     128                                <th>
     129                                    <div style="display: flex; flex-direction: row; justify-content: space-between;">
     130                                        <input type="hidden" name="id" value="<?php echo esc_textarea($blocked_provider->id) ?>" />
     131                                        <label><?php echo esc_textarea($blocked_provider->provider) ?></label>
     132                                        <input type="submit" class="button action" name="wdesk-setting-email-provider-delete" value="<?php _e('Delete', 'wdesk') ?>"/>                         
     133                                    </div>
     134                                </th>
     135                            </tr>
     136                        <?php
     137                        }
     138                        ?>
     139                        <tr>
     140                            <th>
     141                                <?php _e('Provider', 'wdesk') ?>: <br>
     142                                <input type="text" name="provider" placeholder="<?php _e('Provider without @', 'wdesk') ?>" style="padding: 0 8px; margin: 0;"/>
     143                            </th>
     144                        </tr>
     145                        <tr>
     146                            <th>
     147                                <input type="submit" class="button action" name="wdesk-setting-email-provider-add" value="<?php _e('Add', 'wdesk') ?>"/>                           
    58148                            </th>
    59149                        </tr>
  • wdesk/trunk/index.php

    r2823274 r2830701  
    44Plugin Name:    wdesk
    55Description:    Plugin developed to track inquiries in a Helpdesk platform inside Wordpress
    6 Version:        0.4
     6Version:        0.5
    77Author:         Marcelo Rodrigues Campos
    88Author URI:     https://github.com/wwwxkz
     
    2222require_once(WDESK_LOCAL . 'admin/tags/tags.php');
    2323require_once(WDESK_LOCAL . 'admin/tickets/tickets.php');
     24require_once(WDESK_LOCAL . 'admin/reports/reports.php');
    2425require_once(WDESK_LOCAL . 'admin/settings/settings.php');
    2526require_once(WDESK_LOCAL . 'admin/departments/departments.php');
     27
    2628
    2729add_action( 'plugins_loaded', 'wdesk_init' );
     
    4143        add_submenu_page( 'helpdesk', __('Departments', 'wdesk'), __('Departments', 'wdesk'), 'read', 'wdesk_departments', 'wdesk_departments' );
    4244        add_submenu_page( 'helpdesk', __('Tags', 'wdesk'), __('Tags', 'wdesk'), 'read', 'wdesk_tags', 'wdesk_tags' );
     45        add_submenu_page( 'helpdesk', __('Reports', 'wdesk'), __('Reports', 'wdesk'), 'read', 'wdesk_reports', 'wdesk_reports' );
    4346        add_submenu_page( 'helpdesk', __('Settings', 'wdesk'), __('Settings', 'wdesk'), 'read', 'wdesk_settings', 'wdesk_settings' );
    4447    }
     
    7477        id mediumint(9) NOT NULL AUTO_INCREMENT,
    7578        name tinytext NOT NULL,
     79        email tinytext NOT NULL,
    7680        UNIQUE KEY id (id)
    7781    ) $charset_collate2;";
     
    141145        setting tinytext NOT NULL,
    142146        value tinytext NOT NULL,
    143         date_format tinytext NOT NULL,
    144147        UNIQUE KEY id (id)
    145148    ) $charset_collate7;";
     
    167170        'value' => 'd-m-Y H:i:s'
    168171    ));
     172    $wpdb->replace($table7, array(
     173        'id' => 4,
     174        'setting' => 'Max subject',
     175        'value' => '180'
     176    ));
     177    $wpdb->replace($table7, array(
     178        'id' => 5,
     179        'setting' => 'Max thread',
     180        'value' => '2800'
     181    ));
     182       
     183    // Settings emails
     184    $table8 = "wdesk_settings_emails";
     185    $charset_collate8 = $wpdb->get_charset_collate();
     186    $sql8 = "CREATE TABLE $table8 (
     187        id mediumint(9) NOT NULL AUTO_INCREMENT,
     188        email tinytext NOT NULL,
     189        UNIQUE KEY id (id)
     190    ) $charset_collate8;";
     191    dbDelta($sql8);
     192   
     193    // Settings email providers
     194    $table9 = "wdesk_settings_email_providers";
     195    $charset_collate9 = $wpdb->get_charset_collate();
     196    $sql9 = "CREATE TABLE $table9 (
     197        id mediumint(9) NOT NULL AUTO_INCREMENT,
     198        provider tinytext NOT NULL,
     199        UNIQUE KEY id (id)
     200    ) $charset_collate9;";
     201    dbDelta($sql9);
     202
    169203}
    170204
     
    202236    // Delete all users OTP every 5 minutes
    203237    $wpdb->query("UPDATE `wdesk_users` SET `otp` = NULL WHERE `otp` IS NOT NULL; ");
     238    // Close inactive tickets
     239    $wpdb->query("UPDATE `wdesk_tickets` SET `status`='Closed' WHERE last_update < (NOW() - INTERVAL 1 MONTH); ");
    204240}
    205241
  • wdesk/trunk/languages/wdesk-pt_BR.po

    r2823274 r2830701  
    55"Project-Id-Version: wdesk 2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wdesk\n"
    7 "POT-Creation-Date: 2022-11-23T13:13:24-03:00\n"
    8 "PO-Revision-Date: 2022-11-23 13:13-0300\n"
     7"POT-Creation-Date: 2022-12-08T12:51:40-03:00\n"
     8"PO-Revision-Date: 2022-12-08 12:54-0300\n"
    99"Last-Translator: \n"
    1010"Language-Team: \n"
     
    1414"Content-Transfer-Encoding: 8bit\n"
    1515"Plural-Forms: nplurals=2; plural=(n > 1);\n"
    16 "X-Generator: Poedit 3.2\n"
     16"X-Generator: Poedit 3.2.2\n"
    1717"X-Domain: wdesk\n"
    1818
     
    3636msgstr "https://github.com/wwwxkz"
    3737
    38 #: admin/departments/html.php:6 index.php:40
     38#: admin/departments/html.php:6 index.php:43
    3939msgid "Departments"
    4040msgstr "Departamentos"
    4141
    42 #: admin/departments/html.php:15 admin/tickets/html.php:129
    43 #: admin/tickets/html.php:208 shortcode/components/guest.php:16
    44 #: shortcode/components/new-ticket.php:19 shortcode/components/tickets.php:32
     42#: admin/departments/html.php:15 admin/tickets/html.php:136
     43#: admin/tickets/html.php:219 shortcode/components/guest.php:20
     44#: shortcode/components/new-ticket.php:24 shortcode/components/tickets.php:34
    4545msgid "Department"
    4646msgstr "Departamento"
    4747
    48 #: admin/departments/html.php:21 admin/departments/html.php:73
     48#: admin/departments/html.php:21 admin/departments/html.php:74
    4949#: admin/tags/html.php:21 admin/tags/html.php:44
    50 #: shortcode/components/guest.php:12 shortcode/components/profile.php:20
     50#: shortcode/components/guest.php:16 shortcode/components/profile.php:20
    5151#: shortcode/components/sign-in.php:12
    5252msgid "Name"
    5353msgstr "Nome"
    5454
    55 #: admin/departments/html.php:21 admin/departments/html.php:73
     55#: admin/departments/html.php:21 admin/departments/html.php:74
    5656msgid "Department name"
    5757msgstr "Nome do departamento"
    5858
    59 #: admin/departments/html.php:54 admin/settings/html.php:38
    60 #: admin/tags/html.php:25 admin/tickets/html.php:161
     59#: admin/departments/html.php:22 admin/departments/html.php:75
     60#: admin/settings/html.php:102 shortcode/components/guest.php:13
     61#: shortcode/components/log-in.php:9 shortcode/components/profile.php:17
     62#: shortcode/components/sign-in.php:9
     63msgid "Email"
     64msgstr "Email"
     65
     66#: admin/departments/html.php:22 admin/departments/html.php:75
     67msgid "Department email"
     68msgstr "Nome do departamento"
     69
     70#: admin/departments/html.php:55 admin/settings/html.php:69
     71#: admin/tags/html.php:25 admin/tickets/html.php:168
    6172msgid "Update"
    6273msgstr "Atualizar"
    6374
    64 #: admin/departments/html.php:55 admin/tags/html.php:26
    65 #: admin/tickets/html.php:44 admin/tickets/html.php:288
     75#: admin/departments/html.php:56 admin/settings/html.php:93
     76#: admin/settings/html.php:132 admin/tags/html.php:26 admin/tickets/html.php:51
     77#: admin/tickets/html.php:304
    6678msgid "Delete"
    6779msgstr "Deletar"
    6880
    69 #: admin/departments/html.php:68
     81#: admin/departments/html.php:69
    7082msgid "New department"
    7183msgstr "Novo departamento"
    7284
    73 #: admin/departments/html.php:76 admin/tags/html.php:48
     85#: admin/departments/html.php:78 admin/tags/html.php:48
    7486msgid "Create"
    7587msgstr "Criar"
    7688
    77 #: admin/settings/html.php:8 index.php:42
     89#: admin/reports/html.php:6 index.php:45
     90msgid "Reports"
     91msgstr "Reportes"
     92
     93#: admin/reports/html.php:53
     94msgid "Number of tickets"
     95msgstr "Numero de tickets"
     96
     97#: admin/settings/html.php:8 index.php:46
    7898msgid "Settings"
    7999msgstr "Configurações"
     
    107127msgstr "Url do helpdesk"
    108128
    109 #: admin/tags/html.php:6 admin/tickets/html.php:98 index.php:41
     129#: admin/settings/html.php:38
     130msgid "Date"
     131msgstr "Data"
     132
     133#: admin/settings/html.php:57
     134msgid "Max subject"
     135msgstr "Tamanho máximo para o assunto"
     136
     137#: admin/settings/html.php:58
     138msgid "Ex: 180"
     139msgstr "Ex: 180"
     140
     141#: admin/settings/html.php:63
     142msgid "Max thread"
     143msgstr "Tamanho máximo para a thread"
     144
     145#: admin/settings/html.php:64
     146msgid "Ex: 2800"
     147msgstr "Ex: 2800"
     148
     149#: admin/settings/html.php:79
     150msgid "Email blocklist"
     151msgstr "Lista de bloqueio de emails"
     152
     153#: admin/settings/html.php:103
     154msgid "Full email"
     155msgstr "Email completo"
     156
     157#: admin/settings/html.php:108 admin/settings/html.php:147
     158#: admin/tickets/html.php:113
     159msgid "Add"
     160msgstr "Adicionar"
     161
     162#: admin/settings/html.php:118
     163msgid "Email provider blocklist"
     164msgstr "Lista de bloqueio de provedores"
     165
     166#: admin/settings/html.php:141
     167msgid "Provider"
     168msgstr "Provedor"
     169
     170#: admin/settings/html.php:142
     171msgid "Provider without @"
     172msgstr "Provedor sem @"
     173
     174#: admin/tags/html.php:6 admin/tickets/html.php:105 index.php:44
    110175msgid "Tags"
    111176msgstr "Tags"
    112177
    113 #: admin/tags/html.php:15 admin/tickets/html.php:210
     178#: admin/tags/html.php:15 admin/tickets/html.php:221
    114179msgid "Tag"
    115180msgstr "Tag"
     
    131196msgstr "Nova tag"
    132197
    133 #: admin/tickets/html.php:18 admin/tickets/html.php:156
    134 #: admin/tickets/html.php:192 admin/tickets/html.php:211
    135 #: shortcode/components/ticket.php:35
     198#: admin/tickets/html.php:22 admin/tickets/html.php:163
     199#: admin/tickets/html.php:203 admin/tickets/html.php:222
     200#: shortcode/components/guest-ticket.php:39 shortcode/components/ticket.php:39
    136201msgid "User"
    137202msgstr "Usuário"
    138203
    139 #: admin/tickets/html.php:19 script/helpers.php:81
    140 #: shortcode/components/ticket.php:36
     204#: admin/tickets/html.php:23 script/helpers.php:98
     205#: shortcode/components/guest-ticket.php:40 shortcode/components/ticket.php:40
    141206msgid "File"
    142207msgstr "Arquivo"
    143208
    144 #: admin/tickets/html.php:20 script/helpers.php:80
     209#: admin/tickets/html.php:24 script/helpers.php:97
    145210msgid "Note"
    146211msgstr "Observação"
    147212
    148 #: admin/tickets/html.php:21 admin/tickets/html.php:213
    149 #: shortcode/components/tickets.php:34
     213#: admin/tickets/html.php:25 admin/tickets/html.php:224
     214#: shortcode/components/tickets.php:36
    150215msgid "Actions"
    151216msgstr "Ações"
    152217
    153 #: admin/tickets/html.php:36 admin/tickets/html.php:163
    154 #: shortcode/components/ticket.php:50
     218#: admin/tickets/html.php:42 admin/tickets/html.php:170
     219#: shortcode/components/guest-ticket.php:54 shortcode/components/ticket.php:54
    155220msgid "Download"
    156221msgstr "Download"
    157222
    158 #: admin/tickets/html.php:58
     223#: admin/tickets/html.php:65
    159224msgid "Answer ticket"
    160225msgstr "Responder chamado"
    161226
    162 #: admin/tickets/html.php:64
     227#: admin/tickets/html.php:71
    163228msgid "Please, describe your problem"
    164229msgstr "Por favor, descreva seu problema"
    165230
    166 #: admin/tickets/html.php:68 admin/tickets/html.php:70
    167 #: shortcode/components/guest.php:33 shortcode/components/new-ticket.php:36
    168 #: shortcode/components/ticket.php:71
     231#: admin/tickets/html.php:75 admin/tickets/html.php:77
     232#: shortcode/components/guest-ticket.php:75 shortcode/components/guest.php:37
     233#: shortcode/components/new-ticket.php:41 shortcode/components/ticket.php:75
    169234msgid "Send"
    170235msgstr "Enviar"
    171236
    172 #: admin/tickets/html.php:68
     237#: admin/tickets/html.php:75
    173238msgid "note"
    174239msgstr "observação"
    175240
    176 #: admin/tickets/html.php:77
     241#: admin/tickets/html.php:84
    177242msgid "Details"
    178243msgstr "Detalhes"
    179244
    180 #: admin/tickets/html.php:101 admin/tickets/html.php:114
    181 #: admin/tickets/html.php:132 admin/tickets/html.php:147
     245#: admin/tickets/html.php:108 admin/tickets/html.php:121
     246#: admin/tickets/html.php:139 admin/tickets/html.php:154
    182247msgid "Select"
    183248msgstr "Selecionar"
    184249
    185 #: admin/tickets/html.php:106
    186 msgid "Add"
    187 msgstr "Adicionar"
    188 
    189 #: admin/tickets/html.php:111 admin/tickets/html.php:205
    190 #: shortcode/components/tickets.php:28
     250#: admin/tickets/html.php:118 admin/tickets/html.php:216
     251#: shortcode/components/tickets.php:30
    191252msgid "Status"
    192253msgstr "Status"
    193254
    194 #: admin/tickets/html.php:115 admin/tickets/html.php:252
    195 #: shortcode/components/tickets.php:49
     255#: admin/tickets/html.php:122 admin/tickets/html.php:268
     256#: shortcode/components/tickets.php:51
    196257msgid "Open"
    197258msgstr "Em aberto"
    198259
    199 #: admin/tickets/html.php:116 admin/tickets/html.php:254
    200 #: shortcode/components/tickets.php:51
     260#: admin/tickets/html.php:123 admin/tickets/html.php:270
     261#: shortcode/components/tickets.php:53
    201262msgid "Waiting user"
    202263msgstr "Esperando usuário"
    203264
    204 #: admin/tickets/html.php:117 admin/tickets/html.php:256
    205 #: shortcode/components/tickets.php:53
     265#: admin/tickets/html.php:124 admin/tickets/html.php:272
     266#: shortcode/components/tickets.php:55
    206267msgid "Waiting agent"
    207268msgstr "Esperando agente"
    208269
    209 #: admin/tickets/html.php:118 admin/tickets/html.php:258
    210 #: shortcode/components/tickets.php:55
     270#: admin/tickets/html.php:125 admin/tickets/html.php:274
     271#: shortcode/components/tickets.php:57
    211272msgid "Closed"
    212273msgstr "Encerrado"
    213274
    214 #: admin/tickets/html.php:144 admin/tickets/html.php:212
    215 #: shortcode/components/tickets.php:33
     275#: admin/tickets/html.php:151 admin/tickets/html.php:223
     276#: shortcode/components/tickets.php:35
    216277msgid "Agent"
    217278msgstr "Agente"
    218279
    219 #: admin/tickets/html.php:157 admin/tickets/html.php:206 script/helpers.php:78
    220 #: shortcode/components/tickets.php:29
     280#: admin/tickets/html.php:164 admin/tickets/html.php:217 script/helpers.php:95
     281#: shortcode/components/tickets.php:31
    221282msgid "Created"
    222283msgstr "Criado"
    223284
    224 #: admin/tickets/html.php:158 admin/tickets/html.php:207
    225 #: shortcode/components/tickets.php:30
     285#: admin/tickets/html.php:165 admin/tickets/html.php:218
     286#: shortcode/components/tickets.php:32
    226287msgid "Last update"
    227288msgstr "Ultima atualização"
    228289
    229 #: admin/tickets/html.php:162
     290#: admin/tickets/html.php:169
    230291msgid "Notify"
    231292msgstr "Notificar"
    232293
    233 #: admin/tickets/html.php:185 index.php:38
    234 #: shortcode/components/new-ticket.php:13 shortcode/components/profile.php:12
    235 #: shortcode/components/ticket.php:21 shortcode/components/tickets.php:10
     294#: admin/tickets/html.php:195 index.php:41
     295#: shortcode/components/guest-ticket.php:25
     296#: shortcode/components/new-ticket.php:18 shortcode/components/profile.php:12
     297#: shortcode/components/ticket.php:25 shortcode/components/tickets.php:12
    236298msgid "Tickets"
    237299msgstr "Chamados"
    238300
    239 #: admin/tickets/html.php:187
     301#: admin/tickets/html.php:198
    240302msgid "Reset"
    241303msgstr "Resetar"
    242304
    243 #: admin/tickets/html.php:192 admin/tickets/html.php:209
    244 #: shortcode/components/guest.php:25 shortcode/components/new-ticket.php:28
    245 #: shortcode/components/tickets.php:31
     305#: admin/tickets/html.php:203 admin/tickets/html.php:220
     306#: shortcode/components/guest.php:29 shortcode/components/new-ticket.php:33
     307#: shortcode/components/tickets.php:33
    246308msgid "Subject"
    247309msgstr "Assunto"
    248310
    249 #: admin/tickets/html.php:193
     311#: admin/tickets/html.php:204
    250312msgid "Search"
    251313msgstr "Pesquisar"
    252314
    253 #: script/functions.php:16
     315#: script/functions.php:20
     316msgid "Your personal email or provider is in our blocklist"
     317msgstr "Seu email pessoal ou provedor está em nossa blocklist"
     318
     319#: script/functions.php:26
    254320msgid "Email already in use"
    255321msgstr "Email já em uso"
    256322
    257 #: script/functions.php:33
     323#: script/functions.php:44
    258324msgid "User updated"
    259325msgstr "Usuário atualizado"
    260326
    261 #: script/functions.php:45 script/functions.php:49
     327#: script/functions.php:57 script/functions.php:61
    262328msgid "Registered successfully"
    263329msgstr "Registrado com sucesso"
    264330
    265 #: script/functions.php:50
     331#: script/functions.php:62
    266332msgid "Acess the helpdesk with your email and password"
    267333msgstr "Acesse o helpdesk com seu email e senha"
    268334
    269 #: script/functions.php:54
     335#: script/functions.php:66
    270336msgid "User does not exist"
    271337msgstr "Usuário não existe"
    272338
    273 #: script/functions.php:69
     339#: script/functions.php:80
    274340msgid "Password incorrect or user does not exist"
    275341msgstr "Senha incorreta ou usuário não existe"
    276342
    277 #: script/functions.php:138
     343#: script/functions.php:127
     344msgid "Your personal email or provider is in the blocklist"
     345msgstr "Seu email pessoal ou provedor está em nossa blocklist"
     346
     347#: script/functions.php:133
    278348msgid ""
    279349"Your already have a ticket open, wait until you ticket is solved or close it "
     
    283353"ou o encerre para criar outro"
    284354
    285 #: script/helpers.php:15
     355#: script/helpers.php:19
    286356msgid "Ticket update"
    287357msgstr "Atualização no chamado"
    288358
    289 #: script/helpers.php:19
     359#: script/helpers.php:23
    290360msgid "Access the helpdesk by using your email and password or using the url"
    291361msgstr ""
    292362"Acesse o helpdesk usando seu email e senha ou utilizando a url a seguir"
    293363
    294 #: script/helpers.php:28 script/helpers.php:31 script/helpers.php:72
    295 #: script/helpers.php:77 shortcode/components/guest.php:7
    296 #: shortcode/components/ticket.php:17
     364#: script/helpers.php:32 script/helpers.php:35 script/helpers.php:89
     365#: script/helpers.php:94 shortcode/components/guest-ticket.php:21
     366#: shortcode/components/guest.php:11 shortcode/components/ticket.php:21
    297367msgid "Ticket"
    298368msgstr "Chamado"
    299369
    300 #: script/helpers.php:28
     370#: script/helpers.php:32
    301371msgid "was updated"
    302372msgstr "foi atualizado"
    303373
    304 #: script/helpers.php:50
     374#: script/helpers.php:66
    305375msgid "Recover your helpdesk access password"
    306376msgstr "Recupere sua senha de acesso ao helpdesk"
    307377
    308 #: script/helpers.php:57
     378#: script/helpers.php:73
    309379msgid ""
    310380"If your user is found in the database we will send you a email with an OTP "
     
    316386"envie um chamado como convidado"
    317387
    318 #: script/helpers.php:76 script/helpers.php:77
     388#: script/helpers.php:93 script/helpers.php:94
    319389msgid "ID"
    320390msgstr "ID"
    321391
    322 #: script/helpers.php:79
     392#: script/helpers.php:96
    323393msgid "Text"
    324394msgstr "Texto"
    325395
    326 #: script/helpers.php:82
     396#: script/helpers.php:99
    327397msgid "Username"
    328398msgstr "Usuário"
     
    332402msgstr "Usuário não existe"
    333403
    334 #: shortcode/components/guest.php:9 shortcode/components/log-in.php:9
    335 #: shortcode/components/profile.php:17 shortcode/components/sign-in.php:9
    336 msgid "Email"
    337 msgstr "Email"
    338 
    339 #: shortcode/components/guest.php:10 shortcode/components/log-in.php:10
     404#: shortcode/components/guest-ticket.php:29 shortcode/components/ticket.php:29
     405#: shortcode/components/tickets.php:69
     406msgid "Close"
     407msgstr "Encerrar"
     408
     409#: shortcode/components/guest-ticket.php:71 shortcode/components/ticket.php:71
     410msgid "Describe your case"
     411msgstr "Descreva seu caso"
     412
     413#: shortcode/components/guest.php:14 shortcode/components/log-in.php:10
    340414#: shortcode/components/profile.php:18 shortcode/components/sign-in.php:10
    341415msgid "Valid email adress"
    342416msgstr "Email valido"
    343417
    344 #: shortcode/components/guest.php:13 shortcode/components/profile.php:21
     418#: shortcode/components/guest.php:17 shortcode/components/profile.php:21
    345419#: shortcode/components/sign-in.php:13
    346420msgid "Full name"
    347421msgstr "Nome completo"
    348422
    349 #: shortcode/components/guest.php:26 shortcode/components/new-ticket.php:29
     423#: shortcode/components/guest.php:30 shortcode/components/new-ticket.php:34
    350424msgid "Ticket subject"
    351425msgstr "Assunto do chamado"
    352426
    353 #: shortcode/components/guest.php:28 shortcode/components/new-ticket.php:31
     427#: shortcode/components/guest.php:32 shortcode/components/new-ticket.php:36
    354428msgid "Description"
    355429msgstr "Descrição"
    356430
    357 #: shortcode/components/guest.php:29 shortcode/components/new-ticket.php:32
     431#: shortcode/components/guest.php:33 shortcode/components/new-ticket.php:37
    358432msgid "Ticket thread start"
    359433msgstr "Inicio do thread do chamado"
     
    372446msgstr "Uma senha forte"
    373447
    374 #: shortcode/components/new-ticket.php:8
     448#: shortcode/components/new-ticket.php:13
    375449msgid "New ticket"
    376450msgstr "Novo chamado"
     
    428502msgstr "Repita sua senha"
    429503
    430 #: shortcode/components/ticket.php:25 shortcode/components/tickets.php:67
    431 msgid "Close"
    432 msgstr "Encerrar"
    433 
    434 #: shortcode/components/ticket.php:67
    435 msgid "Describe your case"
    436 msgstr "Descreva seu caso"
    437 
    438 #: shortcode/components/tickets.php:16
     504#: shortcode/components/tickets.php:18
    439505msgid "New"
    440506msgstr "Novo"
    441507
    442 #: shortcode/components/tickets.php:21
     508#: shortcode/components/tickets.php:23
    443509msgid "Profile"
    444510msgstr "Perfil"
  • wdesk/trunk/languages/wdesk.pot

    r2823274 r2830701  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: wdesk 0.4\n"
     5"Project-Id-Version: wdesk 0.5\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wdesk\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-11-23T13:13:24-03:00\n"
     12"POT-Creation-Date: 2022-12-08T12:51:40-03:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.7.1\n"
     
    3232
    3333#: admin/departments/html.php:6
    34 #: index.php:40
     34#: index.php:43
    3535msgid "Departments"
    3636msgstr ""
    3737
    3838#: admin/departments/html.php:15
    39 #: admin/tickets/html.php:129
    40 #: admin/tickets/html.php:208
    41 #: shortcode/components/guest.php:16
    42 #: shortcode/components/new-ticket.php:19
    43 #: shortcode/components/tickets.php:32
     39#: admin/tickets/html.php:136
     40#: admin/tickets/html.php:219
     41#: shortcode/components/guest.php:20
     42#: shortcode/components/new-ticket.php:24
     43#: shortcode/components/tickets.php:34
    4444msgid "Department"
    4545msgstr ""
    4646
    4747#: admin/departments/html.php:21
    48 #: admin/departments/html.php:73
     48#: admin/departments/html.php:74
    4949#: admin/tags/html.php:21
    5050#: admin/tags/html.php:44
    51 #: shortcode/components/guest.php:12
     51#: shortcode/components/guest.php:16
    5252#: shortcode/components/profile.php:20
    5353#: shortcode/components/sign-in.php:12
     
    5656
    5757#: admin/departments/html.php:21
    58 #: admin/departments/html.php:73
     58#: admin/departments/html.php:74
    5959msgid "Department name"
    6060msgstr ""
    6161
    62 #: admin/departments/html.php:54
    63 #: admin/settings/html.php:38
     62#: admin/departments/html.php:22
     63#: admin/departments/html.php:75
     64#: admin/settings/html.php:102
     65#: shortcode/components/guest.php:13
     66#: shortcode/components/log-in.php:9
     67#: shortcode/components/profile.php:17
     68#: shortcode/components/sign-in.php:9
     69msgid "Email"
     70msgstr ""
     71
     72#: admin/departments/html.php:22
     73#: admin/departments/html.php:75
     74msgid "Department email"
     75msgstr ""
     76
     77#: admin/departments/html.php:55
     78#: admin/settings/html.php:69
    6479#: admin/tags/html.php:25
    65 #: admin/tickets/html.php:161
     80#: admin/tickets/html.php:168
    6681msgid "Update"
    6782msgstr ""
    6883
    69 #: admin/departments/html.php:55
     84#: admin/departments/html.php:56
     85#: admin/settings/html.php:93
     86#: admin/settings/html.php:132
    7087#: admin/tags/html.php:26
    71 #: admin/tickets/html.php:44
    72 #: admin/tickets/html.php:288
     88#: admin/tickets/html.php:51
     89#: admin/tickets/html.php:304
    7390msgid "Delete"
    7491msgstr ""
    7592
    76 #: admin/departments/html.php:68
     93#: admin/departments/html.php:69
    7794msgid "New department"
    7895msgstr ""
    7996
    80 #: admin/departments/html.php:76
     97#: admin/departments/html.php:78
    8198#: admin/tags/html.php:48
    8299msgid "Create"
    83100msgstr ""
    84101
     102#: admin/reports/html.php:6
     103#: index.php:45
     104msgid "Reports"
     105msgstr ""
     106
     107#: admin/reports/html.php:53
     108msgid "Number of tickets"
     109msgstr ""
     110
    85111#: admin/settings/html.php:8
    86 #: index.php:42
     112#: index.php:46
    87113msgid "Settings"
    88114msgstr ""
     
    116142msgstr ""
    117143
     144#: admin/settings/html.php:38
     145msgid "Date"
     146msgstr ""
     147
     148#: admin/settings/html.php:57
     149msgid "Max subject"
     150msgstr ""
     151
     152#: admin/settings/html.php:58
     153msgid "Ex: 180"
     154msgstr ""
     155
     156#: admin/settings/html.php:63
     157msgid "Max thread"
     158msgstr ""
     159
     160#: admin/settings/html.php:64
     161msgid "Ex: 2800"
     162msgstr ""
     163
     164#: admin/settings/html.php:79
     165msgid "Email blocklist"
     166msgstr ""
     167
     168#: admin/settings/html.php:103
     169msgid "Full email"
     170msgstr ""
     171
     172#: admin/settings/html.php:108
     173#: admin/settings/html.php:147
     174#: admin/tickets/html.php:113
     175msgid "Add"
     176msgstr ""
     177
     178#: admin/settings/html.php:118
     179msgid "Email provider blocklist"
     180msgstr ""
     181
     182#: admin/settings/html.php:141
     183msgid "Provider"
     184msgstr ""
     185
     186#: admin/settings/html.php:142
     187msgid "Provider without @"
     188msgstr ""
     189
    118190#: admin/tags/html.php:6
    119 #: admin/tickets/html.php:98
    120 #: index.php:41
     191#: admin/tickets/html.php:105
     192#: index.php:44
    121193msgid "Tags"
    122194msgstr ""
    123195
    124196#: admin/tags/html.php:15
    125 #: admin/tickets/html.php:210
     197#: admin/tickets/html.php:221
    126198msgid "Tag"
    127199msgstr ""
     
    146218msgstr ""
    147219
    148 #: admin/tickets/html.php:18
    149 #: admin/tickets/html.php:156
    150 #: admin/tickets/html.php:192
    151 #: admin/tickets/html.php:211
    152 #: shortcode/components/ticket.php:35
     220#: admin/tickets/html.php:22
     221#: admin/tickets/html.php:163
     222#: admin/tickets/html.php:203
     223#: admin/tickets/html.php:222
     224#: shortcode/components/guest-ticket.php:39
     225#: shortcode/components/ticket.php:39
    153226msgid "User"
    154227msgstr ""
    155228
    156 #: admin/tickets/html.php:19
    157 #: script/helpers.php:81
    158 #: shortcode/components/ticket.php:36
     229#: admin/tickets/html.php:23
     230#: script/helpers.php:98
     231#: shortcode/components/guest-ticket.php:40
     232#: shortcode/components/ticket.php:40
    159233msgid "File"
    160234msgstr ""
    161235
    162 #: admin/tickets/html.php:20
    163 #: script/helpers.php:80
     236#: admin/tickets/html.php:24
     237#: script/helpers.php:97
    164238msgid "Note"
    165239msgstr ""
    166240
    167 #: admin/tickets/html.php:21
    168 #: admin/tickets/html.php:213
    169 #: shortcode/components/tickets.php:34
     241#: admin/tickets/html.php:25
     242#: admin/tickets/html.php:224
     243#: shortcode/components/tickets.php:36
    170244msgid "Actions"
    171245msgstr ""
    172246
    173 #: admin/tickets/html.php:36
    174 #: admin/tickets/html.php:163
    175 #: shortcode/components/ticket.php:50
     247#: admin/tickets/html.php:42
     248#: admin/tickets/html.php:170
     249#: shortcode/components/guest-ticket.php:54
     250#: shortcode/components/ticket.php:54
    176251msgid "Download"
    177252msgstr ""
    178253
    179 #: admin/tickets/html.php:58
     254#: admin/tickets/html.php:65
    180255msgid "Answer ticket"
    181256msgstr ""
    182257
    183 #: admin/tickets/html.php:64
     258#: admin/tickets/html.php:71
    184259msgid "Please, describe your problem"
    185260msgstr ""
    186261
    187 #: admin/tickets/html.php:68
    188 #: admin/tickets/html.php:70
    189 #: shortcode/components/guest.php:33
    190 #: shortcode/components/new-ticket.php:36
    191 #: shortcode/components/ticket.php:71
     262#: admin/tickets/html.php:75
     263#: admin/tickets/html.php:77
     264#: shortcode/components/guest-ticket.php:75
     265#: shortcode/components/guest.php:37
     266#: shortcode/components/new-ticket.php:41
     267#: shortcode/components/ticket.php:75
    192268msgid "Send"
    193269msgstr ""
    194270
    195 #: admin/tickets/html.php:68
     271#: admin/tickets/html.php:75
    196272msgid "note"
    197273msgstr ""
    198274
    199 #: admin/tickets/html.php:77
     275#: admin/tickets/html.php:84
    200276msgid "Details"
    201277msgstr ""
    202278
    203 #: admin/tickets/html.php:101
    204 #: admin/tickets/html.php:114
    205 #: admin/tickets/html.php:132
    206 #: admin/tickets/html.php:147
     279#: admin/tickets/html.php:108
     280#: admin/tickets/html.php:121
     281#: admin/tickets/html.php:139
     282#: admin/tickets/html.php:154
    207283msgid "Select"
    208284msgstr ""
    209285
    210 #: admin/tickets/html.php:106
    211 msgid "Add"
    212 msgstr ""
    213 
    214 #: admin/tickets/html.php:111
    215 #: admin/tickets/html.php:205
    216 #: shortcode/components/tickets.php:28
     286#: admin/tickets/html.php:118
     287#: admin/tickets/html.php:216
     288#: shortcode/components/tickets.php:30
    217289msgid "Status"
    218290msgstr ""
    219291
    220 #: admin/tickets/html.php:115
    221 #: admin/tickets/html.php:252
    222 #: shortcode/components/tickets.php:49
     292#: admin/tickets/html.php:122
     293#: admin/tickets/html.php:268
     294#: shortcode/components/tickets.php:51
    223295msgid "Open"
    224296msgstr ""
    225297
    226 #: admin/tickets/html.php:116
    227 #: admin/tickets/html.php:254
    228 #: shortcode/components/tickets.php:51
     298#: admin/tickets/html.php:123
     299#: admin/tickets/html.php:270
     300#: shortcode/components/tickets.php:53
    229301msgid "Waiting user"
    230302msgstr ""
    231303
    232 #: admin/tickets/html.php:117
    233 #: admin/tickets/html.php:256
    234 #: shortcode/components/tickets.php:53
     304#: admin/tickets/html.php:124
     305#: admin/tickets/html.php:272
     306#: shortcode/components/tickets.php:55
    235307msgid "Waiting agent"
    236308msgstr ""
    237309
    238 #: admin/tickets/html.php:118
    239 #: admin/tickets/html.php:258
    240 #: shortcode/components/tickets.php:55
     310#: admin/tickets/html.php:125
     311#: admin/tickets/html.php:274
     312#: shortcode/components/tickets.php:57
    241313msgid "Closed"
    242314msgstr ""
    243315
    244 #: admin/tickets/html.php:144
    245 #: admin/tickets/html.php:212
     316#: admin/tickets/html.php:151
     317#: admin/tickets/html.php:223
     318#: shortcode/components/tickets.php:35
     319msgid "Agent"
     320msgstr ""
     321
     322#: admin/tickets/html.php:164
     323#: admin/tickets/html.php:217
     324#: script/helpers.php:95
     325#: shortcode/components/tickets.php:31
     326msgid "Created"
     327msgstr ""
     328
     329#: admin/tickets/html.php:165
     330#: admin/tickets/html.php:218
     331#: shortcode/components/tickets.php:32
     332msgid "Last update"
     333msgstr ""
     334
     335#: admin/tickets/html.php:169
     336msgid "Notify"
     337msgstr ""
     338
     339#: admin/tickets/html.php:195
     340#: index.php:41
     341#: shortcode/components/guest-ticket.php:25
     342#: shortcode/components/new-ticket.php:18
     343#: shortcode/components/profile.php:12
     344#: shortcode/components/ticket.php:25
     345#: shortcode/components/tickets.php:12
     346msgid "Tickets"
     347msgstr ""
     348
     349#: admin/tickets/html.php:198
     350msgid "Reset"
     351msgstr ""
     352
     353#: admin/tickets/html.php:203
     354#: admin/tickets/html.php:220
     355#: shortcode/components/guest.php:29
     356#: shortcode/components/new-ticket.php:33
    246357#: shortcode/components/tickets.php:33
    247 msgid "Agent"
    248 msgstr ""
    249 
    250 #: admin/tickets/html.php:157
    251 #: admin/tickets/html.php:206
    252 #: script/helpers.php:78
    253 #: shortcode/components/tickets.php:29
    254 msgid "Created"
    255 msgstr ""
    256 
    257 #: admin/tickets/html.php:158
    258 #: admin/tickets/html.php:207
    259 #: shortcode/components/tickets.php:30
    260 msgid "Last update"
    261 msgstr ""
    262 
    263 #: admin/tickets/html.php:162
    264 msgid "Notify"
    265 msgstr ""
    266 
    267 #: admin/tickets/html.php:185
    268 #: index.php:38
    269 #: shortcode/components/new-ticket.php:13
    270 #: shortcode/components/profile.php:12
     358msgid "Subject"
     359msgstr ""
     360
     361#: admin/tickets/html.php:204
     362msgid "Search"
     363msgstr ""
     364
     365#: script/functions.php:20
     366msgid "Your personal email or provider is in our blocklist"
     367msgstr ""
     368
     369#: script/functions.php:26
     370msgid "Email already in use"
     371msgstr ""
     372
     373#: script/functions.php:44
     374msgid "User updated"
     375msgstr ""
     376
     377#: script/functions.php:57
     378#: script/functions.php:61
     379msgid "Registered successfully"
     380msgstr ""
     381
     382#: script/functions.php:62
     383msgid "Acess the helpdesk with your email and password"
     384msgstr ""
     385
     386#: script/functions.php:66
     387msgid "User does not exist"
     388msgstr ""
     389
     390#: script/functions.php:80
     391msgid "Password incorrect or user does not exist"
     392msgstr ""
     393
     394#: script/functions.php:127
     395msgid "Your personal email or provider is in the blocklist"
     396msgstr ""
     397
     398#: script/functions.php:133
     399msgid "Your already have a ticket open, wait until you ticket is solved or close it to create another"
     400msgstr ""
     401
     402#: script/helpers.php:19
     403msgid "Ticket update"
     404msgstr ""
     405
     406#: script/helpers.php:23
     407msgid "Access the helpdesk by using your email and password or using the url"
     408msgstr ""
     409
     410#: script/helpers.php:32
     411#: script/helpers.php:35
     412#: script/helpers.php:89
     413#: script/helpers.php:94
     414#: shortcode/components/guest-ticket.php:21
     415#: shortcode/components/guest.php:11
    271416#: shortcode/components/ticket.php:21
    272 #: shortcode/components/tickets.php:10
    273 msgid "Tickets"
    274 msgstr ""
    275 
    276 #: admin/tickets/html.php:187
    277 msgid "Reset"
    278 msgstr ""
    279 
    280 #: admin/tickets/html.php:192
    281 #: admin/tickets/html.php:209
    282 #: shortcode/components/guest.php:25
    283 #: shortcode/components/new-ticket.php:28
    284 #: shortcode/components/tickets.php:31
    285 msgid "Subject"
    286 msgstr ""
    287 
    288 #: admin/tickets/html.php:193
    289 msgid "Search"
    290 msgstr ""
    291 
    292 #: script/functions.php:16
    293 msgid "Email already in use"
    294 msgstr ""
    295 
    296 #: script/functions.php:33
    297 msgid "User updated"
    298 msgstr ""
    299 
    300 #: script/functions.php:45
    301 #: script/functions.php:49
    302 msgid "Registered successfully"
    303 msgstr ""
    304 
    305 #: script/functions.php:50
    306 msgid "Acess the helpdesk with your email and password"
    307 msgstr ""
    308 
    309 #: script/functions.php:54
    310 msgid "User does not exist"
    311 msgstr ""
    312 
    313 #: script/functions.php:69
    314 msgid "Password incorrect or user does not exist"
    315 msgstr ""
    316 
    317 #: script/functions.php:138
    318 msgid "Your already have a ticket open, wait until you ticket is solved or close it to create another"
    319 msgstr ""
    320 
    321 #: script/helpers.php:15
    322 msgid "Ticket update"
    323 msgstr ""
    324 
    325 #: script/helpers.php:19
    326 msgid "Access the helpdesk by using your email and password or using the url"
    327 msgstr ""
    328 
    329 #: script/helpers.php:28
    330 #: script/helpers.php:31
    331 #: script/helpers.php:72
    332 #: script/helpers.php:77
    333 #: shortcode/components/guest.php:7
    334 #: shortcode/components/ticket.php:17
    335417msgid "Ticket"
    336418msgstr ""
    337419
    338 #: script/helpers.php:28
     420#: script/helpers.php:32
    339421msgid "was updated"
    340422msgstr ""
    341423
    342 #: script/helpers.php:50
     424#: script/helpers.php:66
    343425msgid "Recover your helpdesk access password"
    344426msgstr ""
    345427
    346 #: script/helpers.php:57
     428#: script/helpers.php:73
    347429msgid "If your user is found in the database we will send you a email with an OTP code and URL to reset your password. If not, sign-in or submit a ticket as a guest"
    348430msgstr ""
    349431
    350 #: script/helpers.php:76
    351 #: script/helpers.php:77
     432#: script/helpers.php:93
     433#: script/helpers.php:94
    352434msgid "ID"
    353435msgstr ""
    354436
    355 #: script/helpers.php:79
     437#: script/helpers.php:96
    356438msgid "Text"
    357439msgstr ""
    358440
    359 #: script/helpers.php:82
     441#: script/helpers.php:99
    360442msgid "Username"
    361443msgstr ""
     
    367449msgstr ""
    368450
    369 #: shortcode/components/guest.php:9
    370 #: shortcode/components/log-in.php:9
    371 #: shortcode/components/profile.php:17
    372 #: shortcode/components/sign-in.php:9
    373 msgid "Email"
    374 msgstr ""
    375 
    376 #: shortcode/components/guest.php:10
     451#: shortcode/components/guest-ticket.php:29
     452#: shortcode/components/ticket.php:29
     453#: shortcode/components/tickets.php:69
     454msgid "Close"
     455msgstr ""
     456
     457#: shortcode/components/guest-ticket.php:71
     458#: shortcode/components/ticket.php:71
     459msgid "Describe your case"
     460msgstr ""
     461
     462#: shortcode/components/guest.php:14
    377463#: shortcode/components/log-in.php:10
    378464#: shortcode/components/profile.php:18
     
    381467msgstr ""
    382468
    383 #: shortcode/components/guest.php:13
     469#: shortcode/components/guest.php:17
    384470#: shortcode/components/profile.php:21
    385471#: shortcode/components/sign-in.php:13
     
    387473msgstr ""
    388474
    389 #: shortcode/components/guest.php:26
    390 #: shortcode/components/new-ticket.php:29
     475#: shortcode/components/guest.php:30
     476#: shortcode/components/new-ticket.php:34
    391477msgid "Ticket subject"
    392478msgstr ""
    393479
    394 #: shortcode/components/guest.php:28
    395 #: shortcode/components/new-ticket.php:31
     480#: shortcode/components/guest.php:32
     481#: shortcode/components/new-ticket.php:36
    396482msgid "Description"
    397483msgstr ""
    398484
    399 #: shortcode/components/guest.php:29
    400 #: shortcode/components/new-ticket.php:32
     485#: shortcode/components/guest.php:33
     486#: shortcode/components/new-ticket.php:37
    401487msgid "Ticket thread start"
    402488msgstr ""
     
    418504msgstr ""
    419505
    420 #: shortcode/components/new-ticket.php:8
     506#: shortcode/components/new-ticket.php:13
    421507msgid "New ticket"
    422508msgstr ""
     
    475561msgstr ""
    476562
    477 #: shortcode/components/ticket.php:25
    478 #: shortcode/components/tickets.php:67
    479 msgid "Close"
    480 msgstr ""
    481 
    482 #: shortcode/components/ticket.php:67
    483 msgid "Describe your case"
    484 msgstr ""
    485 
    486 #: shortcode/components/tickets.php:16
     563#: shortcode/components/tickets.php:18
    487564msgid "New"
    488565msgstr ""
    489566
    490 #: shortcode/components/tickets.php:21
     567#: shortcode/components/tickets.php:23
    491568msgid "Profile"
    492569msgstr ""
  • wdesk/trunk/readme.txt

    r2825386 r2830701  
    55Requires at least: 5.0
    66Tested up to: 6.1
    7 Stable tag: 0.4
     7Stable tag: 0.5
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    4545== Changelog ==
    4646
     47= 0.5 =
     48* Reports
     49* Provider, email blocklist
     50* Autoclose if inactive
     51* Date formats
     52* Department email
     53
    4754= 0.4 =
    4855* Tags
     
    6976== Upgrade Notice ==
    7077
     78= 0.5 =
     79Admin improvement
     80
     81= 0.4 =
     82Agent utilities
     83
    7184= 0.3 =
    7285Usability
  • wdesk/trunk/script/functions.php

    r2825348 r2830701  
    22require_once(WDESK_LOCAL . 'script/helpers.php');
    33session_start();
     4
    45function wdesk_user()
    56{
     
    1213        $email = sanitize_email($_POST['email']);
    1314        $name = sanitize_text_field($_POST['name']);
     15        // Email or provider in the blocklist
     16        $provider = substr($email, strpos($email, '@') + 1);
     17        $blocked_emails = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_settings_emails` WHERE email = %s", $email));
     18        $blocked_providers = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_settings_email_providers` WHERE provider = %s", $provider));
     19        if (count($blocked_providers) > 0 && count($blocked_emails) > 0) {
     20            echo "<script>alert('" . __('Your personal email or provider is in our blocklist', 'wdesk') . "')</script>";
     21            return 1;
     22        }
     23        // Email already in use
    1424        $users = $wpdb->get_results($wpdb->prepare("SELECT 1 FROM wdesk_users WHERE email = %s;", $email));
    1525        if (isset($users[0]) && $users[0] >= 1 && isset($_POST['wdesk-user-register'])) {
    1626            echo "<script>alert('" . __('Email already in use', 'wdesk') . "')</script>";
    1727            return 1;
     28        }
     29        // Update existing user
     30        if (isset($_POST['id'])) {
     31            $id = sanitize_text_field($_POST['id']);
     32            $password = sha1(base64_encode($_POST["password"]));
     33            $wpdb->replace(
     34                'wdesk_users',
     35                array(
     36                    'id' => $id,
     37                    'email' => $email,
     38                    'name' => $name,
     39                    'password' => $password                 
     40                )
     41            );
     42            $_SESSION['wdesk-user-email'] = $email;
     43            $_SESSION['wdesk-user-password'] = $password;
     44            echo "<script>alert('" . __('User updated', 'wdesk') . "')</script>";
     45            echo "<script>window.location = window.location.pathname</script>";
     46            return 0;
     47        // Create new user
    1848        } else {
    19             if (isset($_POST['id'])) {
    20                 $id = sanitize_text_field($_POST['id']);
    21                 $password = sha1(base64_encode($_POST["password"]));
    22                 $wpdb->replace(
    23                     'wdesk_users',
    24                     array(
    25                         'id' => $id,
    26                         'email' => $email,
    27                         'name' => $name,
    28                         'password' => $password                 
    29                     )
    30                 );
    31                 $_SESSION['wdesk-user-email'] = $email;
    32                 $_SESSION['wdesk-user-password'] = $password;
    33                 echo "<script>alert('" . __('User updated', 'wdesk') . "')</script>";
    34                 echo "<script>window.location = window.location.pathname</script>";
    35                 return 0;
    36             } else {
    37                 $password = sha1(base64_encode($_POST["password"]));
    38                 $wpdb->insert(
    39                     'wdesk_users',
    40                     array(
    41                         'email' => $email,
    42                         'password' => $password
    43                     )
    44                 );
    45                 echo "<script>alert('" . __('Registered successfully', 'wdesk') . "')</script>";
    46                 $_SESSION['wdesk-user-email'] = $email;
    47                 $_SESSION['wdesk-user-password'] = $password;
    48                 header("refresh: 1");
    49                 $subject = __('Registered successfully', 'wdesk');
    50                 $message = __('Acess the helpdesk with your email and password', 'wdesk');
    51                 wdesk_helper_send_mail($email, $subject, $message);
    52                 return 0;
    53             }
    54             echo "<script>alert('" . __('User does not exist', 'wdesk') . "')</script>";
    55             return 1;
     49            $password = sha1(base64_encode($_POST["password"]));
     50            $wpdb->insert(
     51                'wdesk_users',
     52                array(
     53                    'email' => $email,
     54                    'password' => $password
     55                )
     56            );
     57            echo "<script>alert('" . __('Registered successfully', 'wdesk') . "')</script>";
     58            $_SESSION['wdesk-user-email'] = $email;
     59            $_SESSION['wdesk-user-password'] = $password;
     60            header("refresh: 1");
     61            $subject = __('Registered successfully', 'wdesk');
     62            $message = __('Acess the helpdesk with your email and password', 'wdesk');
     63            wdesk_helper_send_mail($email, $subject, $message);
     64            return 0;
    5665        }
     66        echo "<script>alert('" . __('User does not exist', 'wdesk') . "')</script>";
     67        return 1;
    5768    }
    5869    if (isset($_POST['wdesk-user-login'])) {
     
    109120        $user_email = sanitize_email($_POST['user-email']);
    110121        $thread_user = sanitize_text_field($_POST['thread-user']);
     122        // Email or provider in the blocklist
     123        $provider = substr($user_email, strpos($user_email, '@') + 1);
     124        $blocked_emails = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_settings_emails` WHERE email = %s", $user_email));
     125        $blocked_providers = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_settings_email_providers` WHERE provider = %s", $provider));
     126        if (count($blocked_providers) > 0 && count($blocked_emails) > 0) {
     127            echo "<script>alert('" . __('Your personal email or provider is in the blocklist', 'wdesk') . "')</script>";
     128            return 1;
     129        }
     130        // Email already in use
    111131        $tickets = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_tickets` WHERE user_email = %s and status != 'Closed'", $user_email));
     132        if (count($tickets) > 0) {
     133            echo "<script>alert('" . __('Your already have a ticket open, wait until you ticket is solved or close it to create another', 'wdesk') . "')</script>";
     134            return 1;
     135        }
    112136        // Unique ticket id (token)
    113137        $token = uniqid();
    114         // This user_email already has tickets?
    115         if(count($tickets) <= 0) {
    116             $wpdb->insert(
    117                 'wdesk_tickets',
    118                 array(
    119                     'subject' => sanitize_text_field($_POST['subject']),
    120                     'user_email' => $user_email,
    121                     'user_name' => $thread_user,
    122                     'token' => $token,
    123                     'status' => 'Open',
    124                     'department' => sanitize_text_field($_POST['department'])
    125                 )
    126             );
    127             $text = sanitize_textarea_field($_POST['thread']);
    128             $file = isset($_FILES['file']) && $_FILES['file']['error'] == 0 ? wdesk_helper_save_file($_FILES['file']) : "";
    129             $wpdb->insert(
    130                 'wdesk_tickets_threads',
    131                 array(
    132                     'ticket_id' => $wpdb->insert_id,
    133                     'text' => $text,
    134                     'file' => $file,
    135                     'user_name' => $thread_user
    136                 )
    137             );
    138             // Success, update last_update and notify user
    139             $wpdb->query($wpdb->prepare("UPDATE `wdesk_tickets` SET `last_update`= NOW() WHERE `id` = %s", $wpdb->insert_id));
    140             wdesk_helper_notify_user($token);
    141         } else {
    142             echo "<script>alert('" . __('Your already have a ticket open, wait until you ticket is solved or close it to create another', 'wdesk') . "')</script>";
    143         }
     138        $wpdb->insert(
     139            'wdesk_tickets',
     140            array(
     141                'subject' => sanitize_text_field($_POST['subject']),
     142                'user_email' => $user_email,
     143                'user_name' => $thread_user,
     144                'token' => $token,
     145                'status' => 'Open',
     146                'department' => sanitize_text_field($_POST['department'])
     147            )
     148        );
     149        $text = sanitize_textarea_field($_POST['thread']);
     150        $file = isset($_FILES['file']) && $_FILES['file']['error'] == 0 ? wdesk_helper_save_file($_FILES['file']) : "";
     151        $wpdb->insert(
     152            'wdesk_tickets_threads',
     153            array(
     154                'ticket_id' => $wpdb->insert_id,
     155                'text' => $text,
     156                'file' => $file,
     157                'user_name' => $thread_user
     158            )
     159        );
     160        // Success, update last_update and notify user
     161        $wpdb->query($wpdb->prepare("UPDATE `wdesk_tickets` SET `last_update`= NOW() WHERE `id` = %s", $wpdb->insert_id));
     162        wdesk_helper_notify_user($token);
    144163    }
    145164    if (isset($_POST['wdesk-ticket-update'])) {
     
    176195    }
    177196    if (isset($_POST['wdesk-ticket-tag-remove'])) {
    178       global $wpdb;
     197        global $wpdb;
    179198        $ticket_id = sanitize_text_field($_POST['ticket']);
    180199        $wpdb->update(
     
    219238            array(
    220239                'name' => sanitize_text_field($_POST['name']),
     240                'email' => sanitize_text_field($_POST['email'])
    221241            )
    222242        );
     
    233253            array(
    234254                'name' => sanitize_text_field($_POST['name']),
     255                'email' => sanitize_text_field($_POST['email'])
    235256            ), array(
    236257                'id' => $department_id,
     
    306327function wdesk_setting()
    307328{
    308     // Update all 3 settings values together
     329    // Update all general settings values together
    309330    if (isset($_POST['wdesk-setting-update'])) {
    310331        global $wpdb;
     
    339360            ), array(
    340361                'id' => 3,
     362            )
     363        );
     364        $wpdb->update(
     365            'wdesk_settings',
     366            array(
     367                'value' => sanitize_text_field($_POST['subject']),
     368            ), array(
     369                'id' => 4,
     370            )
     371        );
     372        $wpdb->update(
     373            'wdesk_settings',
     374            array(
     375                'value' => sanitize_text_field($_POST['thread']),
     376            ), array(
     377                'id' => 5,
     378            )
     379        );
     380    }
     381    if (isset($_POST['wdesk-setting-email-add'])) {
     382        global $wpdb;
     383        $wpdb->insert(
     384            'wdesk_settings_emails',
     385            array(
     386                'email' => sanitize_text_field($_POST['email']),
     387            )
     388        );
     389    }
     390    if (isset($_POST['wdesk-setting-email-delete'])) {
     391        global $wpdb;
     392        $wpdb->delete(
     393            'wdesk_settings_emails',
     394            array(
     395                'id' => sanitize_text_field($_POST['id']),
     396            )
     397        );
     398    }
     399    if (isset($_POST['wdesk-setting-email-provider-add'])) {
     400        global $wpdb;
     401        $wpdb->insert(
     402            'wdesk_settings_email_providers',
     403            array(
     404                'provider' => sanitize_text_field($_POST['provider']),
     405            )
     406        );
     407    }
     408    if (isset($_POST['wdesk-setting-email-provider-delete'])) {
     409        global $wpdb;
     410        $wpdb->delete(
     411            'wdesk_settings_email_providers',
     412            array(
     413                'id' => sanitize_text_field($_POST['id']),
    341414            )
    342415        );
  • wdesk/trunk/script/helpers.php

    r2825348 r2830701  
    2929{
    3030    global $wpdb;
    31     $tickets = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_tickets` WHERE id = %s", $ticket_id));
    32     $agent = get_user_by('id', $tickets[0]->agent);
     31    // Email message
    3332    $subject = __('Ticket', 'wdesk') . " $ticket_id " . __('was updated', 'wdesk');
    34     $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
     33    $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
    3534    $url = $settings[2]->value;
    3635    $message = __('Ticket', 'wdesk') . "$ticket_id." . __("Access the helpdesk by using the url") . " $url";
    37     // Notify ticket agent if it is set
     36    // Get ticket info
     37    $tickets = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_tickets` WHERE id = %s", $ticket_id));
     38    // Agent not assigned, use department email
     39    $agent = get_user_by('id', $tickets[0]->agent);
     40    if (!$agent) {
     41        $departments = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_departments` WHERE id = %s", $tickets[0]->department));
     42        wdesk_helper_send_mail($departments[0]->email, $subject, $message);
     43        return;
     44    }
     45    // Notify agent if it's email is set
    3846    (isset($agent->user_email) && $agent->user_email != "") ? wdesk_helper_send_mail($agent->user_email, $subject, $message) : '';
    3947}
  • wdesk/trunk/shortcode/components/guest-ticket.php

    r2825348 r2830701  
    11<?php
    22function wdesk_shortcode_component_guest_ticket() {
    3     $return = '';
    43    global $wpdb;
     4    // Get ticket settings
     5    $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
     6    $max_thread = $settings[5]->value;
     7    //
    58    $ticket = sanitize_text_field($_GET['ticket']);
    69    $token = sanitize_text_field($_GET['token']);
    710    $ticket = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_tickets` WHERE id = %s AND token = %s", array($ticket, $token)));
     11    $return = '';
    812    $return .= '
    913    <script>
     
    6569        <input type="hidden" name="subject" value="' . $ticket[0]->subject . '"/>
    6670        <input type="hidden" name="thread-user" value="' . $ticket[0]->user_name . '" />
    67         <textarea required type="text" name="thread" id="thread" placeholder="' . __('Describe your case', 'wdesk') . '" value="" style="height: 170px;"></textarea>
     71        <textarea required type="text" name="thread" id="thread" placeholder="' . __('Describe your case', 'wdesk') . '" maxlength="' . $max_thread . '" value="" style="height: 170px;"></textarea>
    6872        <br>
    6973        <input type="file" name="file" />
  • wdesk/trunk/shortcode/components/guest.php

    r2825348 r2830701  
    22function wdesk_shortcode_component_guest() {
    33    global $wpdb;
     4    // Get ticket settings
     5    $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
     6    $max_subject = $settings[4]->value;
     7    $max_thread = $settings[5]->value;
    48    $return = '';
    59    $return .= '
     
    2428                    $return .= '
    2529                    <label>' . __('Subject', 'wdesk') . ' <a style="color: #FF0000;">*</a></label>
    26                     <input type="text" name="subject" value="" placeholder="' . __('Ticket subject', 'wdesk') . '" required />
     30                    <input type="text" name="subject" value="" placeholder="' . __('Ticket subject', 'wdesk') . '" maxlength="' . $max_subject . '" required />
    2731                    <br>
    2832                    <label>' . __('Description', 'wdesk') . ' <a style="color: #FF0000;">*</a></label>
    29                     <textarea type="text" name="thread" placeholder="' . __('Ticket thread start', 'wdesk') . '" style="height: 170px;" required></textarea>
     33                    <textarea type="text" name="thread" placeholder="' . __('Ticket thread start', 'wdesk') . '" maxlength="' . $max_thread . '" style="height: 170px;" required></textarea>
    3034                    <br>
    3135                    <input type="file" name="file" />
  • wdesk/trunk/shortcode/components/new-ticket.php

    r2825348 r2830701  
    22function wdesk_shortcode_component_new_ticket($users) {
    33    global $wpdb;
     4    // Get ticket settings
     5    $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
     6    $max_subject = $settings[4]->value;
     7    $max_thread = $settings[5]->value;
     8    //
    49    $return = '';
    510    $return .= '
     
    2732                $return .= '
    2833                <label>' . __('Subject', 'wdesk') . ' <a style="color: #FF0000;">*</a></label>
    29                 <input type="text" name="subject" value="" placeholder="' . __('Ticket subject', 'wdesk') . '" required />
     34                <input type="text" name="subject" value="" placeholder="' . __('Ticket subject', 'wdesk') . '" maxlength="' . $max_subject . '" required />
    3035                <br>
    3136                <label>' . __('Description', 'wdesk') . ' <a style="color: #FF0000;">*</a></label>
    32                 <textarea type="text" name="thread" placeholder="' . __('Ticket thread start', 'wdesk') . '" value="" style="height: 170px;" required></textarea>
     37                <textarea type="text" name="thread" placeholder="' . __('Ticket thread start', 'wdesk') . '" maxlength="' . $max_thread . '" value="" style="height: 170px;" required></textarea>
    3338                <br>
    3439                <input type="file" name="file" />
  • wdesk/trunk/shortcode/components/ticket.php

    r2825348 r2830701  
    44    if (isset($_GET['ticket'])) {
    55        global $wpdb;
     6        // Get ticket settings
     7        $settings = $wpdb->get_results("SELECT * FROM `wdesk_settings`");
     8        $max_thread = $settings[5]->value;
     9        //
    610        $ticket = sanitize_text_field($_GET['ticket']);
    711        $ticket = $wpdb->get_results($wpdb->prepare("SELECT * FROM `wdesk_tickets` WHERE id = %s", $ticket));
     
    6569            <input type="hidden" name="subject" value="' . $ticket[0]->subject . '"/>
    6670            <input type="hidden" name="thread-user" value="' . $ticket[0]->user_name . '" />
    67             <textarea required type="text" name="thread" id="thread" placeholder="' . __('Describe your case', 'wdesk') . '" value="" style="height: 170px;"></textarea>
     71            <textarea required type="text" name="thread" id="thread" placeholder="' . __('Describe your case', 'wdesk') . '" maxlength="' . $max_thread . '" value="" style="height: 170px;"></textarea>
    6872            <br>
    6973            <input type="file" name="file" />
Note: See TracChangeset for help on using the changeset viewer.