add render info and minor fix
This commit is contained in:
parent
134146868a
commit
938a21425c
2 changed files with 12 additions and 6 deletions
|
@ -43,7 +43,7 @@ import org.lastaflute.web.response.render.RenderData;
|
|||
import org.lastaflute.web.util.LaRequestUtil;
|
||||
|
||||
/**
|
||||
* @author codelibs
|
||||
* @author shinsuke
|
||||
* @author Keiichi Watanabe
|
||||
*/
|
||||
public class AdminDataconfigAction extends FessAdminAction {
|
||||
|
@ -137,7 +137,6 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
@Execute
|
||||
//(token = TxToken.SAVE)
|
||||
public HtmlResponse edit(final EditForm form) {
|
||||
validate(form, messages -> {}, () -> asListHtml());
|
||||
final String id = form.id;
|
||||
|
@ -146,13 +145,20 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
}).orElse(() -> {
|
||||
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id), () -> asListHtml());
|
||||
});
|
||||
saveToken();
|
||||
if (form.crudMode.intValue() == CrudMode.EDIT) {
|
||||
// back
|
||||
form.crudMode = CrudMode.DETAILS;
|
||||
return asDetailsHtml();
|
||||
return asDetailsHtml().renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
registerHandlerNames(data);
|
||||
});
|
||||
} else {
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
return asEditHtml();
|
||||
return asEditHtml().renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
registerHandlerNames(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><la:message key="labels.name" /></th>
|
||||
<th><la:message key="labels.available" /></th>
|
||||
<th class="col-md-8"><la:message key="labels.name" /></th>
|
||||
<th class="col-md-4 text-center"><la:message key="labels.available" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
Loading…
Add table
Reference in a new issue