Skip to content

Commit

Permalink
Duplicate template logic changes so that to ensure the save CTA is al…
Browse files Browse the repository at this point in the history
…ways active by default.
  • Loading branch information
MattRuddick committed Sep 14, 2022
1 parent 7587fab commit 6dce1b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/create-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(document).ready(function(){
$('#templateSubject').val(response.data.SubjectPart);
$('#templateText').val(response.data.TextPart);
window.codeMirrorEditor.setValue(response.data.HtmlPart ? response.data.HtmlPart : "");
$('#createTemplateForm').trigger('change'); //enable the save button
$('#saveTemplateCta').removeAttr('disabled'); // enable the save button
});
}

Expand Down
2 changes: 1 addition & 1 deletion public/global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const currentVersion = "v1.5.4";
const currentVersion = "v1.5.5";

function populateTextSectionContent() {
//Will strip template html of html tags leaving inner content for the template text field
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/template-form.edge
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
<div id="errContainer" class="text-danger mb-2 d-none"></div>
<a href="/" class="btn btn-secondary">Back</a>

<button type="submit" class="btn btn-primary" disabled>{{ ctaText }}</button>
<button type="submit" class="btn btn-primary" id="saveTemplateCta" disabled>{{ ctaText }}</button>
</form>

0 comments on commit 6dce1b9

Please sign in to comment.