From b797d09a2a8fcaf9783ab2b507d56a70cdd32971 Mon Sep 17 00:00:00 2001 From: Peter Hankiewicz Date: Wed, 28 Sep 2022 18:53:22 +0200 Subject: [PATCH] Make url fields in admin render as textarea --- CHANGELOG.md | 4 ++++ .../rails_admin/custom/notice_edit_form.js | 12 ++++++++---- .../stylesheets/rails_admin/custom/theming.scss | 10 ++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91af3f59..cd78cd42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). It uses [CalVer](https://calver.org/) as of May 2019. +## [22.09g](https://github.com/berkmancenter/lumendatabase/releases/tag/2022.09g) - 2022-09-28 +### Changed +* Made url fields in the `admin` render as `textarea`. + ## [22.09f](https://github.com/berkmancenter/lumendatabase/releases/tag/2022.09f) - 2022-09-27 ### Fixed * Made `textarea` fields in the `admin` wider generally. diff --git a/app/assets/javascripts/rails_admin/custom/notice_edit_form.js b/app/assets/javascripts/rails_admin/custom/notice_edit_form.js index 761664cd..cbb98901 100644 --- a/app/assets/javascripts/rails_admin/custom/notice_edit_form.js +++ b/app/assets/javascripts/rails_admin/custom/notice_edit_form.js @@ -77,10 +77,12 @@ class NoticeEditForm { 'type': 'object', 'properties': { 'url': { - 'type': 'string' + 'type': 'string', + 'format': 'html' }, 'url_original': { - 'type': 'string' + 'type': 'string', + 'format': 'html' } } } @@ -93,10 +95,12 @@ class NoticeEditForm { 'type': 'object', 'properties': { 'url': { - 'type': 'string' + 'type': 'string', + 'format': 'html' }, 'url_original': { - 'type': 'string' + 'type': 'string', + 'format': 'html' } } } diff --git a/app/assets/stylesheets/rails_admin/custom/theming.scss b/app/assets/stylesheets/rails_admin/custom/theming.scss index 3e511463..99ed58b5 100644 --- a/app/assets/stylesheets/rails_admin/custom/theming.scss +++ b/app/assets/stylesheets/rails_admin/custom/theming.scss @@ -72,13 +72,15 @@ aside#redaction-tools { [id^='edit_'], [id^='new_'] { textarea { - height: 400px !important; - width: 700px !important; + height: 300px !important; + width: 500px !important; max-width: 100%; } - label { - display: block; + td.compact { + textarea { + max-width: 90%; + } } }