Created js error alerts for newImage.ftl and replaceImage.ftl

These two links below generated error alerts
http://localhost:8080/vivo/uploadImages?action=edit
http://localhost:8080/vivo/uploadImages?entityUri=http%3A%2F%2Fvivo.mydomain.edu%2Findividual%2FXXX&action=edit
This commit is contained in:
mb863 2010-07-02 20:55:47 +00:00
parent 4a8ec20e66
commit bcd595ba5f
2 changed files with 19 additions and 4 deletions

View file

@ -2,12 +2,19 @@
<#-- Upload a replacement main image for an Individual. -->
${scripts.add("/js/imageUpload/validateUpload.js")}
${stylesheets.addFromTheme("/uploadImages.css")}
<#if errorMessage??>
<h2>${errorMessage}</h2>
<script type="text/javascript">
window.onload = load;
function load(){
alert("${errorMessage}");
}
</script>
</#if>
<div id="photoUploadContainer">
@ -17,9 +24,11 @@ ${stylesheets.addFromTheme("/uploadImages.css")}
<img src="${thumbnailUrl}" width="115" height="115" /> </div>
<div id="photoUploadForm">
<form action="${formAction}" enctype="multipart/form-data" method="post" onSubmit="return validate_upload_file(this)">
<label>Upload a photo <span> (JPEG, GIF or PNG. Max Size: 50 MB)</span></label>
<input type="file" name="datafile" size="30">
<input type="submit" value="Upload photo"> or <a href="${cancelUrl}">Cancel</a>
</form>
</div>
</div>
</div>

View file

@ -8,10 +8,16 @@ ${scripts.add("/js/imageUpload/validateUpload.js")}
${scripts.add("/js/imageUpload/confirmPhotoDeletion.js")}
${stylesheets.addFromTheme("/uploadImages.css")}
<#if errorMessage??>
<h2>${errorMessage}</h2>
<script type="text/javascript">
window.onload = load;
function load(){
alert("${errorMessage}");
}
</script>
</#if>
<div id="photoUploadContainer">
@ -27,4 +33,4 @@ ${stylesheets.addFromTheme("/uploadImages.css")}
<input type="submit" value="Upload photo"> or <a href="${cancelUrl}">Cancel</a>
</form>
</div>
</div>
</div>