Skip to content

Commit

Permalink
Reset project settings form after it loads
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Atkins-Turkish committed Jan 18, 2016
1 parent b90346a commit 3ee6c82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ide/static/ide/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ CloudPebble.Settings = (function() {
uuid_field.trigger("change");
});

// Resetting the form ensures that the values are correctly set when Chrome restores the page after quitting the browser
pane.find('form')[0].reset();

live_form.init();

CloudPebble.Sidebar.SetActivePane(pane, 'settings');
Expand Down
4 changes: 2 additions & 2 deletions ide/templates/ide/project/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<div class="control-group">
<label class="control-label" for="settings-name">{% trans 'Project name' %}</label>
<div class="controls">
<input type="text" id="settings-name">
<input type="text" id="settings-name" value="{{ project.name }}">
</div>
</div>
<div class="sdk-version native-only control-group">
<label class="control-label" for="settings-sdk-version">{% trans "SDK Version" %}</label>
<label class="control-label" for="settings-sdk-version">{% trans "SDK Version" %} {{ project.sdk_version }}</label>
<div class="controls">
<select id="settings-sdk-version">
<option value="2" {% if project.sdk_version == '2' %}selected{% endif %}>{% trans 'SDK 2 (Pebble, Pebble Steel)' %}</option>
Expand Down

0 comments on commit 3ee6c82

Please sign in to comment.