Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.1] Template Override switches #111

Closed
joomlapl-bot opened this issue Jan 6, 2022 · 0 comments
Closed

[4.1] Template Override switches #111

joomlapl-bot opened this issue Jan 6, 2022 · 0 comments

Comments

@joomlapl-bot
Copy link
Collaborator

PR w związku ze zmianą oryginału joomla/joomla-cms#36366 Poniżej zmiany w oryginale:

Click to expand the diff!
diff --git a/administrator/components/com_templates/forms/source.xml b/administrator/components/com_templates/forms/source.xml
index 07e78c88dabd..ab8636636ff9 100644
--- a/administrator/components/com_templates/forms/source.xml
+++ b/administrator/components/com_templates/forms/source.xml
@@ -39,21 +39,23 @@
 		<field
 			name="show_core"
 			type="radio"
+			label="COM_TEMPLATES_LAYOUTS_DIFFVIEW_CORE"
 			layout="joomla.form.field.radio.switcher"
 			default="0"
 			>
-			<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"
 			>
-			<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>
diff --git a/administrator/components/com_templates/tmpl/template/default.php b/administrator/components/com_templates/tmpl/template/default.php
index 3cd903272c80..a1157149446c 100644
--- a/administrator/components/com_templates/tmpl/template/default.php
+++ b/administrator/components/com_templates/tmpl/template/default.php
@@ -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; ?>
diff --git a/administrator/language/en-GB/com_templates.ini b/administrator/language/en-GB/com_templates.ini
index e0b5094a4d69..1b2211b71069 100644
--- a/administrator/language/en-GB/com_templates.ini
+++ b/administrator/language/en-GB/com_templates.ini
@@ -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"
diff --git a/build/media_source/com_templates/css/admin-templates-default.css b/build/media_source/com_templates/css/admin-templates-default.css
index 5f930753fff3..a92aa1935c07 100644
--- a/build/media_source/com_templates/css/admin-templates-default.css
+++ b/build/media_source/com_templates/css/admin-templates-default.css
@@ -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;
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants