Skip to content

Commit

Permalink
✨ : add option to make module variable mandatory
Browse files Browse the repository at this point in the history
resolves #72
  • Loading branch information
juwit committed Aug 27, 2019
1 parent c9dc432 commit d2af11b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/main/java/io/codeka/gaia/modules/bo/TerraformVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class TerraformVariable {

private boolean editable;

private boolean mandatory;

public String getName() {
return name;
}
Expand Down Expand Up @@ -44,4 +46,12 @@ public boolean isEditable() {
public void setEditable(boolean editable) {
this.editable = editable;
}

public boolean isMandatory() {
return mandatory;
}

public void setMandatory(boolean mandatory) {
this.mandatory = mandatory;
}
}
7 changes: 2 additions & 5 deletions src/main/resources/templates/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,8 @@ <h2>Variables <button type="button" class="btn btn-success" @click="addVar()">+<
<input type="text" class="form-control" id="var-defaultValue" v-model="modVar.defaultValue">
</div>
<div class="form-group col-md-1">
<div class="form-check">
<input class="form-check-input" type="checkbox" :id="'check-' + modVarIdx" v-model="modVar.editable">
<label class="form-check-label" :for="'check-' + modVarIdx"
data-toggle="tooltip" data-placement="top" title="Set this variable as editable for module users">Editable</label>
</div>
<b-form-checkbox v-model="modVar.editable" switch inline>Editable</b-form-checkbox>
<b-form-checkbox v-model="modVar.mandatory" switch inline>Mandatory</b-form-checkbox>
</div>
<div class="form-group" >
<button type="button" class="form-control btn btn-danger" @click="removeVar(modVarIdx)">-</button>
Expand Down

0 comments on commit d2af11b

Please sign in to comment.