[Posting][CSS] Right panel form render simplified.
This commit is contained in:
parent
3001f91918
commit
5249ccfc68
@ -82,10 +82,10 @@ class Posting extends Component
|
|||||||
|
|
||||||
$request = $vars['request'];
|
$request = $vars['request'];
|
||||||
$form_params = [
|
$form_params = [
|
||||||
|
['to', ChoiceType::class, ['label' => _m('To:'), 'multiple' => false, 'expanded' => false, 'choices' => $to_tags]],
|
||||||
|
['visibility', ChoiceType::class, ['label' => _m('Visibility:'), 'multiple' => false, 'expanded' => false, 'data' => 'public', 'choices' => [_m('Public') => 'public', _m('Instance') => 'instance', _m('Private') => 'private']]],
|
||||||
['content', TextareaType::class, ['label' => _m('Content:'), 'data' => $initial_content, 'attr' => ['placeholder' => _m($placeholder)]]],
|
['content', TextareaType::class, ['label' => _m('Content:'), 'data' => $initial_content, 'attr' => ['placeholder' => _m($placeholder)]]],
|
||||||
['attachments', FileType::class, ['label' => _m('Attachments:'), 'data' => null, 'multiple' => true, 'required' => false]],
|
['attachments', FileType::class, ['label' => _m('Attachments:'), 'data' => null, 'multiple' => true, 'required' => false]],
|
||||||
['visibility', ChoiceType::class, ['label' => _m('Visibility:'), 'multiple' => false, 'expanded' => false, 'data' => 'public', 'choices' => [_m('Public') => 'public', _m('Instance') => 'instance', _m('Private') => 'private']]],
|
|
||||||
['to', ChoiceType::class, ['label' => _m('To:'), 'multiple' => false, 'expanded' => false, 'choices' => $to_tags]],
|
|
||||||
];
|
];
|
||||||
if (count($available_content_types) > 1) {
|
if (count($available_content_types) > 1) {
|
||||||
$form_params[] = ['content_type', ChoiceType::class,
|
$form_params[] = ['content_type', ChoiceType::class,
|
||||||
|
@ -5,11 +5,6 @@ html {
|
|||||||
scroll-margin-top: 3rem;
|
scroll-margin-top: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
*:focus {
|
*:focus {
|
||||||
-webkit-box-shadow: inset 0 0 0 3px var(--bg3);
|
-webkit-box-shadow: inset 0 0 0 3px var(--bg3);
|
||||||
-moz-box-shadow: inset 0 0 0 3px var(--bg3);
|
-moz-box-shadow: inset 0 0 0 3px var(--bg3);
|
||||||
@ -483,7 +478,6 @@ hr {
|
|||||||
margin-bottom: var(--medium-size);
|
margin-bottom: var(--medium-size);
|
||||||
|
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
|
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,10 +551,6 @@ hr {
|
|||||||
font-size: var(--main-size);
|
font-size: var(--main-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-form-label {
|
|
||||||
margin-bottom: 1.62px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
all: unset;
|
all: unset;
|
||||||
|
|
||||||
@ -569,6 +559,11 @@ hr {
|
|||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-group textarea {
|
||||||
|
height: 7rem;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.help-block {
|
.help-block {
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
@ -593,24 +588,6 @@ hr {
|
|||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-form-options {
|
|
||||||
display: block !important;
|
|
||||||
margin-bottom: var(--unit-size);
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-form-textarea {
|
|
||||||
border-radius: var(--unit-size);
|
|
||||||
background-color: var(--translucent);
|
|
||||||
color: var(--white);
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
height: calc(6 * var(--main-size));
|
|
||||||
|
|
||||||
border: 2px solid transparent;
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PROFILE */
|
/* PROFILE */
|
||||||
.profile {
|
.profile {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -228,6 +228,8 @@ select,
|
|||||||
button,
|
button,
|
||||||
textarea,
|
textarea,
|
||||||
input {
|
input {
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
font-size: inherit !important;
|
font-size: inherit !important;
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
|
|
||||||
|
@ -21,25 +21,10 @@
|
|||||||
|
|
||||||
<div class="section-form">
|
<div class="section-form">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{ form_start(post_form) }}
|
{{ form(post_form) }}
|
||||||
|
|
||||||
{{ form_row(post_form.to, {'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'}}) }}
|
|
||||||
|
|
||||||
<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_end(post_form) }}
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set current_path = app.request.get('_route') %}
|
{% set current_path = app.request.get('_route') %}
|
||||||
|
Loading…
Reference in New Issue
Block a user