Skip to content

Commit

Permalink
Manually merge #12
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 28, 2023
1 parent 6ce26d3 commit 659ce6a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/templates/FormGenerator/macros/alert.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro generate(input) %}
<div class="alert {{input.class}}">
{% if input.icon %}<i class="icon fa {{input.icon}}"></i> {% endif %}{{ translate(input.value) }}
{% if input.icon %}<i class="icon {{input.icon}}"></i> {% endif %}{{ translate(input.value) }}
</div>
{% endmacro %}
2 changes: 1 addition & 1 deletion app/templates/FormGenerator/macros/text.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro generate(input) %}
{% if input.icon %}
<div class="input-group">
<span class="input-group-addon"><i class="fa {{input.icon}} fa-fw"></i></span>
<span class="input-group-addon"><i class="{{input.icon}}"></i></span>
{% else %}
<div class="form-group">
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/FormGenerator/macros/textarea.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro generate(input) %}
{% if input.icon %}<div class="input-group"><span class="input-group-addon"><i class="fa {{input.icon}} fa-fw"></i></span>{% endif %}
{% if input.icon %}<div class="input-group"><span class="input-group-addon"><i class="{{input.icon}}"></i></span>{% endif %}
<textarea{% for type,value in input %} {{type}}="{{value}}"{% endfor %}>{{input.value}}</textarea>
{% if input.icon %}</div>{% endif %}
{% endmacro %}
10 changes: 5 additions & 5 deletions public/schema/forms/formgenerator.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"form" : {
"type" : "text",
"label" : "Project name",
"icon" : "fa-flag",
"icon" : "fas fa-flag",
"placeholder" : "Project name"
}
},
"owner" : {
"form" : {
"type" : "text",
"label" : "Project Owner",
"icon" : "fa-user",
"icon" : "fas fa-user",
"id" : "owner",
"placeholder" : "Project Owner",
"default" : "Foo"
Expand All @@ -31,7 +31,7 @@
"form" : {
"type" : "textarea",
"label" : "Project description",
"icon" : "fa-pencil-alt",
"icon" : "fas fa-pencil-alt",
"placeholder" : "Project description",
"rows" : 5
}
Expand Down Expand Up @@ -73,7 +73,7 @@
},
"form" : {
"type" : "number",
"icon" : "fa-percent",
"icon" : "fas fa-percent",
"default" : 10,
"label" : "Project completion"
}
Expand All @@ -88,7 +88,7 @@
"form" : {
"type" : "alert",
"class" : "alert-success",
"icon" : "fa-rocket",
"icon" : "fas fa-rocket",
"value" : "Form Generator is awesome!"
}
}
Expand Down
6 changes: 3 additions & 3 deletions public/templates/pages/formgenerator.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
<a href="#" class="js-displayForm" data-formUrl="/{{project.id}}/edit"><i class="fa fa-edit"></i> Edit</a>
<a href="#" class="js-displayForm" data-formUrl="/{{project.id}}/edit"><i class="fas fa-edit"></i> Edit</a>
</li>
<li>
<a href="#" class="js-displayConfirm" data-confirm-title="Delete project" data-confirm-message="Are your sure you want to delete the project {{project.name}}" data-confirm-button="Yes, delete project" data-post-url="/{{project.id}}" data-post-method="DELETE"><i class="fa fa-trash-alt"></i> Delete</a>
<a href="#" class="js-displayConfirm" data-confirm-title="Delete project" data-confirm-message="Are your sure you want to delete the project {{project.name}}" data-confirm-button="Yes, delete project" data-post-url="/{{project.id}}" data-post-method="DELETE"><i class="fas fa-trash-alt"></i> Delete</a>
</li>
</ul>
</div>
Expand All @@ -53,7 +53,7 @@
</table>
</div><!-- /.box-body -->
<div class="box-footer">
<button class="btn btn-success js-displayForm" data-toggle="modal" data-formUrl="/new"><i class="fa fa-plus-square"></i> Create project</button>
<button class="btn btn-success js-displayForm" data-toggle="modal" data-formUrl="/new"><i class="fas fa-plus-square"></i> Create project</button>
</div>
</div><!-- /.box -->
</div><!-- /.col -->
Expand Down

0 comments on commit 659ce6a

Please sign in to comment.