mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:11:54 +00:00
Reskin: Fix #2133 - 'Submit' button is not working on Upload Client Document Page
This commit is contained in:
parent
4e15e5a58b
commit
61f9cdac97
@ -2,15 +2,14 @@
|
||||
mifosX.controllers = _.extend(module, {
|
||||
ClientDocumentController: function (scope, location, http, routeParams, API_VERSION, Upload, $rootScope) {
|
||||
scope.clientId = routeParams.clientId;
|
||||
scope.onFileSelect = function ($files) {
|
||||
scope.file = $files[0];
|
||||
scope.onFileSelect = function (files) {
|
||||
scope.formData.file = files[0];
|
||||
};
|
||||
|
||||
scope.submit = function () {
|
||||
Upload.upload({
|
||||
url: $rootScope.hostUrl + API_VERSION + '/clients/' + scope.clientId + '/documents',
|
||||
data: scope.formData,
|
||||
file: scope.file
|
||||
data: { name : scope.formData.name, description : scope.formData.description, file: scope.formData.file},
|
||||
}).then(function (data) {
|
||||
// to fix IE not refreshing the model
|
||||
if (!scope.$$phase) {
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class="required">*</span></label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input type="file" id="file" nv-file-select="onFileSelect($files)">
|
||||
<input type="file" id="file" ngf-select="onFileSelect($files)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user