<commit_before>var capturePhoto = (function(app) {
    "use strict";

    app.Views.OsmSelect = Backbone.Layout.extend({
        template: "#osm-selector-page",

        afterRender: function() {
            // Adding {manage: true} to BB.Form failed, hence this manual subview
            var form = new Backbone.Form({model: app.models.pic, fields: ['osmid']});
            this.$el.find('.osm-selector').empty().append(form.render().$el);
        }
    });

    app.Views.Capture = Backbone.View.extend({
        manage: true,

        initialize : function() {
            this.template = _.template($('#capture-template').html());
        },

        events: {
			"click button#capture": "capturePhoto",
			"click button#save" : "savePhoto",
			"click button#captureEdit": "capturePhotoEdit",
			"click button#getphotoFromLibrary": "getPhoto"
        },

        capturePhoto: function() {<commit_msg>Enable or disable capture button depending on feature selection state<commit_after>var capturePhoto = (function(app) {
    "use strict";

    app.Views.OsmSelect = Backbone.Layout.extend({
        template: "#osm-selector-page",

        afterRender: function() {
            // Adding {manage: true} to BB.Form failed, hence this manual subview
            var form = new Backbone.Form({model: app.models.pic, fields: ['osmid']});
            form.on('osmid:change', _.bind(this.onOsmSelectChange, this));
            this.$el.find('.osm-selector').empty().append(form.render().$el);
        },

        onOsmSelectChange: function(form, editor) {
            var val = editor.getValue();
            this.$el.find('.osm-selector-buttons button').prop('disabled', (val === null));
        }
    });

    app.Views.Capture = Backbone.View.extend({
        manage: true,

        initialize : function() {
            this.template = _.template($('#capture-template').html());
        },

        events: {
			"click button#capture": "capturePhoto",
			"click button#save" : "savePhoto",
			"click button#captureEdit": "capturePhotoEdit",
			"click button#getphotoFromLibrary": "getPhoto"
        },

        capturePhoto: function() {
{'fraction_non_alphanumeric': 0.15560747663551402, 'fraction_numerical': 0.0, 'mean_word_length': 2.628813559322034, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, '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': '2161814', 'n_tokens_mistral': 627, 'n_tokens_neox': 593, 'n_words': 126}