32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-25 17:51:07 +00:00

Add images to the frontend edit view

This commit is contained in:
chmst 2021-08-10 16:05:04 +02:00
parent 5c0d9d9da5
commit 6bcda2fa50
4 changed files with 111 additions and 4 deletions

View File

@ -284,7 +284,6 @@
name="image_first"
type="media"
label="COM_WEBLINKS_FIELD_FIRST_LABEL"
description="COM_WEBLINKS_FIELD_FIRST_DESC"
/>
<field

View File

@ -102,6 +102,93 @@
/>
</fieldset>
<fields
name="images"
>
<fieldset
name="images"
label="JGLOBAL_FIELDSET_IMAGE_OPTIONS"
>
<field
name="image_first"
type="media"
label="COM_WEBLINKS_FIELD_FIRST_LABEL"
/>
<field
name="float_first"
type="list"
label="COM_WEBLINKS_FLOAT_FIRST_LABEL"
useglobal="true"
>
<option value="right">COM_WEBLINKS_RIGHT</option>
<option value="left">COM_WEBLINKS_LEFT</option>
<option value="none">COM_WEBLINKS_NONE</option>
</field>
<field
name="image_first_alt"
type="text"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL"
/>
<field
name="image_first_alt_empty"
type="checkbox"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_DESC"
/>
<field
name="image_first_caption"
type="text"
label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL"
/>
<field
name="spacer1"
type="spacer"
hr="true"
/>
<field
name="image_second"
type="media"
label="COM_WEBLINKS_FIELD_SECOND_LABEL"
/>
<field
name="float_second"
type="list"
label="COM_WEBLINKS_FLOAT_SECOND_LABEL"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="right">COM_WEBLINKS_RIGHT</option>
<option value="left">COM_WEBLINKS_LEFT</option>
<option value="none">COM_WEBLINKS_NONE</option>
</field>
<field
name="image_second_alt"
type="text"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_LABEL"
/>
<field
name="image_second_alt_empty"
type="checkbox"
label="COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_LABEL"
description="COM_WEBLINKS_FIELD_IMAGE_ALT_EMPTY_DESC"
/>
<field
name="image_second_caption"
type="text"
label="COM_WEBLINKS_FIELD_IMAGE_CAPTION_LABEL"
/>
</fieldset>
</fields>
<fields name="metadata">
<fieldset
name="jmetadata"

View File

@ -58,9 +58,18 @@ $params = $this->state->get('params');
<?php endif; ?>
<?php echo $this->form->renderField('language'); ?>
<?php echo $this->form->renderField('description'); ?>
<hr class="hr-condensed" />
<?php echo $this->form->renderField('image_first', 'images'); ?>
<?php echo $this->form->renderField('float_first', 'images'); ?>
<?php echo $this->form->renderField('image_first_alt', 'images'); ?>
<?php echo $this->form->renderField('float_first_alt_empty', 'images'); ?>
<?php echo $this->form->renderField('image_second', 'images'); ?>
<?php echo $this->form->renderField('float_second', 'images'); ?>
<?php echo $this->form->renderField('image_second_alt', 'images'); ?>
<?php echo $this->form->renderField('float_second_alt_empty', 'images'); ?>
<?php if ($captchaEnabled) : ?>
<div class="btn-group">
<?php echo $this->form->renderField('captcha'); ?>

View File

@ -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"