Skip to content

Commit

Permalink
Merge pull request #117 from madwire-media/vinayak-bug-fixes
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
drj-io authored Aug 14, 2023
2 parents c18b1d6 + 703e30d commit b715893
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
17 changes: 4 additions & 13 deletions views/forestay/createUpdate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,7 @@
<input id="attr-<%= attrKey %>" style="width:100%" type="number" name="<%= attrKey %>" class="number-input number-input-<%= attrKey %>" <%- value %> <%= required %> <%= attributeMutable %>>
<div id="error-<%= attrKey %>" class="alert alert-danger"></div>
<% } else if(attributeType == "text"){ %>
<textarea id="attr-<%= attrKey %>"
style="width:100%; height: 200px"
name="<%= attrKey %>"
class="text-input text-input-<%= attrKey %>"
<%= required %>
<%= attributeMutable %> >
<%if(forestay.id){ %><%- record[attrKey]%><% } else { %>
<%= attributeValue %>
<% } %>
</textarea>
<textarea id="attr-<%= attrKey %>" style="width:100%; height: 200px" name="<%= attrKey %>" class="text-input text-input-<%= attrKey %>" <%= required %> <%= attributeMutable %> ><%if(forestay.id){ %><%- record[attrKey]%><% } %></textarea>
<div id="error-<%= attrKey %>" class="alert alert-danger"></div>
<% } else if(attributeType == "boolean"){
var trueSelected = ""
Expand Down Expand Up @@ -205,10 +196,10 @@
<% }) %>
</select>
<div id="error-<%= attrKey %>" class="alert alert-danger"></div>
<% } else if (attributeType == "collection"){ %>
<%- include createUpdateCollections.ejs %>
<% } else if (attributeType == "collection") { %>
<%- include ("./createUpdateCollections", { attrKey: attrKey }) %>
<% } else if (attributeType == "model"){ %>
<%- include createUpdateModels.ejs %>
<%- include ("./createUpdateModels", { attrKey: attrKey, required: required, attributeMutable: attributeMutable }) %>
<% }else { // unknown attribute type %>
(can't edit <strong><%= attributeType %></strong> attributes at this time)
<% }%>
Expand Down
2 changes: 1 addition & 1 deletion views/forestay/createUpdateCollections.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<p>Please add attribute <strong>populateBy</strong> to your model to display these optoins, or hide this field from the form.</p>
<% } else { %>
<% if (_.get(forestay.config.attributes[attrKey], ["meta","forestay","createUpdateUi"]) === 'tagging') { %>
<% include createUpdateCollectionsTagging.ejs %>
<% include ("./createUpdateCollectionsTagging") %>
<% } else { // end createUpdateUi Type%>
<%
var cpt=0;
Expand Down
4 changes: 2 additions & 2 deletions views/forestay/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<% var value = "" %>
<% if (typeof _.get(forestay.filter,[attrKey]) != "undefined") value = forestay.filter[attrKey] %>
<% if (attributeType == "model"){ %>
<% include filterByModel.ejs %>
<%- include ("./filterByModel",{ attrKey: attrKey, value: value }); %>
<% } else if (attributeType == "string" || attributeType == "number"){ %>
<input value="<%= value %>" name="<%= attrKey %>">
<% } else if (attributeType == "boolean"){ %>
Expand Down Expand Up @@ -305,7 +305,7 @@
</td>
<% } %>
<% include indexActionsRecordRow.ejs %>
<%- include ("./indexActionsRecordRow"); %>
<% if(_.get(forestay,['config','forestay','index','hideEditButton']) !== true){ %>
<td>
<a href="<%= _.get(forestay, ["config","forestay","urlPrefix"]) %><%= row.id %>/edit" class="btn btn-info btn-sm">Edit</a>
Expand Down

0 comments on commit b715893

Please sign in to comment.