Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
WE.SpreadsheetImport
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Labels
Merge Requests
0
Merge Requests
0
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
packages
WE.SpreadsheetImport
Commits
70fce878
Commit
70fce878
authored
Oct 03, 2017
by
Chhengleap Soem
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'KIME-5209' into 'master'
[TASK] Allow required mapping property See merge request
!23
parents
6f0524ff
3c5dacf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
Classes/WE/SpreadsheetImport/Annotations/Mapping.php
Classes/WE/SpreadsheetImport/Annotations/Mapping.php
+7
-0
Resources/Private/Templates/SpreadsheetImport/Mapping.html
Resources/Private/Templates/SpreadsheetImport/Mapping.html
+17
-3
No files found.
Classes/WE/SpreadsheetImport/Annotations/Mapping.php
View file @
70fce878
...
...
@@ -40,6 +40,13 @@ final class Mapping {
*/
public
$identifier
=
FALSE
;
/**
* Flag if property is handled as required mapping
*
* @var boolean
*/
public
$required
=
FALSE
;
/**
* Overwrite the default getter for previews
*
...
...
Resources/Private/Templates/SpreadsheetImport/Mapping.html
View file @
70fce878
...
...
@@ -18,7 +18,14 @@
</f:else>
</f:if>
<f:if
condition=
"{columnMapping.mapping.identifier}"
>
<span
class=
"require"
>
*
</span>
<f:then>
<span
class=
"require"
>
*
</span>
</f:then>
<f:else>
<f:if
condition=
"{columnMapping.mapping.required}"
>
<span
class=
"require"
>
*
</span>
</f:if>
</f:else>
</f:if>
</label>
<div>
...
...
@@ -26,10 +33,17 @@
<f:then>
<f:if
condition=
"{columnMapping.mapping.identifier}"
>
<f:then>
<f:form
.
select
name=
"{property}"
options=
"{spreadsheetColumns}"
prependOptionLabel=
"{f:translate(id: 'label.please_select
')}"
value=
"{columnMapping.column}"
additionalAttributes=
"{required: 1}"
/>
<f:form
.
select
class=
"form-control select-mapping-column"
name=
"{property}"
options=
"{spreadsheetColumns}"
prependOptionLabel=
"{f:translate(id: 'label.please_choose
')}"
value=
"{columnMapping.column}"
additionalAttributes=
"{required: 1}"
/>
</f:then>
<f:else>
<f:form
.
select
name=
"{property}"
options=
"{spreadsheetColumns}"
prependOptionLabel=
"{f:translate(id: 'label.please_select')}"
value=
"{columnMapping.column}"
/>
<f:if
condition=
"{columnMapping.mapping.required}"
>
<f:then>
<f:form
.
select
class=
"form-control select-mapping-column"
name=
"{property}"
options=
"{spreadsheetColumns}"
prependOptionLabel=
"{f:translate(id: 'label.please_choose')}"
value=
"{columnMapping.column}"
additionalAttributes=
"{required: 1}"
/>
</f:then>
<f:else>
<f:form
.
select
class=
"form-control select-mapping-column"
name=
"{property}"
options=
"{spreadsheetColumns}"
prependOptionLabel=
"{f:translate(id: 'label.please_choose')}"
value=
"{columnMapping.column}"
/>
</f:else>
</f:if>
</f:else>
</f:if>
</f:then>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment