Updating filesize in file page too.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 21 Feb 2019 15:43:09 +0000 (10:43 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 21 Feb 2019 15:43:09 +0000 (10:43 -0500)
Looks like they need to be the same for the limit to work.

views/admin/member/memberInfo/editFiles.html

index 253b784..c0dcce4 100644 (file)
+{* Smarty Template for the Edit MemberInfo Files tab *}
 <div id="glm-table-files" class="glm-admin-table glm-admin-table-outer glm-hidden glm-member-info-table">
     <h2>Files</h2>
-    
+
     <div class="glm-admin-table glm-admin-table-inner-wrapper glm-small-12 glm-medium-8">
         <div class="glm-row glm-admin-table glm-admin-table-inner">
             <div class="glm-item-container glm-filesContainer">
                 {if $memberInfoID}
-                <input type="hidden" id="filePositionOrder" name="filePositionOrder"
-                                                               value="{if $haveFiles}{foreach $files as $i name=ig}{if $i.file_name}{$i.id}{if not $smarty.foreach.ig.last},{/if}{/if}{/foreach}{/if}" />
-                <div class="glm-fileDropContainer">
-                    <!-- All fields with class "glm-fileDrop" are automatically processed by imageUpload.js -->
-                    <div class="glm-fileDrop glm-fileItemHidden"
-                         data-refType="{$ref_type_numb.MemberInfo}"
-                         data-recordID="{$memberInfo.fieldData.id}"
-                         data-maxFileSizeKB="2500"
-                         data-allowedTypes="application/pdf,application/msword,image/jpeg,image/png,image/gif,image/x-ms-bmp"
-                         >
-                         <!-- The contents of this div are read by imageUpload.js to use for display of upload progress. -->
-                        <div class="glm-fileUploadStatusTemplate glm-fileItemHidden">
+                    <input type="hidden" id="filePositionOrder" name="filePositionOrder"
+                        value="{if $haveFiles}{foreach $files as $i name=ig}{if $i.file_name}{$i.id}{if not $smarty.foreach.ig.last},{/if}{/if}{/foreach}{/if}" />
+                    <div class="glm-fileDropContainer">
+                        {* All fields with class "glm-fileDrop" are automatically processed by imageUpload.js *}
+                        <div class="glm-fileDrop glm-fileItemHidden"
+                             data-refType="{$ref_type_numb.MemberInfo}"
+                             data-recordID="{$memberInfo.fieldData.id}"
+                             data-maxFileSizeKB="10000"
+                             data-allowedTypes="application/pdf,application/msword,image/jpeg,image/png,image/gif,image/x-ms-bmp"
+                             >
+                             {* The contents of this div are read by imageUpload.js to use for display of upload progress. *}
+                            <div class="glm-fileUploadStatusTemplate glm-fileItemHidden">
 
-                            <!-- Start of upload status pop-up template - Parameters are of the form "[name]" -->
-                            <b><u>Uploading File { thisFile } of { numbFiles }</u></b>
-                            <table class="glm-statusTable">
-                                <div class="glm-row">
-                                    <div style="float: right; margin: .2em .2em 0 0;" id="fileUploadCancel" class="button button-primary glm-right">Cancel Upload</div>
-                                    <div class="glm-statusFileTD" rowspan="5">
-                                        <div class="glm-statusFileContainer">
+                                {* Start of upload status pop-up template - Parameters are of the form "[name]" *}
+                                <b><u>Uploading File { thisFile } of { numbFiles }</u></b>
+                                <table class="glm-statusTable">
+                                    <div class="glm-row">
+                                        <div style="float: right; margin: .2em .2em 0 0;" id="fileUploadCancel" class="button button-primary glm-right">Cancel Upload</div>
+                                        <div class="glm-statusFileTD" rowspan="5">
+                                            <div class="glm-statusFileContainer">
+                                            </div>
                                         </div>
                                     </div>
-                                </div>
-                                <div class="glm-row">
-                                    <div class="glm-statusPrompt">Name: </div><div class="glm-statusValue">{ fileName }</div>
-                                </div>
-                                <div class="glm-row"><div class="glm-statusPrompt">Type: </div><div class="glm-statusValue">{ fileType }</div></div>
-                                <div class="glm-row"><div class="glm-statusPrompt">Size: </div><div class="glm-statusValue">{ fileSize }</div></div>
-                                <div class="glm-row"><div class="glm-statusPrompt">Progress: </div><div class="glm-statusValue glm-progressBarWrapper"><div class="glm-progressBarContainer"><div class="glm-progressBar"></div></div></div></div>
-                            </table>
-                            <!-- End of template -->
+                                    <div class="glm-row">
+                                        <div class="glm-statusPrompt">Name: </div><div class="glm-statusValue">{ fileName }</div>
+                                    </div>
+                                    <div class="glm-row"><div class="glm-statusPrompt">Type: </div><div class="glm-statusValue">{ fileType }</div></div>
+                                    <div class="glm-row"><div class="glm-statusPrompt">Size: </div><div class="glm-statusValue">{ fileSize }</div></div>
+                                    <div class="glm-row"><div class="glm-statusPrompt">Progress: </div><div class="glm-statusValue glm-progressBarWrapper"><div class="glm-progressBarContainer"><div class="glm-progressBar"></div></div></div></div>
+                                </table>
+                                {* End of template *}
 
-                        </div>
-                        <!-- The contents of this div are read by imageUpload.js to use as a template for inserting a new file into the gallery area -->
-                        <div class="glm-fileDataTemplate glm-fileItemHidden">
+                            </div>
+                            {* The contents of this div are read by imageUpload.js to use as a template for inserting a new file into the gallery area *}
+                            <div class="glm-fileDataTemplate glm-fileItemHidden">
 
-                            <!--
-                                Start of new files template.
-                                Parameters are of the form "{ name }" where the spaces are required to avoid Smarty interpreting the parameters.
-                                Note that these input fields are disabled to avoid the template fields being submitted. The imageUpload.js
-                                code enables the fields when it replicates the template for a new files.
-                            -->
-                            <li id="{ id }" class="glm-galleryContainer">
-                                <div class="glm-file glm-small-12 glm-large-6 glm-left">
-                                    <a target="_blank" href="{$glmPluginMediaUrl}/files/{ filename }">{ file_name }</a>
-                                </div>
-                                <div class="glm-fileData glm-small-12 glm-large-4 glm-left">
-                                    <div class="glm-statusTable">
-                                        <h4>File Name:</h4>
-                                        <div><input id="file_caption_{ id }" type="text" name="file_caption[{ id }]" value="" class="glm-form-text-input-small" disabled></div>
+                                {*
+                                    Start of new files template.
+                                    Parameters are of the form "{ name }" where the spaces are required to avoid Smarty interpreting the parameters.
+                                    Note that these input fields are disabled to avoid the template fields being submitted. The imageUpload.js
+                                    code enables the fields when it replicates the template for a new files.
+                                *}
+                                <li id="{ id }" class="glm-galleryContainer">
+                                    <div class="glm-file glm-small-12 glm-large-6 glm-left">
+                                        <a target="_blank" href="{$glmPluginMediaUrl}/files/{ filename }">{ file_name }</a>
                                     </div>
-                                </div>
-                                <div class="glm-fileDeleteButton glm-small-12 glm-large-2 glm-right">
-                                    <div>
-                                        <div><h4 class="glm-notice" style="font-size: 12px; color: #F18004; margin: -4px 0 4px;">New Upload</h4></div>
-                                        <div><h4>Delete:</h4><div><input type="checkbox" name="file_delete[{ id }]" disabled></div></div>
+                                    <div class="glm-fileData glm-small-12 glm-large-4 glm-left">
+                                        <div class="glm-statusTable">
+                                            <h4>File Name:</h4>
+                                            <div><input id="file_caption_{ id }" type="text" name="file_caption[{ id }]" value="" class="glm-form-text-input-small" disabled></div>
+                                        </div>
                                     </div>
-                                    <input type="hidden" name="file_position[{ id }]" value="">
-                                </div>
-                            </li>
-                            <!-- End of template -->
+                                    <div class="glm-fileDeleteButton glm-small-12 glm-large-2 glm-right">
+                                        <div>
+                                            <div><h4 class="glm-notice" style="font-size: 12px; color: #F18004; margin: -4px 0 4px;">New Upload</h4></div>
+                                            <div><h4>Delete:</h4><div><input type="checkbox" name="file_delete[{ id }]" disabled></div></div>
+                                        </div>
+                                        <input type="hidden" name="file_position[{ id }]" value="">
+                                    </div>
+                                </li>
+                                {* End of template *}
 
-                        </div>
-                    </div> <!-- Overlay of parent for drag/drop detection -->
-                    <div class="glm-fileUploadStatus glm-fileItemHidden"></div> <!-- Overlay for Upload Status Bars -->
-                    <div class="glm-fileDropText glm-fileItemHidden">Drag and drop new files here</div>
-                    <div class="glm-noFileDropText glm-fileItemHidden">HTML5 file drag-and-drop not supported by your browser.<br>Use "Browse" button above to upload an file.</div>
-                </div>
-                <ul class="glm-galleryFiles">
-                    <!-- Note that id in li is needed for sorting -->
-                    {if $haveFiles}
-                    {foreach $files as $i}
-                    {if $i.file_name}
-                    <li id="{$i.id}" class="glm-galleryContainer">
-                        <div class="glm-file glm-small-12 glm-large-6 glm-left" data-id="{$i.id}">
-                            <a target="_blank" href="{$glmPluginMediaUrl}/files/{$i.file_name}">{$i.name}</a>
-                        </div>
-                        <div class="glm-fileData glm-small-12 glm-large-4 glm-left">
-                            <div class="glm-statusTable">
-                                <h4>File Name:</h4>
-                                <div><input id="file_caption_{$i.id}" type="text" name="file_caption[{$i.id}]" value="{$i.caption}" class="glm-form-text-input-small"></div>
                             </div>
-                        </div>
-                        <div class="glm-fileDeleteButton glm-small-12 glm-large-2 glm-right">
-                            <div>
-                                <div><h4>Delete:</h4><div><input type="checkbox" name="file_delete[{$i.id}]"></div></div>
+                        </div> {* Overlay of parent for drag/drop detection *}
+                        <div class="glm-fileUploadStatus glm-fileItemHidden"></div> {* Overlay for Upload Status Bars *}
+                        <div class="glm-fileDropText glm-fileItemHidden">Drag and drop new files here</div>
+                        <div class="glm-noFileDropText glm-fileItemHidden">HTML5 file drag-and-drop not supported by your browser.<br>Use "Browse" button above to upload an file.</div>
+                    </div>
+                    <ul class="glm-galleryFiles">
+                        {* Note that id in li is needed for sorting *}
+                        {if $haveFiles}
+                        {foreach $files as $i}
+                        {if $i.file_name}
+                        <li id="{$i.id}" class="glm-galleryContainer">
+                            <div class="glm-file glm-small-12 glm-large-6 glm-left" data-id="{$i.id}">
+                                <a target="_blank" href="{$glmPluginMediaUrl}/files/{$i.file_name}">{$i.name}</a>
                             </div>
-                            <input type="hidden" name="file_position[{$i.id}]" value="{$i.position}">
-                        </div>
-                        {/if}
-                    </li>
+                            <div class="glm-fileData glm-small-12 glm-large-4 glm-left">
+                                <div class="glm-statusTable">
+                                    <h4>File Name:</h4>
+                                    <div><input id="file_caption_{$i.id}" type="text" name="file_caption[{$i.id}]" value="{$i.caption}" class="glm-form-text-input-small"></div>
+                                </div>
+                            </div>
+                            <div class="glm-fileDeleteButton glm-small-12 glm-large-2 glm-right">
+                                <div>
+                                    <div><h4>Delete:</h4><div><input type="checkbox" name="file_delete[{$i.id}]"></div></div>
+                                </div>
+                                <input type="hidden" name="file_position[{$i.id}]" value="{$i.position}">
+                            </div>
+                            {/if}
+                        </li>
 
-                    {/foreach}
-                    {/if}
-                </ul>
-                {else}
-                <b>Note:</b> Files may only be added to {$terms.term_member} profile records that have been created.
-                You are editing information to create a new record.
-                <br>After you click "Add new {$terms.term_member}" below, you may come back here to add files.
+                        {/foreach}
+                        {/if}
+                    </ul>
+                    {else}
+                    <b>Note:</b> Files may only be added to {$terms.term_member} profile records that have been created.
+                    You are editing information to create a new record.
+                    <br>After you click "Add new {$terms.term_member}" below, you may come back here to add files.
                 {/if}
             </div>
         </div>