theme.js 1.4 KB

1234567891011121314151617181920212223242526272829
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function (Drupal) {
  8. Drupal.theme.quickeditImageErrors = function (settings) {
  9. return '<div class="quickedit-image-errors">' + settings.errors + '</div>';
  10. };
  11. Drupal.theme.quickeditImageDropzone = function (settings) {
  12. return '<div class="quickedit-image-dropzone ' + settings.state + '">' + ' <i class="quickedit-image-icon"></i>' + (' <span class="quickedit-image-text">' + settings.text + '</span>') + '</div>';
  13. };
  14. Drupal.theme.quickeditImageToolbar = function (settings) {
  15. var html = '<form class="quickedit-image-field-info">';
  16. if (settings.alt_field) {
  17. html += '<div><label for="alt" class="' + (settings.alt_field_required ? 'required' : '') + '">' + Drupal.t('Alternative text') + '</label>' + ('<input type="text" placeholder="' + settings.alt + '" value="' + settings.alt + '" name="alt" ' + (settings.alt_field_required ? 'required' : '') + '/>') + ' </div>';
  18. }
  19. if (settings.title_field) {
  20. html += '<div><label for="title" class="' + (settings.title_field_required ? 'form-required' : '') + '">' + Drupal.t('Title') + '</label>' + ('<input type="text" placeholder="' + settings.title + '" value="' + settings.title + '" name="title" ' + (settings.title_field_required ? 'required' : '') + '/>') + '</div>';
  21. }
  22. html += '</form>';
  23. return html;
  24. };
  25. })(Drupal);