Template for managment of templates + add button for creation of new template

This commit is contained in:
Tina_Azure 2023-05-15 16:28:25 +02:00
parent 2e59a596c3
commit 09406b0852
2 changed files with 63 additions and 32 deletions

View File

@ -8,23 +8,26 @@
Please Log in.
{{/COOKIE_LOGGED_IN}}
{{#COOKIE_LOGGED_IN}}
<h2>Freelancer: {{freelanceremail}}</h2>
<br>
<br>
<table>
{{#templates}}
<tr>
<th>{{name}}</th>
<th>
<form action="/freelancer/templateManagement/template/{{name}}" method="post">
<button type="submit" name="templateaction" value="view|{{id}}" class="button">View</button>
<button type="submit" name="templateaction" value="edit|{{id}}" class="button">Edit</button>
<button type="submit" name="templateaction" value="delete|{{id}}" class="button">Delete</button>
</form>
</th>
</tr>
{{/templates}}
</table>
<h2>Freelancer: {{freelanceremail}}</h2>
<br>
<br>
<table>
{{#templates}}
<tr>
<th>{{name}}</th>
<th>
<form action="/freelancer/templateManagement/template/{{name}}" method="post">
<button type="submit" name="templateaction" value="view|{{id}}" class="button">View</button>
<button type="submit" name="templateaction" value="edit|{{id}}" class="button">Edit</button>
<button type="submit" name="templateaction" value="delete|{{id}}" class="button">Delete</button>
</form>
</th>
</tr>
{{/templates}}
</table>
<form action="/freelancer/templateManagement/template/new" method="get">
<button type="submit" class="button">Create New Template</button>
</form>
{{/COOKIE_LOGGED_IN}}
{{> templateIncludes/freelancerLoginSignupProfileLogoutInterface.html.html}}
<br>

View File

@ -5,21 +5,49 @@
</head>
<body>
<h2>Freelancer: {{freelancername}}</h2>
<h3>Template: {{templatename}}</h3>
<div>Contact Information:</div>
<div>
{{contactdata}}<br>
{{contactinformation}}
</div>
<br>
<div>Payment Information:</div>
<div>
Prefered Currency: {{currencypreference}}<br>
Price: {{pricetotal}} - Upfront: {{priceupfront}} - On Delivery: {{priceondeliver}}<br>
</div>
<br>
<div>Description:</div>
<div>{{content}}</div>
{{^OPERATION_EDIT}}
<h3>Template: {{templatename}}</h3>
<div>Contact Information:</div>
<div>
{{contactdata}}<br>
{{contactinformation}}
</div>
<br>
<div>Payment Information:</div>
<div>
Prefered Currency: {{currencypreference}}<br>
Price: {{pricetotal}} - Upfront: {{priceupfront}} - On Delivery: {{priceondeliver}}<br>
</div>
<br>
<div>Description:</div>
<div>{{content}}</div>
{{/OPERATION_EDIT}}
{{#OPERATION_EDIT}}
<br>
<form action="/freelancer/templateManagement/fulfilment" method="post">
<label for="templatename">Template Name:</label> <input type="text" id="templatename" name="templatename" value="{{templatename}}"><br>
<label for="templatecontactdata">Contact Data:</label> <input type="text" id="templatecontactdata" name="templatecontactdata" value="{{contactdata}}"><br>
<label for="templatecontactinformation">Contact Information: </label> <input type="text" id="templatecontactinformation" name="templatecontactinformation" value="{{contactinformation}}"><br>
<label for="templatecurrencypreference">Prefered Currency: </label> <input type="text" id="templatecurrencypreference" name="templatecurrencypreference" value="{{currencypreference}}"><br>
<label for="templatepriceupfront">Upfront payment: </label> <input type="text" id="templatepriceupfront" name="templatepriceupfront" value="{{priceupfront}}"><br>
<label for="templatepriceondeliver">On Delivery Payment: </label> <input type="text" id="templatepriceondeliver" name="templatepriceondeliver" value="{{priceondeliver}}"><br>
<label for="templatecontent">Description: </label> <textarea id="templatecontent" name="templatecontent" value="">{{content}}</textarea><br>
<button type="submit" name="templateid" value="{{templateid}}" class="button">Confirm change of Template</button>
</form>
<br>
{{/OPERATION_EDIT}}
{{#OPERATION_DELETE}}
<br>
<form action="/freelancer/templateManagement/fulfilment" method="post">
<button type="submit" name="templateid" value="{{templateid}}" class="button">Confirm Template Deletion</button>
</form>
<br>
{{/OPERATION_DELETE}}
{{#TEMPLATE_OPERATION_ERROR_NO_TEMPLATE}}
<div>
Template could not be found
</div>
{{/TEMPLATE_OPERATION_ERROR_NO_TEMPLATE}}
<br>
<form action="/freelancer/profile" method="get">
<button type="submit" class="button">Return to profile</button>