From 5d4513fd970a0b39e368787e01c6b989827f1d17 Mon Sep 17 00:00:00 2001 From: cel Date: Wed, 8 Apr 2020 18:37:15 -0400 Subject: Smaller text fields --- lib/serve.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index 414a0bd..c3e2115 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1499,10 +1499,10 @@ Serve.prototype.editGathering = function (url) { ph('h2', ['Edit Gathering ', self.phIdLink(id)]), ph('form', {action: '', method: 'post', enctype: 'multipart/form-data'}, [ ph('div', [ - ph('input', {name: 'title', size: 70, placeholder: 'Title', value: u.escapeHTML(title)}) + ph('input', {name: 'title', size: 64, placeholder: 'Title', value: u.escapeHTML(title)}) ]), ph('div', [ - ph('input', {name: 'location', size: 70, placeholder: 'Location', value: u.escapeHTML(location)}) + ph('input', {name: 'location', size: 64, placeholder: 'Location', value: u.escapeHTML(location)}) ]), ph('div', [ ph('input', {name: 'startDateTimeStr', value: u.escapeHTML(startDateTimeStr), @@ -1545,7 +1545,7 @@ Serve.prototype.editGathering = function (url) { ])), ph('div', ph('textarea', { name: 'description', placeholder: 'Description', - cols: 70, + cols: 64, rows: Math.max(5, u.rows(description)) }, u.escapeHTML(description))), ph('div', ph('select', {name: 'attending'}, [ @@ -1558,7 +1558,7 @@ Serve.prototype.editGathering = function (url) { ])), ph('div', additionalMentions.length > 0 || data.add_mentions ? ph('textarea', { name: 'mentions', placeholder: 'Additional mentions', - cols: 70, style: 'font: monospace', + cols: 64, style: 'font: monospace', rows: Math.max(3, additionalMentions.length + 2), }, u.escapeHTML(additionalMentions.join('\n')) ) : ph('label', {for: 'additional_mentions'}, [ @@ -1656,16 +1656,16 @@ Serve.prototype.newGathering = function () { private ? ph('div', ph('textarea', { name: 'recps', placeholder: 'Recipients', title: 'Recipient IDs for private gathering', - cols: 70, style: 'font: monospace', + cols: 64, style: 'font: monospace', rows: Math.max(3, recps.length + 2), }, u.escapeHTML(recps.join('\n')) + '\n')) : recps ? ph('input', { type: 'hidden', name: 'recps', value: recps.join('\n') }) : null, ph('div', [ - ph('input', {name: 'title', size: 70, placeholder: 'Title', value: u.escapeHTML(title)}) + ph('input', {name: 'title', size: 64, placeholder: 'Title', value: u.escapeHTML(title)}) ]), ph('div', [ - ph('input', {name: 'location', size: 70, placeholder: 'Location', value: u.escapeHTML(location)}) + ph('input', {name: 'location', size: 64, placeholder: 'Location', value: u.escapeHTML(location)}) ]), ph('div', [ ph('input', {name: 'startDateTimeStr', value: u.escapeHTML(startDateTimeStr), @@ -1707,7 +1707,7 @@ Serve.prototype.newGathering = function () { ])), ph('div', ph('textarea', { name: 'description', placeholder: 'Description', - cols: 70, + cols: 64, rows: Math.max(5, u.rows(description)) }, u.escapeHTML(description))), ph('div', ph('label', {for: 'attending'}, [ @@ -4348,7 +4348,7 @@ Serve.prototype.composer = function (opts, cb) { h('input', {type: 'hidden', name: 'composer_id', value: opts.id}), opts.recps ? self.app.render.privateLine({recps: opts.recps, isAuthorRecp: true}, done()) : - opts.private ? h('div', h('input.wide', {name: 'recps', size: 70, + opts.private ? h('div', h('input.wide', {name: 'recps', size: 64, value: data.recps || '', placeholder: 'recipient ids'})) : '', channel != null ? h('div', '#', h('input', {name: 'channel', placeholder: 'channel', @@ -4361,14 +4361,14 @@ Serve.prototype.composer = function (opts, cb) { ) : '', closeIssueCheckbox(done()), mentionAttendeesCheckbox(done()), - h('div', h('input.wide', {name: 'content_warning', size: 70, + h('div', h('input.wide', {name: 'content_warning', size: 64, value: data.content_warning || '', placeholder: 'Content Warning'})), h('textarea', { id: opts.id, name: 'text', rows: Math.max(4, u.rows(data.text)), - cols: 70, + cols: 64, placeholder: opts.placeholder || 'public message', }, data.text || ''), unknownMentions.length > 0 ? [ -- cgit v1.2.3