From 6bcda2fa50731bf92b19241f4b6c5df877d9dde4 Mon Sep 17 00:00:00 2001 From: chmst Date: Tue, 10 Aug 2021 16:05:04 +0200 Subject: [PATCH] Add images to the frontend edit view --- .../components/com_weblinks/forms/weblink.xml | 1 - src/components/com_weblinks/forms/weblink.xml | 87 +++++++++++++++++++ .../com_weblinks/tmpl/form/edit.php | 15 +++- src/language/en-GB/com_weblinks.ini | 12 +++ 4 files changed, 111 insertions(+), 4 deletions(-) diff --git a/src/administrator/components/com_weblinks/forms/weblink.xml b/src/administrator/components/com_weblinks/forms/weblink.xml index 2239251..4f07580 100644 --- a/src/administrator/components/com_weblinks/forms/weblink.xml +++ b/src/administrator/components/com_weblinks/forms/weblink.xml @@ -284,7 +284,6 @@ name="image_first" type="media" label="COM_WEBLINKS_FIELD_FIRST_LABEL" - description="COM_WEBLINKS_FIELD_FIRST_DESC" /> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
state->get('params'); form->renderField('language'); ?> form->renderField('description'); ?> - -
- + + form->renderField('image_first', 'images'); ?> + form->renderField('float_first', 'images'); ?> + form->renderField('image_first_alt', 'images'); ?> + form->renderField('float_first_alt_empty', 'images'); ?> + + form->renderField('image_second', 'images'); ?> + form->renderField('float_second', 'images'); ?> + form->renderField('image_second_alt', 'images'); ?> + form->renderField('float_second_alt_empty', 'images'); ?> + +
form->renderField('captcha'); ?> diff --git a/src/language/en-GB/com_weblinks.ini b/src/language/en-GB/com_weblinks.ini index 3843d83..f8550bc 100644 --- a/src/language/en-GB/com_weblinks.ini +++ b/src/language/en-GB/com_weblinks.ini @@ -18,11 +18,23 @@ COM_WEBLINKS_ERROR_WEBLINK_NOT_FOUND="Web Link not found." COM_WEBLINKS_ERROR_WEBLINK_URL_INVALID="Invalid Web link URL." COM_WEBLINKS_FIELD_CATEGORY_DESC="You must select a Category." COM_WEBLINKS_FIELD_DESCRIPTION_DESC="Enter a description for your Web link." +COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_DESC="Decorative Image - no description required" +COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_LABEL="No Description" +COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL="Alt Text" +COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL="Caption" +COM_WEBLINKS_FIELD_LANGUAGE_DESC="Assign a language to this web link." +COM_WEBLINKS_FIELD_MODIFIED_DESC="The date and time the link was last modified." +COM_WEBLINKS_FIELD_SECOND_DESC="The second image to be displayed." +COM_WEBLINKS_FIELD_SECOND_LABEL="Second Image" COM_WEBLINKS_FILTER_LABEL="Filter Field" COM_WEBLINKS_FILTER_SEARCH_DESC="Web Links filter search" COM_WEBLINKS_FIELD_TITLE_DESC="Your Web Link must have a Title." COM_WEBLINKS_FIELD_URL_DESC="You must enter a URL." COM_WEBLINKS_FIELD_URL_LABEL="URL" +COM_WEBLINKS_FLOAT_FIRST_DESC="Controls placement of the first image." +COM_WEBLINKS_FLOAT_FIRST_LABEL="First Image Float" +COM_WEBLINKS_FLOAT_SECOND_DESC="Controls placement of the second image." +COM_WEBLINKS_FLOAT_SECOND_LABEL="Second Image Float" COM_WEBLINKS_FORM_CREATE_WEBLINK="Submit a Web Link" COM_WEBLINKS_GRID_TITLE="Title" COM_WEBLINKS_LINK="Web Link"