Skip to content

Commit

Permalink
[FEATURE] Show a note instead of an empty origin selection if there a…
Browse files Browse the repository at this point in the history
…re no pages of type newsletter
  • Loading branch information
einpraegsam committed Dec 6, 2024
1 parent 76b6655 commit 12a0cef
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Resources/Private/Language/de.locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@
<source>Please select a newsletter page that should be parsed and then sent</source>
<target state="translated">Bitte wähle eine Newsletterseite aus, die geparst und anschließend versendet werden soll</target>
</trans-unit>
<trans-unit id="module.newsletter.new.field.origin.nonewsletters">
<source>Please first create a page of the type "Newsletter" in the page tree.</source>
<target state="translated">Bitte zuerst eine Seite vom Typ "Newsletter" im Seitenbaum anlegen.</target>
</trans-unit>
<trans-unit id="module.newsletter.new.field.testmail">
<source>Send a test mail to yourself</source>
<target state="translated">Newsletter testweise versenden</target>
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@
<trans-unit id="module.newsletter.new.field.receiver.description_alternative">
<source>Note: Recipient lists that have already been created cannot be changed later.</source>
</trans-unit>
<trans-unit id="module.newsletter.new.field.origin.nonewsletters">
<source>Please first create a page of the type "Newsletter" in the page tree.</source>
</trans-unit>
<trans-unit id="module.newsletter.new.field.configuration">
<source>Sender</source>
</trans-unit>
Expand Down
32 changes: 21 additions & 11 deletions Resources/Private/Partials/Newsletter/FormFields.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,27 @@
</label>
<luxletter:condition.isMultiLanguageModeActivated>
<f:then>
<f:form.select
class="form-control form-select input-lg"
property="origin"
id="origin"
options="{newsletterpages}"
data="{luxletter-mandatory:'1',luxletter-wizardpreviewevent:'newsletter'}"
prependOptionValue=""
prependOptionLabel="Please choose..."/>
<span class="help-block">
<f:translate key="module.newsletter.new.field.origin.description_alternative">Choose an origin</f:translate>
</span>
<f:if condition="{newsletterpages}">
<f:then>
<f:form.select
class="form-control form-select input-lg"
property="origin"
id="origin"
options="{newsletterpages}"
data="{luxletter-mandatory:'1',luxletter-wizardpreviewevent:'newsletter'}"
prependOptionValue=""
prependOptionLabel="Please choose..."/>
<span class="help-block">
<f:translate key="module.newsletter.new.field.origin.description_alternative">Choose an origin</f:translate>
</span>
</f:then>
<f:else>
<p class="alert alert-primary">
<f:translate key="module.newsletter.new.field.origin.nonewsletters">No newsletter pages</f:translate>
</p>
</f:else>
</f:if>

</f:then>
<f:else>
<f:form.textfield
Expand Down

0 comments on commit 12a0cef

Please sign in to comment.