<commit_before><div class="well2">
    <div class="box-header">
        {{module.name}}
    </div>
    <div class="box-content clearfix">

        <div class="settings-form lightblue-settings span6" ng-repeat="mSettings in moduleSettings">
            <h4 class="settings-section">
                {{mSettings.section}}
            </h4>
            <form id="settingsForm" class="inside form-vertical" action="api/settings/{{module.bundleId}}" method="post">
                <fieldset>
                    <div ng-repeat="setting in mSettings.settings | orderBy:'key'" class="form-group">
                        <label for="{{setting.key}}">{{setting.key}}</label>
                        <input class="form-control" type="text" id="{{setting.key}}" name="{{setting.key}}" ng-model="setting.value"/>
                    </div>

                    <div class="form-group">
                        <input type="hidden" name="section" value="{{mSettings.section}}" />
                        <input type="button" class="btn btn-primary" ng-click="saveSettings(mSettings)" value="{{msg('admin.submit')}}"/>
                        <input type="button" class="btn btn-primary" ng-click="saveSettings(mSettings, true)" value="{{msg('admin.submitAndRestart')}}"/>
                    </div>
                </fieldset>
            </form>
        </div>
        <div class="clearfix"></div>

        <div class="col-sm-10 col-md-8" ng-repeat="rawFile in rawFiles">
            <h4 class="settings-section">{{rawFile}}</h4>
            <div class="clearfix">
                <form class="form-horizontal inside" id="_raw_{{rawFile}}" action="../admin/api/settings/{{module.bundleId}}/raw"
                      method="post" enctype="multipart/form-data">
                    <div class="form-group fileupload fileupload-new" data-provides="fileupload">
                        <label class="control-label col-sm-3 col-md-2">{{msg('admin.button.selectFile')}}</label>
                        <div class="col-sm-9 col-md-10">
                            <div class="form-control input-auto input-xlarge uneditable-input fileupload-exists">
                                <span class="glyphicon glyphicon-file"></span>&nbsp;
                                <span class="fileupload-preview"></span>
                            </div>
                            <span class="btn btn-default btn-file">
                                <span class="fileupload-new">{{msg('admin.button.selectFile')}}</span>
                                <span class="fileupload-exists">{{msg('admin.button.changeFile')}}</span>
                                <input type="file" id="bundleSettings" name="file" class="input-file"/>
                            </span>
                            <a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload"><i class="fa fa-fw fa-trash-o"></i>&nbsp;{{msg('admin.button.remove')}}</a>
                            <input type="hidden" value="{{rawFile}}" name="filename" />
                        </div>
                    </div>
                    <div class="form-group">
                        <span class="col-sm-offset-3 col-md-offset-2 col-sm-9 col-md-10">
                            <span class="btn btn-default" ng-click="uploadRaw(rawFile)">{{msg('admin.submit')}}</span>
                            <span class="btn btn-default" ng-click="uploadRaw(rawFile, true)">{{msg('admin.submitAndRestart')}}</span>
                        </span>
                    </div>
                </form>
            </div>
        </div>

    </div>
</div>
<commit_msg>MOTECH-2258: Fixed HTTP-500 when submitting json-file in module settings<commit_after><div class="well2">
    <div class="box-header">
        {{module.name}}
    </div>
    <div class="box-content clearfix">

        <div class="settings-form lightblue-settings span6" ng-repeat="mSettings in moduleSettings">
            <h4 class="settings-section">
                {{mSettings.section}}
            </h4>
            <form id="settingsForm" class="inside form-vertical" action="{{'api/settings/' + module.bundleId}}" method="post">
                <fieldset>
                    <div ng-repeat="setting in mSettings.settings | orderBy:'key'" class="form-group">
                        <label for="{{setting.key}}">{{setting.key}}</label>
                        <input class="form-control" type="text" id="{{setting.key}}" name="{{setting.key}}" ng-model="setting.value"/>
                    </div>

                    <div class="form-group">
                        <input type="hidden" name="section" value="{{mSettings.section}}" />
                        <input type="button" class="btn btn-primary" ng-click="saveSettings(mSettings)" value="{{msg('admin.submit')}}"/>
                        <input type="button" class="btn btn-primary" ng-click="saveSettings(mSettings, true)" value="{{msg('admin.submitAndRestart')}}"/>
                    </div>
                </fieldset>
            </form>
        </div>
        <div class="clearfix"></div>

        <div class="col-sm-10 col-md-8" ng-repeat="rawFile in rawFiles">
            <h4 class="settings-section">{{rawFile}}</h4>
            <div class="clearfix">
                <form id="_raw_{{rawFile}}" class="inside form-horizontal" action="{{'../admin/api/settings/' + module.bundleId + '/raw'}}"
                      method="post" enctype="multipart/form-data">
                    <div class="form-group fileupload fileupload-new" data-provides="fileupload">
                        <label class="control-label col-sm-3 col-md-2">{{msg('admin.button.selectFile')}}</label>
                        <div class="col-sm-9 col-md-10">
                            <div class="form-control input-auto input-xlarge uneditable-input fileupload-exists">
                                <span class="glyphicon glyphicon-file"></span>&nbsp;
                                <span class="fileupload-preview"></span>
                            </div>
                            <span class="btn btn-default btn-file">
                                <span class="fileupload-new">{{msg('admin.button.selectFile')}}</span>
                                <span class="fileupload-exists">{{msg('admin.button.changeFile')}}</span>
                                <input type="file" id="bundleSettings" name="file" class="input-file"/>
                            </span>
                            <a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload"><i class="fa fa-fw fa-trash-o"></i>&nbsp;{{msg('admin.button.remove')}}</a>
                            <input type="hidden" value="{{rawFile}}" name="filename" />
                        </div>
                    </div>
                    <div class="form-group">
                        <span class="col-sm-offset-3 col-md-offset-2 col-sm-9 col-md-10">
                            <span class="btn btn-default" ng-click="uploadRaw(rawFile)">{{msg('admin.submit')}}</span>
                            <span class="btn btn-default" ng-click="uploadRaw(rawFile, true)">{{msg('admin.submitAndRestart')}}</span>
                        </span>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.16771804717498628, 'fraction_numerical': 0.0061711464618760285, 'mean_word_length': 1.7071269487750558, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4264829', 'n_tokens_mistral': 2000, 'n_tokens_neox': 1885, 'n_words': 331}