| @@ -24,8 +24,9 @@ | ||
| 24 | 24 | return; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $isTicketClosed = TicketServiceManager::isTicketClosed($ticket); |
| 28 | +$isTicketSiteAccessRejected = TicketServiceManager::isTicketSiteAccessRejected($ticket); | |
| 28 | 29 | |
| 29 | 30 | ?> |
| 30 | 31 | <div class="basalam-container"> |
| 31 | 32 | <div class="ticket-items__answer"> |
| @@ -53,44 +54,46 @@ | ||
| 53 | 54 | <label for="ticket-answer-textarea" class="ticket-items__answer-control-label basalam-p">متن پاسخ خود را وارد کنید</label> |
| 54 | 55 | <textarea id="ticket-answer-textarea" name="content" class="basalam-input ticket-items__answer-input"></textarea> |
| 55 | 56 | </div> |
| 56 | 57 | |
| 57 | - <div class="create-ticket__extra-info"> | |
| 58 | - <p class="create-ticket__extra-info-title basalam-p">اطلاعات دسترسی (اختیاری)</p> | |
| 59 | - <div class="ticket-access-grid"> | |
| 60 | - <div class="ticket-access-card ticket-access-card--dashboard"> | |
| 61 | - <p class="ticket-access-card__title basalam-p">اطلاعات پیشخوان</p> | |
| 62 | - <div class="create-ticket__control"> | |
| 63 | - <label for="ticket-dashboard-login-url" class="create-ticket__label basalam-p">آدرس لاگین پیشخوان</label> | |
| 64 | - <input type="text" name="dashboard_login_url" id="ticket-dashboard-login-url" class="basalam-input create-ticket__input"> | |
| 58 | + <?php if ($isTicketSiteAccessRejected): ?> | |
| 59 | + <div class="create-ticket__extra-info"> | |
| 60 | + <p class="create-ticket__extra-info-title basalam-p">اطلاعات دسترسی (اختیاری)</p> | |
| 61 | + <div class="ticket-access-grid"> | |
| 62 | + <div class="ticket-access-card ticket-access-card--dashboard"> | |
| 63 | + <p class="ticket-access-card__title basalam-p">اطلاعات پیشخوان</p> | |
| 64 | + <div class="create-ticket__control"> | |
| 65 | + <label for="ticket-dashboard-login-url" class="create-ticket__label basalam-p">آدرس لاگین پیشخوان</label> | |
| 66 | + <input type="text" name="dashboard_login_url" id="ticket-dashboard-login-url" class="basalam-input create-ticket__input"> | |
| 67 | + </div> | |
| 68 | + <div class="create-ticket__control"> | |
| 69 | + <label for="ticket-dashboard-username" class="create-ticket__label basalam-p">نام کاربری پیشخوان</label> | |
| 70 | + <input type="text" name="dashboard_username" id="ticket-dashboard-username" class="basalam-input create-ticket__input"> | |
| 71 | + </div> | |
| 72 | + <div class="create-ticket__control"> | |
| 73 | + <label for="ticket-dashboard-password" class="create-ticket__label basalam-p">رمز عبور پیشخوان</label> | |
| 74 | + <input type="password" name="dashboard_password" id="ticket-dashboard-password" class="basalam-input create-ticket__input" autocomplete="new-password" spellcheck="false"> | |
| 75 | + </div> | |
| 65 | 76 | </div> |
| 66 | - <div class="create-ticket__control"> | |
| 67 | - <label for="ticket-dashboard-username" class="create-ticket__label basalam-p">نام کاربری پیشخوان</label> | |
| 68 | - <input type="text" name="dashboard_username" id="ticket-dashboard-username" class="basalam-input create-ticket__input"> | |
| 69 | - </div> | |
| 70 | - <div class="create-ticket__control"> | |
| 71 | - <label for="ticket-dashboard-password" class="create-ticket__label basalam-p">رمز عبور پیشخوان</label> | |
| 72 | - <input type="text" name="dashboard_password" id="ticket-dashboard-password" class="basalam-input create-ticket__input"> | |
| 73 | - </div> | |
| 74 | - </div> | |
| 75 | 77 | |
| 76 | - <div class="ticket-access-card ticket-access-card--host-panel"> | |
| 77 | - <p class="ticket-access-card__title basalam-p">کنترل پنل هاست</p> | |
| 78 | - <div class="create-ticket__control"> | |
| 79 | - <label for="ticket-host-panel-login-url" class="create-ticket__label basalam-p">آدرس لاگین کنترل پنل هاست</label> | |
| 80 | - <input type="text" name="host_panel_login_url" id="ticket-host-panel-login-url" class="basalam-input create-ticket__input"> | |
| 78 | + <div class="ticket-access-card ticket-access-card--host-panel"> | |
| 79 | + <p class="ticket-access-card__title basalam-p">کنترل پنل هاست</p> | |
| 80 | + <div class="create-ticket__control"> | |
| 81 | + <label for="ticket-host-panel-login-url" class="create-ticket__label basalam-p">آدرس لاگین کنترل پنل هاست</label> | |
| 82 | + <input type="text" name="host_panel_login_url" id="ticket-host-panel-login-url" class="basalam-input create-ticket__input"> | |
| 83 | + </div> | |
| 84 | + <div class="create-ticket__control"> | |
| 85 | + <label for="ticket-host-panel-username" class="create-ticket__label basalam-p">نام کاربری کنترل پنل هاست</label> | |
| 86 | + <input type="text" name="host_panel_username" id="ticket-host-panel-username" class="basalam-input create-ticket__input"> | |
| 87 | + </div> | |
| 88 | + <div class="create-ticket__control"> | |
| 89 | + <label for="ticket-host-panel-password" class="create-ticket__label basalam-p">رمز عبور کنترل پنل هاست</label> | |
| 90 | + <input type="password" name="host_panel_password" id="ticket-host-panel-password" class="basalam-input create-ticket__input" autocomplete="new-password" spellcheck="false"> | |
| 91 | + </div> | |
| 81 | 92 | </div> |
| 82 | - <div class="create-ticket__control"> | |
| 83 | - <label for="ticket-host-panel-username" class="create-ticket__label basalam-p">نام کاربری کنترل پنل هاست</label> | |
| 84 | - <input type="text" name="host_panel_username" id="ticket-host-panel-username" class="basalam-input create-ticket__input"> | |
| 85 | - </div> | |
| 86 | - <div class="create-ticket__control"> | |
| 87 | - <label for="ticket-host-panel-password" class="create-ticket__label basalam-p">رمز عبور کنترل پنل هاست</label> | |
| 88 | - <input type="text" name="host_panel_password" id="ticket-host-panel-password" class="basalam-input create-ticket__input"> | |
| 89 | - </div> | |
| 90 | 93 | </div> |
| 91 | 94 | </div> |
| 92 | - </div> | |
| 95 | + <?php endif; ?> | |
| 93 | 96 | |
| 94 | 97 | <div class="ticket-items__answer-control"> |
| 95 | 98 | <label class="ticket-items__answer-control-label basalam-p">پیوست تصویر (اختیاری)</label> |
| 96 | 99 | <div class="ticket-file-upload" id="ticket-file-upload-reply"> |
| @@ -159,8 +162,8 @@ | ||
| 159 | 162 | </div> |
| 160 | 163 | <?php if (!$isTicketClosed): ?> |
| 161 | 164 | <script> |
| 162 | 165 | document.addEventListener('DOMContentLoaded', function() { |
| 163 | - ticketFileUpload('ticket-file-reply', '<?php echo wp_create_nonce('upload_ticket_media_nonce'); ?>'); | |
| 166 | + ticketFileUpload('ticket-file-reply', '<?php echo esc_attr(wp_create_nonce('upload_ticket_media_nonce')); ?>'); | |
| 164 | 167 | }); |
| 165 | 168 | </script> |
| 166 | -<?php endif; ?> | |
| 169 | +<?php endif; ?> | |