Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions administrator/components/com_templates/forms/source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,25 @@
<field
name="show_core"
type="radio"
label="COM_TEMPLATES_LAYOUTS_DIFFVIEW_CORE"
layout="joomla.form.field.radio.switcher"
default="0"
filter="boolean"
Copy link
Contributor

@sandewt sandewt Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a boolean ? Is this an appointment within Joomla ?

See https://www.php.net/manual/en/language.types.boolean.php

>
<option value="0">COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_CORE</option>
<option value="1">COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_CORE</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_diff"
type="radio"
label="COM_TEMPLATES_LAYOUTS_DIFFVIEW_DIFF"
layout="joomla.form.field.radio.switcher"
default="0"
filter="boolean"
>
<option value="0">COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_DIFF</option>
<option value="1">COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_DIFF</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<?php if ($this->type == 'file' && !empty($this->source->coreFile)) : ?>
<div class="col-md-4 text-end">
<div id="toggle-buttons">
<?php echo $this->form->getInput('show_core'); ?>
<?php echo $this->form->getInput('show_diff'); ?>
<?php echo $this->form->renderField('show_core'); ?>
<?php echo $this->form->renderField('show_diff'); ?>
</div>
</div>
<?php endif; ?>
Expand Down
6 changes: 2 additions & 4 deletions administrator/language/en-GB/com_templates.ini
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ COM_TEMPLATES_IMAGE_WIDTH="Width"
COM_TEMPLATES_INVALID_FILE_NAME="Invalid file name. Please choose a file name with a-z, A-Z, 0-9, - and _."
COM_TEMPLATES_INVALID_FILE_TYPE="File type not selected."
COM_TEMPLATES_INVALID_FOLDER_NAME="Invalid folder name. Please choose a folder name with a-z, A-Z, 0-9, - and _."
COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_CORE="Hide Original"
COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_DIFF="Hide Differences"
COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_CORE="Show Original"
COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_DIFF="Show Differences"
COM_TEMPLATES_LAYOUTS_DIFFVIEW_CORE="Original File"
COM_TEMPLATES_LAYOUTS_DIFFVIEW_DIFF="Differences"
COM_TEMPLATES_MANAGE_FOLDERS="Manage Folders"
COM_TEMPLATES_MANAGER_ADD_STYLE="Templates: Add Style"
COM_TEMPLATES_MANAGER_EDIT_STYLE="Templates: Edit Style"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@
background-color: #F0F0EE;
}

#jform_show_core {
display: inline;
}

#jform_show_diff {
display: inline;
margin-left: 3.5em;
}

.switcher-label-0, .switcher-label-1 {
white-space: nowrap;
}
Expand Down