fix uploading design file
This commit is contained in:
parent
d2bb119c4d
commit
b300359423
2 changed files with 52 additions and 31 deletions
|
@ -303,7 +303,7 @@ public class AdminDesignAction extends FessAdminAction implements Serializable {
|
|||
// ============
|
||||
|
||||
private HtmlResponse asListHtml() {
|
||||
return asHtml(path_AdminDesign_AdminDesignJsp);
|
||||
return asHtml(path_AdminDesign_AdminDesignJsp).useForm(DesignForm.class);
|
||||
}
|
||||
|
||||
private HtmlResponse asEditHtml() {
|
||||
|
|
|
@ -13,18 +13,13 @@
|
|||
<jsp:param name="menuCategoryType" value="system" />
|
||||
<jsp:param name="menuType" value="design" />
|
||||
</jsp:include>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<%-- Content Header --%>
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<la:message key="labels.design_configuration" />
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<la:info id="msg" message="true">
|
||||
|
@ -35,25 +30,13 @@
|
|||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<la:form action="/admin/design/">
|
||||
<%-- Box Header --%>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<la:message key="labels.design_title_file" />
|
||||
</h3>
|
||||
</div>
|
||||
<%-- Box Body --%>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<script>
|
||||
<!--
|
||||
function confirmToDelete() {
|
||||
if (confirm('<la:message key="labels.design_delete_confirmation"/>')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="form-group">
|
||||
<la:select property="fileName" styleClass="form-control">
|
||||
<c:forEach var="item" varStatus="s" items="${fileNameItems}">
|
||||
|
@ -62,29 +45,64 @@
|
|||
</la:select>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Box Footer --%>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary" name="download"
|
||||
value="<la:message key="labels.design_download_button" />">
|
||||
<la:message key="labels.design_download_button" />
|
||||
</button>
|
||||
<button type="submit" class="btn btn-danger" name="delete"
|
||||
value="<la:message key="labels.design_delete_button" />"
|
||||
onclick="return confirmToDelete();">
|
||||
<button type="button" class="btn btn-danger" name="delete"
|
||||
data-toggle="modal" data-target="#confirmToDelete"
|
||||
value="<la:message key="labels.design_delete_button" />">
|
||||
<i class="fa fa-trash"></i>
|
||||
<la:message key="labels.design_delete_button" />
|
||||
</button>
|
||||
<div class="modal modal-danger fade" id="confirmToDelete"
|
||||
tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">
|
||||
<la:message key="labels.crud_title_delete" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<la:message key="labels.crud_delete_confirmation" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline pull-left"
|
||||
data-dismiss="modal">
|
||||
<la:message key="labels.crud_button_cancel" />
|
||||
</button>
|
||||
<button type="submit" class="btn btn-outline btn-danger"
|
||||
name="delete"
|
||||
value="<la:message key="labels.crud_button_delete" />">
|
||||
<i class="fa fa-trash"></i>
|
||||
<la:message key="labels.crud_button_delete" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</la:form>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
<div class="box box-primary">
|
||||
<la:form action="/admin/design/">
|
||||
<%-- Box Header --%>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<la:message key="labels.design_file_title_edit" />
|
||||
</h3>
|
||||
</div>
|
||||
<%-- Box Body --%>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<la:select property="fileName" styleClass="form-control">
|
||||
|
@ -137,7 +155,7 @@
|
|||
</la:select>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Box Footer --%>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-warning" name="edit"
|
||||
value="<la:message key="labels.design_edit_button" />">
|
||||
|
@ -149,19 +167,21 @@
|
|||
<la:message key="labels.design_use_default_button" />
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</la:form>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<la:form action="/admin/design/" enctype="multipart/form-data">
|
||||
<%-- Box Header --%>
|
||||
<la:form action="/admin/design/upload/"
|
||||
enctype="multipart/form-data">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<la:message key="labels.design_title_file_upload" />
|
||||
</h3>
|
||||
</div>
|
||||
<%-- Box Body --%>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="form-group row">
|
||||
<label for="searchParams.url"
|
||||
|
@ -180,18 +200,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Box Footer --%>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-success" name="upload"
|
||||
value="<la:message key="labels.design_button_upload" />">
|
||||
<la:message key="labels.design_button_upload" />
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</la:form>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<jsp:include page="/WEB-INF/view/common/admin/footer.jsp"></jsp:include>
|
||||
|
|
Loading…
Add table
Reference in a new issue