|
222 | 222 | </div> |
223 | 223 | </div> |
224 | 224 |
|
| 225 | + <div id="tabler-direction-selection" class="mb-3"> |
| 226 | + <p>Choose the text <strong>direction</strong> for your admin panel:</p> |
| 227 | + <div class="row"> |
| 228 | + <div class="col-lg-6 col-md-6 mb-3"> |
| 229 | + <label class="form-selectgroup-item cursor-pointer"> |
| 230 | + <input @if(Session::get('backpack.ui.html_direction', config('backpack.ui.html_direction', 'ltr')) === 'ltr') checked @endif type="radio" name="direction" value="ltr" class="form-selectgroup-input"> |
| 231 | + <div class="form-selectgroup-label border rounded p-3"> |
| 232 | + <div class="form-selectgroup-title fw-bold mb-1">LTR</div> |
| 233 | + <small class="text-muted">Left to Right (Default)</small> |
| 234 | + </div> |
| 235 | + </label> |
| 236 | + </div> |
| 237 | + <div class="col-lg-6 col-md-6 mb-3"> |
| 238 | + <label class="form-selectgroup-item cursor-pointer"> |
| 239 | + <input @if(Session::get('backpack.ui.html_direction', config('backpack.ui.html_direction', 'ltr')) === 'rtl') checked @endif type="radio" name="direction" value="rtl" class="form-selectgroup-input"> |
| 240 | + <div class="form-selectgroup-label border rounded p-3"> |
| 241 | + <div class="form-selectgroup-title fw-bold mb-1">RTL</div> |
| 242 | + <small class="text-muted">Right to Left</small> |
| 243 | + </div> |
| 244 | + </label> |
| 245 | + </div> |
| 246 | + </div> |
| 247 | + </div> |
| 248 | + |
225 | 249 | <div id="tabler-styles-selection" class="mb-3"> |
226 | 250 | <p>Choose which <strong>skins</strong> to apply on top of the Tabler theme:</p> |
227 | 251 | <div class="row"> |
|
289 | 313 | if (selectedTheme === 'tabler') { |
290 | 314 | layoutSelection.slideDown(); |
291 | 315 | stylesSelection.slideDown(); |
| 316 | + directionSelection.slideDown(); |
292 | 317 | } else { |
293 | 318 | // Hide layout and styles options for CoreUI themes (coreuiv2, coreuiv4) |
294 | 319 | layoutSelection.slideUp(); |
295 | 320 | stylesSelection.slideUp(); |
| 321 | + directionSelection.slideUp(); |
296 | 322 | } |
297 | 323 | }); |
298 | 324 |
|
| 325 | + // Get direction selection element |
| 326 | + const directionSelection = $('#tabler-direction-selection'); |
| 327 | +
|
299 | 328 | // Also handle the case when modal is opened - ensure correct initial state |
300 | 329 | $('#modal-layout').on('shown.bs.modal', function () { |
301 | 330 | const checkedTheme = $('.theme-choice:checked').val(); |
302 | 331 | if (checkedTheme === 'tabler') { |
303 | 332 | layoutSelection.show(); |
304 | 333 | stylesSelection.show(); |
| 334 | + directionSelection.show(); |
305 | 335 | } else { |
306 | 336 | layoutSelection.hide(); |
307 | 337 | stylesSelection.hide(); |
| 338 | + directionSelection.hide(); |
308 | 339 | } |
309 | 340 | }); |
310 | 341 | </script> |
|
0 commit comments