Restore backend survey publish and active controls
This commit is contained in:
@@ -59,6 +59,13 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
|
|||||||
'icon' => 'important.svg',
|
'icon' => 'important.svg',
|
||||||
'button_callback' => [SurveyDcaListener::class, 'generatePublishedWarningButton'],
|
'button_callback' => [SurveyDcaListener::class, 'generatePublishedWarningButton'],
|
||||||
],
|
],
|
||||||
|
'toggle' => [
|
||||||
|
'label' => &$GLOBALS['TL_LANG']['tl_survey']['toggleActive'],
|
||||||
|
'href' => 'act=toggle&field=isActive',
|
||||||
|
'icon' => 'visible.svg',
|
||||||
|
'primary' => true,
|
||||||
|
'showInHeader' => true,
|
||||||
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'href' => 'act=delete',
|
'href' => 'act=delete',
|
||||||
'icon' => 'delete.svg',
|
'icon' => 'delete.svg',
|
||||||
@@ -81,7 +88,7 @@ $GLOBALS['TL_DCA']['tl_survey'] = [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
'default' => '{title_legend},title,category,description;{assignment_legend},assignedMembers;{publishing_legend},isActive,isTemplate;{meta_legend},createdAt,updatedAt',
|
'default' => '{title_legend},title,category,description;{assignment_legend},assignedMembers;{publishing_legend},published,isActive,isTemplate;{meta_legend},createdAt,updatedAt',
|
||||||
],
|
],
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'id' => [
|
'id' => [
|
||||||
|
|||||||
@@ -413,29 +413,18 @@
|
|||||||
height: 2.2rem;
|
height: 2.2rem;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
border: 1px solid rgba(162, 168, 180, 0.62);
|
border: 1px solid rgba(162, 168, 180, 0.62);
|
||||||
background: rgba(162, 168, 180, 0.22);
|
background: #7f8793;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.18s ease, border-color 0.18s ease;
|
transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
|
||||||
}
|
|
||||||
|
|
||||||
.survey-visibility-dot__icon {
|
|
||||||
width: 0.9rem;
|
|
||||||
height: 0.9rem;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: #7f8793;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-visibility-dot.is-on {
|
.survey-visibility-dot.is-on {
|
||||||
background: rgba(0, 174, 151, 0.2);
|
|
||||||
border-color: rgba(0, 174, 151, 0.68);
|
|
||||||
}
|
|
||||||
|
|
||||||
.survey-visibility-dot.is-on .survey-visibility-dot__icon {
|
|
||||||
background: #0a8378;
|
background: #0a8378;
|
||||||
|
border-color: rgba(0, 174, 151, 0.68);
|
||||||
|
box-shadow: 0 0 0 0.18rem rgba(0, 174, 151, 0.14);
|
||||||
}
|
}
|
||||||
|
|
||||||
.survey-button-row {
|
.survey-button-row {
|
||||||
|
|||||||
@@ -94,9 +94,7 @@
|
|||||||
<input type="hidden" name="_survey_action" value="toggle-active">
|
<input type="hidden" name="_survey_action" value="toggle-active">
|
||||||
<input type="hidden" name="item_id" value="{{ survey.id }}">
|
<input type="hidden" name="item_id" value="{{ survey.id }}">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token('toggle-active-' ~ survey.id) }}">
|
<input type="hidden" name="_token" value="{{ csrf_token('toggle-active-' ~ survey.id) }}">
|
||||||
<button type="submit" class="survey-visibility-dot{{ survey.isActive ? ' is-on' : '' }}" title="{{ survey.isActive ? 'survey.edit.deactivate_survey'|trans : 'survey.edit.activate_survey'|trans }}" aria-label="{{ survey.isActive ? 'survey.edit.deactivate_survey'|trans : 'survey.edit.activate_survey'|trans }}">
|
<button type="submit" class="survey-visibility-dot{{ survey.isActive ? ' is-on' : '' }}" title="{{ survey.isActive ? 'survey.edit.deactivate_survey'|trans : 'survey.edit.activate_survey'|trans }}" aria-label="{{ survey.isActive ? 'survey.edit.deactivate_survey'|trans : 'survey.edit.activate_survey'|trans }}"></button>
|
||||||
<span class="survey-visibility-dot__icon" aria-hidden="true"></span>
|
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user