You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: csp/gitprojectsettings.csp
+32-12Lines changed: 32 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,10 @@ body {
165
165
}
166
166
167
167
set settings.favoriteNamespaces = contexts
168
+
169
+
if ($get(%request.Data("proxySubmitButton",1)) = "saveDefaults") {
170
+
do settings.SaveDefaults()
171
+
}
168
172
}
169
173
set err = ""
170
174
try {
@@ -226,7 +230,7 @@ body {
226
230
227
231
<fieldset id="namespaceSettings">
228
232
<div class="form-group row mb-3">
229
-
<label for="gitBinPath" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to the Git executable">Path to git.exe</label>
233
+
<label for="gitBinPath" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Absolute path to the Git executable"><b>Path to git.exe</b></label>
230
234
<div class="col-sm-7">
231
235
<server>
232
236
set exists = ##class(SourceControl.Git.Utils).GitBinExists(.version)
@@ -345,7 +349,7 @@ body {
345
349
</server>
346
350
347
351
<div class="form-group row mb-3">
348
-
<label for="pullEventClass" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Handler class for git pull">Pull Event Class</label>
352
+
<label for="pullEventClass" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Handler class for git pull"><b>Pull Event Class</b></label>
<label for="percentClassReplace" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Character(s) to replace '%' with for percent classes while exporting them out to the filesystem. By default, the '%' is removed.">'%' Replacement on Export</label>
382
+
<label for="percentClassReplace" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Character(s) to replace '%' with for percent classes while exporting them out to the filesystem. By default, the '%' is removed."><b>'%' Replacement on Export</b></label>
<label for="systemBasicMode" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode for all users, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace."> Basic Mode as System Default</label>
389
+
<label for="systemBasicMode" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Enable basic mode for all users, which reduces the number of menu options and requires less knowledge of git. This is suitable for a single-developer (non-shared) namespace."><b> Basic Mode as System Default</b></label>
<label for="defaultMergeBranch" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="In basic mode, the Sync operation will merge changes from this remote branch (leave blank for no branch)">Default merge branch</label>
410
+
<label for="defaultMergeBranch" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="In basic mode, the Sync operation will merge changes from this remote branch (leave blank for no branch)"><b>Default merge branch</b></label>
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from a database other than this namespace's default routine database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"> Treat Mapped Items as Read-only</label>
427
+
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from a database other than this namespace's default routine database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"><b> Treat Mapped Items as Read-only</b></label>
<label for="compileOnImport" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="If true, the Import All options will compile imported options using the configured pull event handler">Compile Items on Import</label>
447
+
<label for="compileOnImport" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="If true, the Import All options will compile imported options using the configured pull event handler"><b>Compile Items on Import</b></label>
<label for="addToFav" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Favorite namespaces for user to add link on Home page.">Favorite Namespaces</label>
656
+
<label for="addToFav" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Favorite namespaces for user to add link on Home page.">*Favorite Namespaces</label>
<input type='submit' class="btn-lg btn-primary" value = 'Save' name="Save"/>
683
+
<input type="submit" class="btn-lg btn-primary" id="saveDefaults" value = 'Save as Instance Defaults' title="Save these settings as default for new instances" name="saveDefaults"/>
684
+
<div>
685
+
<small> Settings saved as default are <b>bolded </b> </small>
686
+
</div>
678
687
</div>
679
688
</div>
680
689
@@ -701,6 +710,17 @@ function getSocket(urlPostfix) {
701
710
return new WebSocket(socketURL);
702
711
}
703
712
713
+
var submitForm = function(e) {
714
+
e.preventDefault();
715
+
e.stopPropagation();
716
+
var proxySubmitButton = document.getElementById('proxySubmitButton');
717
+
proxySubmitButton.value = "saveDefaults";
718
+
var form = document.getElementById('settingsForm');
0 commit comments