Skip to content

Commit

Permalink
Renaming form inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldreams committed Jul 11, 2018
1 parent 7f6f5e0 commit 731eaf7
Show file tree
Hide file tree
Showing 26 changed files with 15 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions resources/templates/view/4/forms/date.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Recipient's username" aria-label="Recipient's username"
aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="basic-addon2">@example.com</span>
</div>
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lara-crud/Crud/Policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function template()
$methodsTemp = [];
$tempCheck = new TemplateManager('policy/template.txt');
foreach ($this->only as $method) {
$fileName = $tempCheck->getFullPath("policy/$method.txt") ? "policy/$method.txt" : "policy/default.txt";
$fileName = $tempCheck->getFullPath("policy/$method.txt") ? "policy/$method.txt" : "policy/default.html";
$methodsTemp[] = (new TemplateManager($fileName, [
'method' => $method,
'modelClass' => $this->shortModelName,
Expand Down
14 changes: 7 additions & 7 deletions src/lara-crud/View/Partial/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ public function make()
$retArr[] = $this->checkBox($column);
break;
case 'radio':
$retArr[] = $this->tempMan("radio.txt", [], $column);
$retArr[] = $this->tempMan("radio.html", [], $column);
break;
case 'file':
$retArr[] = $this->tempMan("file.txt", [
$retArr[] = $this->tempMan("file.html", [
'type' => 'file'
], $column);
break;
case 'textarea':
$retArr[] = $this->tempMan('textarea.txt', [
$retArr[] = $this->tempMan('textarea.html', [
'columnValue' => '{{old(\'' . $column->name() . '\',$model->' . $column->name() . ')}}'
], $column);
break;
Expand All @@ -126,7 +126,7 @@ public function make()
$propertiesText .= $name . '="' . $value . '" ';
}
}
$retArr[] = $this->tempMan('default.txt', [
$retArr[] = $this->tempMan('default.html', [
'properties' => $propertiesText,
'columnValue' => '{{old(\'' . $column->name() . '\',$model->' . $column->name() . ')}}'

Expand All @@ -147,7 +147,7 @@ protected function select($column, Column $columnObj)
{
$options = '';
if ($columnObj->isForeign()) {
$options = $this->tempMan("select-rel.txt", [
$options = $this->tempMan("select-rel.html", [
'modelVar' => $columnObj->foreignTable(),
'name' => $columnObj->name()
], $columnObj);
Expand All @@ -160,7 +160,7 @@ protected function select($column, Column $columnObj)
}
}
}
return $this->tempMan("select.txt", ['options' => $options], $columnObj);
return $this->tempMan("select.html", ['options' => $options], $columnObj);
}

/**
Expand All @@ -170,7 +170,7 @@ protected function select($column, Column $columnObj)
*/
protected function checkBox($column)
{
return $this->tempMan("checkbox.txt", [
return $this->tempMan("checkbox.html", [
'label' => $column->label(),
'checked' => ''
], $column);
Expand Down

0 comments on commit 731eaf7

Please sign in to comment.