[Posting][CSS] Fix for qtwebengine and gecko not displaying background color on input elements.

Minor bug fixes.
This commit is contained in:
Eliseu Amaro 2021-09-20 12:34:28 +01:00
parent 67d62cf37b
commit baeb1dde7a
3 changed files with 38 additions and 24 deletions

View File

@ -25,6 +25,7 @@ use App\Core\Cache;
use App\Core\DB\DB;
use App\Core\Event;
use App\Core\Form;
use App\Core\GSFile;
use function App\Core\I18n\_m;
use App\Core\Modules\Component;
use App\Entity\Actor;
@ -159,7 +160,7 @@ class Posting extends Component
if ($processed_attachments != []) {
foreach ($processed_attachments as [$a, $fname]) {
if (DB::count('actor_to_attachment', $args = ['attachment_id' => $a->getId(), 'actor_id' => $args['actor_id']]) === 0) {
if (DB::count('actor_to_attachment', $args = ['attachment_id' => $a->getId(), 'actor_id' => $actor->getId()]) === 0) {
DB::persist(ActorToAttachment::create($args));
}
DB::persist(AttachmentToNote::create(['attachment_id' => $a->getId(), 'note_id' => $note->getId(), 'title' => $fname]));

View File

@ -568,10 +568,10 @@ label, button {
select,
button,
textarea,
input:not([type=checkbox], [type=radio]) {
input {
font-size: inherit !important;
color: var(--white);
padding: 4px 8px;
padding: 2px 8px;
border: 2px solid var(--bg2);
border-radius: var(--unit-size);
background-color: var(--translucent);
@ -579,7 +579,8 @@ input:not([type=checkbox], [type=radio]) {
button {
background: var(--bg-button);
padding: 4px 8px;
padding: 2px 8px;
margin-left: auto;
}
select {
@ -601,6 +602,13 @@ input[type=radio] {
}
input[type=checkbox] {
all: unset;
display: inline-block;
width: var(--medium-size);
height: var(--medium-size);
vertical-align: middle;
background-color: var(--bg2) !important;
background-size: cover;
margin-right: 2px;

View File

@ -6,35 +6,39 @@
<aside class="panel-content accessibility-target">
{% set post_form = handle_event('AppendRightPostingBlock', {'request': request}) %}
<section class="section-widget" title={{ 'Create a new note.' | trans }}>
<details class="section-title-details" title={{ 'Expand if you want to access more options.' | trans }}>
<summary class="section-title-summary">
{{ "Create a note" | trans }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}
</summary>
</details>
{% if post_form is defined %}
<section class="section-widget" title={{ 'Create a new note.' | trans }}>
<details class="section-title-details" title={{ 'Expand if you want to access more options.' | trans }}>
<summary class="section-title-summary">
{{ "Create a note" | trans }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}
</summary>
</details>
<div class="section-form">
<fieldset>
{{ form_start(post_form) }}
<div class="section-form">
<fieldset>
{{ form_start(post_form) }}
{{ form_row(post_form.to, {'attr': {'class': 'section-form-scope'}}) }}
{{ form_row(post_form.to, {'attr': {'class': 'section-form-scope'}}) }}
{{ form_row(post_form.visibility, {'attr': {'class': 'section-form-scope'}}) }}
{{ form_row(post_form.visibility, {'attr': {'class': 'section-form-scope'}}) }}
{{ form_row(post_form.content, {'attr': {'class': 'section-form-textarea'}}) }}
{{ form_row(post_form.content, {'attr': {'class': 'section-form-textarea'}}) }}
<label for="{{ post_form.attachments.vars.id }}" class="section-form-options">
{{ form_widget(post_form.attachments) }}
</label>
<label for="{{ post_form.attachments.vars.id }}" class="section-form-options">
{{ form_widget(post_form.attachments) }}
</label>
{{ form_row(post_form.post_note, {'attr': {'class': 'section-form-send'}}) }}
{{ form_row(post_form.post_note, {'attr': {'class': 'section-form-send'}}) }}
{{ form_end(post_form) }}
</fieldset>
</div>
</section>
{{ form_end(post_form) }}
</fieldset>
</div>
</section>
{% endif %}
{% set current_path = app.request.get('_route') %}
{% if right_panel_vars is defined %}
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars}) %}
{{ block | raw }}
@ -44,5 +48,6 @@
{{ block | raw }}
{% endfor %}
{% endif %}
</aside>
</div>