Skip to content

Commit

Permalink
Attributes - file upload, fixed problem with download button
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielŻuławski committed Aug 31, 2021
1 parent 91bcfde commit b250992
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions src/Web/Grand.Web/Views/Shared/_CheckoutAttributes.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@
</template>
<input class="hidden-upload-input" type="hidden" onchange="checkoutAttributeChange()" :id="'checkout_attribute_' + attribute.Id" :name="'checkout_attribute_' + attribute.Id" v-model="attribute.DefaultValue" :value="attribute.DefaultValue" />
<div id="download-message" class="alert my-2" style="display:none;"></div>
<div id="'checkout_attribute_' + attribute.Id + 'downloadurl'" class="download-file" style="display:none;">
<a class="btn btn-outline-info">
Download
</a>
</div>
<a :id="'checkout_attribute_' + attribute.Id + 'downloadurl'" class="download-file btn btn-outline-info" style="display:none;">
Download
</a>
<script asp-location="Footer">
function uploadFile(e) {
Expand Down Expand Up @@ -118,7 +116,7 @@
messageContainer.classList.add('alert-info');
messageContainer.innerText = message;
downloadBtn.style.display = "block";
downloadBtn.style.display = "inline-block";
downloadBtn.setAttribute('href', downloadUrl);
} else {
Expand Down
10 changes: 4 additions & 6 deletions src/Web/Grand.Web/Views/Shared/_ContactAttributes.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,9 @@
</template>
<input class="hidden-upload-input" type="hidden" onchange="contactAttributeChange()" id="@(controlId)" name="@(controlId)" />
<div id="download-message" class="alert my-2" style="display:none;"></div>
<div id="@(controlId)downloadurl'" class="download-file" style="display:none;">
<a class="btn btn-outline-info">
Download
</a>
</div>
<a id="@(controlId)downloadurl'" class="download-file btn btn-outline-info" style="display:none;">
Download
</a>
<script asp-location="Footer">
function uploadFile(e) {
var formData = new FormData();
Expand All @@ -162,7 +160,7 @@
messageContainer.classList.add('alert-info');
messageContainer.innerText = message;
downloadBtn.style.display = "block";
downloadBtn.style.display = "inline-block";
downloadBtn.setAttribute('href', downloadUrl);
} else {
Expand Down

0 comments on commit b250992

Please sign in to comment.