Commit ab28aa4c authored by Thomas Löffler's avatar Thomas Löffler

Merge branch '358-replace-placeholder-in-composer-package-with-directly-input' into 'develop'

Resolve "Replace placeholder in composer package with directly input"

Closes #358

See merge request !354
parents 2c8a70e0 e4e826de
Pipeline #4922 passed with stages
in 9 minutes and 16 seconds
......@@ -29,7 +29,7 @@
<f:translate key="tx_terfe2_domain_model_extension.composer_name" />
</label>
<div class="col-9">
<f:form.textfield class="form-control" id="composerName" property="composerName" value="{extension.composerName}" additionalAttributes="{placeholder:'{extension.lastVersion.composerName}'}" />
<f:form.textfield class="form-control" data="{composer: '{extension.lastVersion.composerName -> f:or(alternative: extension.composerName)}'}" id="composerName" property="composerName" value="" />
</div>
</div>
</f:if>
......
......@@ -40,10 +40,17 @@ jQuery(document).ready(function ($) {
var $packagistField = $("input[name='tx_terfe2_pi1[packagistConfirm]']");
var $composerNameInput = $(".js-composer-name-input");
var _composerNameField = $( "#composerName" );
$composerNameInput.toggle($packagistField.is( ":checked" ));
if (_composerNameField.val() === "") {
_composerNameField.val(_composerNameField.data( "composer" ))
}
$packagistField.click(function() {
$composerNameInput.toggle(this.checked);
if (_composerNameField.val() === "") {
_composerNameField.val(_composerNameField.data("composer"))
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment